Changeset 6a44ee4 in mainline for uspace/srv/bd/ata_bd/ata_bd.c


Ignore:
Timestamp:
2011-07-20T15:26:21Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
efcebe1
Parents:
25bef0ff (diff), a701812 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/ata_bd/ata_bd.c

    r25bef0ff r6a44ee4  
    8181static const size_t identify_data_size = 512;
    8282
    83 /** Size of the communication area. */
    84 static size_t comm_size;
    85 
    8683/** I/O base address of the command registers. */
    8784static uintptr_t cmd_physical;
     
    105102static void print_syntax(void);
    106103static int ata_bd_init(void);
    107 static void ata_bd_connection(ipc_callid_t iid, ipc_call_t *icall);
     104static void ata_bd_connection(ipc_callid_t iid, ipc_call_t *icall, void *);
    108105static int ata_bd_read_blocks(int disk_id, uint64_t ba, size_t cnt,
    109106    void *buf);
     
    274271
    275272/** Block device connection handler */
    276 static void ata_bd_connection(ipc_callid_t iid, ipc_call_t *icall)
     273static void ata_bd_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg)
    277274{
    278275        void *fs_va = NULL;
     
    281278        sysarg_t method;
    282279        devmap_handle_t dh;
     280        size_t comm_size;       /**< Size of the communication area. */
    283281        unsigned int flags;
    284282        int retval;
     
    317315        (void) async_share_out_finalize(callid, fs_va);
    318316
    319         while (1) {
     317        while (true) {
    320318                callid = async_get_call(&call);
    321319                method = IPC_GET_IMETHOD(call);
    322                 switch (method) {
    323                 case IPC_M_PHONE_HUNGUP:
     320               
     321                if (!method) {
    324322                        /* The other side has hung up. */
    325323                        async_answer_0(callid, EOK);
    326324                        return;
     325                }
     326               
     327                switch (method) {
    327328                case BD_READ_BLOCKS:
    328329                        ba = MERGE_LOUP32(IPC_GET_ARG1(call),
Note: See TracChangeset for help on using the changeset viewer.