Changeset ffa2c8ef in mainline for uspace/srv/bd/ata_bd/ata_bd.c


Ignore:
Timestamp:
2011-01-29T11:36:08Z (13 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
46b881c
Parents:
64d2b10
Message:

do not intermix low-level IPC methods with async framework methods

File:
1 edited

Legend:

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

    r64d2b10 rffa2c8ef  
    5151#include <libarch/ddi.h>
    5252#include <ddi.h>
    53 #include <ipc/ipc.h>
    5453#include <ipc/bd.h>
    5554#include <async.h>
     
    282281
    283282        if (disk_id < 0 || disk[disk_id].present == false) {
    284                 ipc_answer_0(iid, EINVAL);
     283                async_answer_0(iid, EINVAL);
    285284                return;
    286285        }
    287286
    288287        /* Answer the IPC_M_CONNECT_ME_TO call. */
    289         ipc_answer_0(iid, EOK);
     288        async_answer_0(iid, EOK);
    290289
    291290        if (!async_share_out_receive(&callid, &comm_size, &flags)) {
    292                 ipc_answer_0(callid, EHANGUP);
     291                async_answer_0(callid, EHANGUP);
    293292                return;
    294293        }
     
    296295        fs_va = as_get_mappable_page(comm_size);
    297296        if (fs_va == NULL) {
    298                 ipc_answer_0(callid, EHANGUP);
     297                async_answer_0(callid, EHANGUP);
    299298                return;
    300299        }
     
    308307                case IPC_M_PHONE_HUNGUP:
    309308                        /* The other side has hung up. */
    310                         ipc_answer_0(callid, EOK);
     309                        async_answer_0(callid, EOK);
    311310                        return;
    312311                case BD_READ_BLOCKS:
     
    331330                        break;
    332331                case BD_GET_BLOCK_SIZE:
    333                         ipc_answer_1(callid, EOK, block_size);
     332                        async_answer_1(callid, EOK, block_size);
    334333                        continue;
    335334                case BD_GET_NUM_BLOCKS:
    336                         ipc_answer_2(callid, EOK, LOWER32(disk[disk_id].blocks),
     335                        async_answer_2(callid, EOK, LOWER32(disk[disk_id].blocks),
    337336                            UPPER32(disk[disk_id].blocks));
    338337                        continue;
     
    341340                        break;
    342341                }
    343                 ipc_answer_0(callid, retval);
     342                async_answer_0(callid, retval);
    344343        }
    345344}
Note: See TracChangeset for help on using the changeset viewer.