Changes in uspace/lib/drv/generic/remote_ahci.c [1d6dd2a:58563585] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/remote_ahci.c
r1d6dd2a r58563585 39 39 #include <stdio.h> 40 40 #include <macros.h> 41 #include <str.h>42 41 #include "ahci_iface.h" 43 42 #include "ddf/driver.h" … … 66 65 67 66 char devn[MAX_NAME_LENGTH]; 68 errno_t rc = devman_fun_get_name(funh, devn, MAX_NAME_LENGTH);67 int rc = devman_fun_get_name(funh, devn, MAX_NAME_LENGTH); 69 68 if (rc != EOK) 70 69 return NULL; … … 84 83 } 85 84 86 errno_t ahci_get_sata_device_name(async_sess_t *sess, size_t sata_dev_name_length,85 int ahci_get_sata_device_name(async_sess_t *sess, size_t sata_dev_name_length, 87 86 char *sata_dev_name) 88 87 { … … 96 95 async_data_read_start(exch, sata_dev_name, sata_dev_name_length); 97 96 98 errno_t rc;97 sysarg_t rc; 99 98 async_wait_for(req, &rc); 100 99 … … 102 101 } 103 102 104 errno_t ahci_get_num_blocks(async_sess_t *sess, uint64_t *blocks)103 int ahci_get_num_blocks(async_sess_t *sess, uint64_t *blocks) 105 104 { 106 105 async_exch_t *exch = async_exchange_begin(sess); … … 110 109 sysarg_t blocks_hi; 111 110 sysarg_t blocks_lo; 112 errno_t rc = async_req_1_2(exch, DEV_IFACE_ID(AHCI_DEV_IFACE),111 int rc = async_req_1_2(exch, DEV_IFACE_ID(AHCI_DEV_IFACE), 113 112 IPC_M_AHCI_GET_NUM_BLOCKS, &blocks_hi, &blocks_lo); 114 113 … … 123 122 } 124 123 125 errno_t ahci_get_block_size(async_sess_t *sess, size_t *blocks_size)124 int ahci_get_block_size(async_sess_t *sess, size_t *blocks_size) 126 125 { 127 126 async_exch_t *exch = async_exchange_begin(sess); … … 130 129 131 130 sysarg_t bs; 132 errno_t rc = async_req_1_1(exch, DEV_IFACE_ID(AHCI_DEV_IFACE),131 int rc = async_req_1_1(exch, DEV_IFACE_ID(AHCI_DEV_IFACE), 133 132 IPC_M_AHCI_GET_BLOCK_SIZE, &bs); 134 133 … … 141 140 } 142 141 143 errno_t ahci_read_blocks(async_sess_t *sess, uint64_t blocknum, size_t count,142 int ahci_read_blocks(async_sess_t *sess, uint64_t blocknum, size_t count, 144 143 void *buf) 145 144 { … … 156 155 async_exchange_end(exch); 157 156 158 errno_t rc;157 sysarg_t rc; 159 158 async_wait_for(req, &rc); 160 159 … … 162 161 } 163 162 164 errno_t ahci_write_blocks(async_sess_t *sess, uint64_t blocknum, size_t count,163 int ahci_write_blocks(async_sess_t *sess, uint64_t blocknum, size_t count, 165 164 void* buf) 166 165 { … … 176 175 async_exchange_end(exch); 177 176 178 errno_t rc;177 sysarg_t rc; 179 178 async_wait_for(req, &rc); 180 179 … … 228 227 } 229 228 230 const errno_t ret = ahci_iface->get_sata_device_name(fun,229 const int ret = ahci_iface->get_sata_device_name(fun, 231 230 sata_dev_name_length, sata_dev_name); 232 231 … … 252 251 253 252 uint64_t blocks; 254 const errno_t ret = ahci_iface->get_num_blocks(fun, &blocks);253 const int ret = ahci_iface->get_num_blocks(fun, &blocks); 255 254 256 255 if (ret != EOK) … … 271 270 272 271 size_t blocks; 273 const errno_t ret = ahci_iface->get_block_size(fun, &blocks);272 const int ret = ahci_iface->get_block_size(fun, &blocks); 274 273 275 274 if (ret != EOK) … … 303 302 const size_t cnt = (size_t) DEV_IPC_GET_ARG3(*call); 304 303 305 const errno_t ret = ahci_iface->read_blocks(fun, blocknum, cnt, buf);304 const int ret = ahci_iface->read_blocks(fun, blocknum, cnt, buf); 306 305 307 306 async_answer_0(callid, ret); … … 332 331 const size_t cnt = (size_t) DEV_IPC_GET_ARG3(*call); 333 332 334 const errno_t ret = ahci_iface->write_blocks(fun, blocknum, cnt, buf);333 const int ret = ahci_iface->write_blocks(fun, blocknum, cnt, buf); 335 334 336 335 async_answer_0(callid, ret);
Note:
See TracChangeset
for help on using the changeset viewer.