Changeset 5a6cc679 in mainline for uspace/drv/block
- Timestamp:
- 2018-01-31T02:21:24Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a0a9cc2
- Parents:
- 132ab5d1
- Location:
- uspace/drv/block
- Files:
-
- 11 edited
-
ahci/ahci.c (modified) (19 diffs)
-
ata_bd/ata_bd.c (modified) (32 diffs)
-
ata_bd/ata_bd.h (modified) (1 diff)
-
ata_bd/main.c (modified) (10 diffs)
-
ata_bd/main.h (modified) (1 diff)
-
ddisk/ddisk.c (modified) (19 diffs)
-
usbmast/bo_trans.c (modified) (3 diffs)
-
usbmast/bo_trans.h (modified) (1 diff)
-
usbmast/main.c (modified) (14 diffs)
-
usbmast/scsi_ms.c (modified) (10 diffs)
-
usbmast/scsi_ms.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/block/ahci/ahci.c
r132ab5d1 r5a6cc679 109 109 } 110 110 111 static int get_sata_device_name(ddf_fun_t *, size_t, char *);112 static int get_num_blocks(ddf_fun_t *, uint64_t *);113 static int get_block_size(ddf_fun_t *, size_t *);114 static int read_blocks(ddf_fun_t *, uint64_t, size_t, void *);115 static int write_blocks(ddf_fun_t *, uint64_t, size_t, void *);116 117 static int ahci_identify_device(sata_dev_t *);118 static int ahci_set_highest_ultra_dma_mode(sata_dev_t *);119 static int ahci_rb_fpdma(sata_dev_t *, uintptr_t, uint64_t);120 static int ahci_wb_fpdma(sata_dev_t *, uintptr_t, uint64_t);111 static errno_t get_sata_device_name(ddf_fun_t *, size_t, char *); 112 static errno_t get_num_blocks(ddf_fun_t *, uint64_t *); 113 static errno_t get_block_size(ddf_fun_t *, size_t *); 114 static errno_t read_blocks(ddf_fun_t *, uint64_t, size_t, void *); 115 static errno_t write_blocks(ddf_fun_t *, uint64_t, size_t, void *); 116 117 static errno_t ahci_identify_device(sata_dev_t *); 118 static errno_t ahci_set_highest_ultra_dma_mode(sata_dev_t *); 119 static errno_t ahci_rb_fpdma(sata_dev_t *, uintptr_t, uint64_t); 120 static errno_t ahci_wb_fpdma(sata_dev_t *, uintptr_t, uint64_t); 121 121 122 122 static void ahci_sata_devices_create(ahci_dev_t *, ddf_dev_t *); … … 124 124 static void ahci_ahci_hw_start(ahci_dev_t *); 125 125 126 static int ahci_dev_add(ddf_dev_t *);126 static errno_t ahci_dev_add(ddf_dev_t *); 127 127 128 128 static void ahci_get_model_name(uint16_t *, char *); … … 177 177 * 178 178 */ 179 static int get_sata_device_name(ddf_fun_t *fun,179 static errno_t get_sata_device_name(ddf_fun_t *fun, 180 180 size_t sata_dev_name_length, char *sata_dev_name) 181 181 { … … 193 193 * 194 194 */ 195 static int get_num_blocks(ddf_fun_t *fun, uint64_t *num_blocks)195 static errno_t get_num_blocks(ddf_fun_t *fun, uint64_t *num_blocks) 196 196 { 197 197 sata_dev_t *sata = fun_sata_dev(fun); … … 208 208 * 209 209 */ 210 static int get_block_size(ddf_fun_t *fun, size_t *block_size)210 static errno_t get_block_size(ddf_fun_t *fun, size_t *block_size) 211 211 { 212 212 sata_dev_t *sata = fun_sata_dev(fun); … … 225 225 * 226 226 */ 227 static int read_blocks(ddf_fun_t *fun, uint64_t blocknum,227 static errno_t read_blocks(ddf_fun_t *fun, uint64_t blocknum, 228 228 size_t count, void *buf) 229 229 { … … 232 232 uintptr_t phys; 233 233 void *ibuf = AS_AREA_ANY; 234 int rc = dmamem_map_anonymous(sata->block_size, DMAMEM_4GiB,234 errno_t rc = dmamem_map_anonymous(sata->block_size, DMAMEM_4GiB, 235 235 AS_AREA_READ | AS_AREA_WRITE, 0, &phys, &ibuf); 236 236 if (rc != EOK) { … … 268 268 * 269 269 */ 270 static int write_blocks(ddf_fun_t *fun, uint64_t blocknum,270 static errno_t write_blocks(ddf_fun_t *fun, uint64_t blocknum, 271 271 size_t count, void *buf) 272 272 { … … 275 275 uintptr_t phys; 276 276 void *ibuf = AS_AREA_ANY; 277 int rc = dmamem_map_anonymous(sata->block_size, DMAMEM_4GiB,277 errno_t rc = dmamem_map_anonymous(sata->block_size, DMAMEM_4GiB, 278 278 AS_AREA_READ | AS_AREA_WRITE, 0, &phys, &ibuf); 279 279 if (rc != EOK) { … … 424 424 * 425 425 */ 426 static int ahci_identify_device(sata_dev_t *sata)426 static errno_t ahci_identify_device(sata_dev_t *sata) 427 427 { 428 428 if (sata->is_invalid_device) { … … 434 434 uintptr_t phys; 435 435 sata_identify_data_t *idata = AS_AREA_ANY; 436 int rc = dmamem_map_anonymous(SATA_IDENTIFY_DEVICE_BUFFER_LENGTH,436 errno_t rc = dmamem_map_anonymous(SATA_IDENTIFY_DEVICE_BUFFER_LENGTH, 437 437 DMAMEM_4GiB, AS_AREA_READ | AS_AREA_WRITE, 0, &phys, 438 438 (void *) &idata); … … 605 605 * 606 606 */ 607 static int ahci_set_highest_ultra_dma_mode(sata_dev_t *sata)607 static errno_t ahci_set_highest_ultra_dma_mode(sata_dev_t *sata) 608 608 { 609 609 if (sata->is_invalid_device) { … … 628 628 uintptr_t phys; 629 629 sata_identify_data_t *idata = AS_AREA_ANY; 630 int rc = dmamem_map_anonymous(SATA_SET_FEATURE_BUFFER_LENGTH,630 errno_t rc = dmamem_map_anonymous(SATA_SET_FEATURE_BUFFER_LENGTH, 631 631 DMAMEM_4GiB, AS_AREA_READ | AS_AREA_WRITE, 0, &phys, 632 632 (void *) &idata); … … 734 734 * 735 735 */ 736 static int ahci_rb_fpdma(sata_dev_t *sata, uintptr_t phys, uint64_t blocknum)736 static errno_t ahci_rb_fpdma(sata_dev_t *sata, uintptr_t phys, uint64_t blocknum) 737 737 { 738 738 if (sata->is_invalid_device) { … … 822 822 * 823 823 */ 824 static int ahci_wb_fpdma(sata_dev_t *sata, uintptr_t phys, uint64_t blocknum)824 static errno_t ahci_wb_fpdma(sata_dev_t *sata, uintptr_t phys, uint64_t blocknum) 825 825 { 826 826 if (sata->is_invalid_device) { … … 949 949 950 950 /* Allocate and init retfis structure. */ 951 int rc = dmamem_map_anonymous(size, DMAMEM_4GiB,951 errno_t rc = dmamem_map_anonymous(size, DMAMEM_4GiB, 952 952 AS_AREA_READ | AS_AREA_WRITE, 0, &phys, &virt_fb); 953 953 if (rc != EOK) … … 1038 1038 * 1039 1039 */ 1040 static int ahci_sata_create(ahci_dev_t *ahci, ddf_dev_t *dev,1040 static errno_t ahci_sata_create(ahci_dev_t *ahci, ddf_dev_t *dev, 1041 1041 volatile ahci_port_t *port, unsigned int port_num) 1042 1042 { 1043 1043 ddf_fun_t *fun = NULL; 1044 int rc;1044 errno_t rc; 1045 1045 1046 1046 sata_dev_t *sata = ahci_sata_allocate(ahci, port); … … 1185 1185 1186 1186 int irq_cap; 1187 int rc = register_interrupt_handler(dev,1187 errno_t rc = register_interrupt_handler(dev, 1188 1188 hw_res_parsed.irqs.irqs[0], ahci_interrupt, &ct, &irq_cap); 1189 1189 if (rc != EOK) { … … 1255 1255 * 1256 1256 */ 1257 static int ahci_dev_add(ddf_dev_t *dev)1257 static errno_t ahci_dev_add(ddf_dev_t *dev) 1258 1258 { 1259 1259 ahci_dev_t *ahci = ahci_ahci_create(dev); -
uspace/drv/block/ata_bd/ata_bd.c
r132ab5d1 r5a6cc679 82 82 static const size_t identify_data_size = 512; 83 83 84 static int ata_bd_init_io(ata_ctrl_t *ctrl);84 static errno_t ata_bd_init_io(ata_ctrl_t *ctrl); 85 85 static void ata_bd_fini_io(ata_ctrl_t *ctrl); 86 86 87 static int ata_bd_open(bd_srvs_t *, bd_srv_t *);88 static int ata_bd_close(bd_srv_t *);89 static int ata_bd_read_blocks(bd_srv_t *, uint64_t ba, size_t cnt, void *buf,87 static errno_t ata_bd_open(bd_srvs_t *, bd_srv_t *); 88 static errno_t ata_bd_close(bd_srv_t *); 89 static errno_t ata_bd_read_blocks(bd_srv_t *, uint64_t ba, size_t cnt, void *buf, 90 90 size_t); 91 static int ata_bd_read_toc(bd_srv_t *, uint8_t session, void *buf, size_t);92 static int ata_bd_write_blocks(bd_srv_t *, uint64_t ba, size_t cnt,91 static errno_t ata_bd_read_toc(bd_srv_t *, uint8_t session, void *buf, size_t); 92 static errno_t ata_bd_write_blocks(bd_srv_t *, uint64_t ba, size_t cnt, 93 93 const void *buf, size_t); 94 static int ata_bd_get_block_size(bd_srv_t *, size_t *);95 static int ata_bd_get_num_blocks(bd_srv_t *, aoff64_t *);96 static int ata_bd_sync_cache(bd_srv_t *, aoff64_t, size_t);97 98 static int ata_rcmd_read(disk_t *disk, uint64_t ba, size_t cnt,94 static errno_t ata_bd_get_block_size(bd_srv_t *, size_t *); 95 static errno_t ata_bd_get_num_blocks(bd_srv_t *, aoff64_t *); 96 static errno_t ata_bd_sync_cache(bd_srv_t *, aoff64_t, size_t); 97 98 static errno_t ata_rcmd_read(disk_t *disk, uint64_t ba, size_t cnt, 99 99 void *buf); 100 static int ata_rcmd_write(disk_t *disk, uint64_t ba, size_t cnt,100 static errno_t ata_rcmd_write(disk_t *disk, uint64_t ba, size_t cnt, 101 101 const void *buf); 102 static int ata_rcmd_flush_cache(disk_t *disk);103 static int disk_init(ata_ctrl_t *ctrl, disk_t *d, int disk_id);104 static int ata_identify_dev(disk_t *disk, void *buf);105 static int ata_identify_pkt_dev(disk_t *disk, void *buf);106 static int ata_cmd_packet(disk_t *disk, const void *cpkt, size_t cpkt_size,102 static errno_t ata_rcmd_flush_cache(disk_t *disk); 103 static errno_t disk_init(ata_ctrl_t *ctrl, disk_t *d, int disk_id); 104 static errno_t ata_identify_dev(disk_t *disk, void *buf); 105 static errno_t ata_identify_pkt_dev(disk_t *disk, void *buf); 106 static errno_t ata_cmd_packet(disk_t *disk, const void *cpkt, size_t cpkt_size, 107 107 void *obuf, size_t obuf_size, size_t *rcvd_size); 108 static int ata_pcmd_inquiry(disk_t *disk, void *obuf, size_t obuf_size,108 static errno_t ata_pcmd_inquiry(disk_t *disk, void *obuf, size_t obuf_size, 109 109 size_t *rcvd_size); 110 static int ata_pcmd_read_12(disk_t *disk, uint64_t ba, size_t cnt,110 static errno_t ata_pcmd_read_12(disk_t *disk, uint64_t ba, size_t cnt, 111 111 void *obuf, size_t obuf_size); 112 static int ata_pcmd_read_capacity(disk_t *disk, uint64_t *nblocks,112 static errno_t ata_pcmd_read_capacity(disk_t *disk, uint64_t *nblocks, 113 113 size_t *block_size); 114 static int ata_pcmd_read_toc(disk_t *disk, uint8_t ses,114 static errno_t ata_pcmd_read_toc(disk_t *disk, uint8_t ses, 115 115 void *obuf, size_t obuf_size); 116 116 static void disk_print_summary(disk_t *d); 117 static int coord_calc(disk_t *d, uint64_t ba, block_coord_t *bc);117 static errno_t coord_calc(disk_t *d, uint64_t ba, block_coord_t *bc); 118 118 static void coord_sc_program(ata_ctrl_t *ctrl, const block_coord_t *bc, 119 119 uint16_t scnt); 120 static int wait_status(ata_ctrl_t *ctrl, unsigned set, unsigned n_reset,120 static errno_t wait_status(ata_ctrl_t *ctrl, unsigned set, unsigned n_reset, 121 121 uint8_t *pstatus, unsigned timeout); 122 122 … … 143 143 144 144 /** Initialize ATA controller. */ 145 int ata_ctrl_init(ata_ctrl_t *ctrl, ata_base_t *res)145 errno_t ata_ctrl_init(ata_ctrl_t *ctrl, ata_base_t *res) 146 146 { 147 147 int i; 148 int rc;148 errno_t rc; 149 149 int n_disks; 150 150 … … 209 209 210 210 /** Remove ATA controller. */ 211 int ata_ctrl_remove(ata_ctrl_t *ctrl)211 errno_t ata_ctrl_remove(ata_ctrl_t *ctrl) 212 212 { 213 213 int i; 214 int rc;214 errno_t rc; 215 215 216 216 ddf_msg(LVL_DEBUG, ": ata_ctrl_remove()"); … … 234 234 235 235 /** Surprise removal of ATA controller. */ 236 int ata_ctrl_gone(ata_ctrl_t *ctrl)236 errno_t ata_ctrl_gone(ata_ctrl_t *ctrl) 237 237 { 238 238 int i; 239 int rc;239 errno_t rc; 240 240 241 241 ddf_msg(LVL_DEBUG, "ata_ctrl_gone()"); … … 308 308 309 309 /** Enable device I/O. */ 310 static int ata_bd_init_io(ata_ctrl_t *ctrl)311 { 312 int rc;310 static errno_t ata_bd_init_io(ata_ctrl_t *ctrl) 311 { 312 errno_t rc; 313 313 void *vaddr; 314 314 … … 344 344 * the disk structure. 345 345 */ 346 static int disk_init(ata_ctrl_t *ctrl, disk_t *d, int disk_id)346 static errno_t disk_init(ata_ctrl_t *ctrl, disk_t *d, int disk_id) 347 347 { 348 348 identify_data_t idata; … … 356 356 size_t block_size; 357 357 size_t pos, len; 358 int rc;358 errno_t rc; 359 359 unsigned i; 360 360 … … 498 498 } 499 499 500 static int ata_bd_open(bd_srvs_t *bds, bd_srv_t *bd)501 { 502 return EOK; 503 } 504 505 static int ata_bd_close(bd_srv_t *bd)500 static errno_t ata_bd_open(bd_srvs_t *bds, bd_srv_t *bd) 501 { 502 return EOK; 503 } 504 505 static errno_t ata_bd_close(bd_srv_t *bd) 506 506 { 507 507 return EOK; … … 509 509 510 510 /** Read multiple blocks from the device. */ 511 static int ata_bd_read_blocks(bd_srv_t *bd, uint64_t ba, size_t cnt,511 static errno_t ata_bd_read_blocks(bd_srv_t *bd, uint64_t ba, size_t cnt, 512 512 void *buf, size_t size) 513 513 { 514 514 disk_t *disk = bd_srv_disk(bd); 515 int rc;515 errno_t rc; 516 516 517 517 if (size < cnt * disk->block_size) … … 538 538 539 539 /** Read TOC from device. */ 540 static int ata_bd_read_toc(bd_srv_t *bd, uint8_t session, void *buf, size_t size)540 static errno_t ata_bd_read_toc(bd_srv_t *bd, uint8_t session, void *buf, size_t size) 541 541 { 542 542 disk_t *disk = bd_srv_disk(bd); … … 546 546 547 547 /** Write multiple blocks to the device. */ 548 static int ata_bd_write_blocks(bd_srv_t *bd, uint64_t ba, size_t cnt,548 static errno_t ata_bd_write_blocks(bd_srv_t *bd, uint64_t ba, size_t cnt, 549 549 const void *buf, size_t size) 550 550 { 551 551 disk_t *disk = bd_srv_disk(bd); 552 int rc;552 errno_t rc; 553 553 554 554 if (disk->dev_type != ata_reg_dev) … … 572 572 573 573 /** Get device block size. */ 574 static int ata_bd_get_block_size(bd_srv_t *bd, size_t *rbsize)574 static errno_t ata_bd_get_block_size(bd_srv_t *bd, size_t *rbsize) 575 575 { 576 576 disk_t *disk = bd_srv_disk(bd); … … 581 581 582 582 /** Get device number of blocks. */ 583 static int ata_bd_get_num_blocks(bd_srv_t *bd, aoff64_t *rnb)583 static errno_t ata_bd_get_num_blocks(bd_srv_t *bd, aoff64_t *rnb) 584 584 { 585 585 disk_t *disk = bd_srv_disk(bd); … … 590 590 591 591 /** Flush cache. */ 592 static int ata_bd_sync_cache(bd_srv_t *bd, uint64_t ba, size_t cnt)592 static errno_t ata_bd_sync_cache(bd_srv_t *bd, uint64_t ba, size_t cnt) 593 593 { 594 594 disk_t *disk = bd_srv_disk(bd); … … 602 602 603 603 /** PIO data-in command protocol. */ 604 static int ata_pio_data_in(disk_t *disk, void *obuf, size_t obuf_size,604 static errno_t ata_pio_data_in(disk_t *disk, void *obuf, size_t obuf_size, 605 605 size_t blk_size, size_t nblocks) 606 606 { … … 633 633 634 634 /** PIO data-out command protocol. */ 635 static int ata_pio_data_out(disk_t *disk, const void *buf, size_t buf_size,635 static errno_t ata_pio_data_out(disk_t *disk, const void *buf, size_t buf_size, 636 636 size_t blk_size, size_t nblocks) 637 637 { … … 662 662 663 663 /** PIO non-data command protocol. */ 664 static int ata_pio_nondata(disk_t *disk)664 static errno_t ata_pio_nondata(disk_t *disk) 665 665 { 666 666 ata_ctrl_t *ctrl = disk->ctrl; … … 687 687 * not present). EIO if device responds with error. 688 688 */ 689 static int ata_identify_dev(disk_t *disk, void *buf)689 static errno_t ata_identify_dev(disk_t *disk, void *buf) 690 690 { 691 691 ata_ctrl_t *ctrl = disk->ctrl; … … 739 739 * @param buf Pointer to a 512-byte buffer. 740 740 */ 741 static int ata_identify_pkt_dev(disk_t *disk, void *buf)741 static errno_t ata_identify_pkt_dev(disk_t *disk, void *buf) 742 742 { 743 743 ata_ctrl_t *ctrl = disk->ctrl; … … 772 772 * @return EOK on success, EIO on error. 773 773 */ 774 static int ata_cmd_packet(disk_t *disk, const void *cpkt, size_t cpkt_size,774 static errno_t ata_cmd_packet(disk_t *disk, const void *cpkt, size_t cpkt_size, 775 775 void *obuf, size_t obuf_size, size_t *rcvd_size) 776 776 { … … 860 860 * @return EOK on success, EIO on error. 861 861 */ 862 static int ata_pcmd_inquiry(disk_t *disk, void *obuf, size_t obuf_size,862 static errno_t ata_pcmd_inquiry(disk_t *disk, void *obuf, size_t obuf_size, 863 863 size_t *rcvd_size) 864 864 { 865 865 uint8_t cpb[12]; 866 866 scsi_cdb_inquiry_t *cp = (scsi_cdb_inquiry_t *)cpb; 867 int rc;867 errno_t rc; 868 868 869 869 memset(cpb, 0, sizeof(cpb)); … … 893 893 * @return EOK on success, EIO on error. 894 894 */ 895 static int ata_pcmd_read_capacity(disk_t *disk, uint64_t *nblocks,895 static errno_t ata_pcmd_read_capacity(disk_t *disk, uint64_t *nblocks, 896 896 size_t *block_size) 897 897 { … … 899 899 scsi_read_capacity_10_data_t data; 900 900 size_t rsize; 901 int rc;901 errno_t rc; 902 902 903 903 memset(&cdb, 0, sizeof(cdb)); … … 930 930 * @return EOK on success, EIO on error. 931 931 */ 932 static int ata_pcmd_read_12(disk_t *disk, uint64_t ba, size_t cnt,932 static errno_t ata_pcmd_read_12(disk_t *disk, uint64_t ba, size_t cnt, 933 933 void *obuf, size_t obuf_size) 934 934 { 935 935 scsi_cdb_read_12_t cp; 936 int rc;936 errno_t rc; 937 937 938 938 if (ba > UINT32_MAX) … … 969 969 * @return EOK on success, EIO on error. 970 970 */ 971 static int ata_pcmd_read_toc(disk_t *disk, uint8_t session, void *obuf,971 static errno_t ata_pcmd_read_toc(disk_t *disk, uint8_t session, void *obuf, 972 972 size_t obuf_size) 973 973 { 974 974 uint8_t cpb[12]; 975 975 scsi_cdb_read_toc_t *cp = (scsi_cdb_read_toc_t *)cpb; 976 int rc;976 errno_t rc; 977 977 978 978 memset(cpb, 0, sizeof(cpb)); … … 1001 1001 * @return EOK on success, EIO on error. 1002 1002 */ 1003 static int ata_rcmd_read(disk_t *disk, uint64_t ba, size_t blk_cnt,1003 static errno_t ata_rcmd_read(disk_t *disk, uint64_t ba, size_t blk_cnt, 1004 1004 void *buf) 1005 1005 { … … 1007 1007 uint8_t drv_head; 1008 1008 block_coord_t bc; 1009 int rc;1009 errno_t rc; 1010 1010 1011 1011 /* Silence warning. */ … … 1061 1061 * @return EOK on success, EIO on error. 1062 1062 */ 1063 static int ata_rcmd_write(disk_t *disk, uint64_t ba, size_t cnt,1063 static errno_t ata_rcmd_write(disk_t *disk, uint64_t ba, size_t cnt, 1064 1064 const void *buf) 1065 1065 { … … 1067 1067 uint8_t drv_head; 1068 1068 block_coord_t bc; 1069 int rc;1069 errno_t rc; 1070 1070 1071 1071 /* Silence warning. */ … … 1117 1117 * @return EOK on success, EIO on error. 1118 1118 */ 1119 static int ata_rcmd_flush_cache(disk_t *disk)1119 static errno_t ata_rcmd_flush_cache(disk_t *disk) 1120 1120 { 1121 1121 ata_ctrl_t *ctrl = disk->ctrl; 1122 1122 uint8_t drv_head; 1123 int rc;1123 errno_t rc; 1124 1124 1125 1125 /* New value for Drive/Head register */ … … 1159 1159 * @return EOK on success or EINVAL if block index is past end of device. 1160 1160 */ 1161 static int coord_calc(disk_t *d, uint64_t ba, block_coord_t *bc)1161 static errno_t coord_calc(disk_t *d, uint64_t ba, block_coord_t *bc) 1162 1162 { 1163 1163 uint64_t c; … … 1246 1246 * @return EOK on success, EIO on timeout. 1247 1247 */ 1248 static int wait_status(ata_ctrl_t *ctrl, unsigned set, unsigned n_reset,1248 static errno_t wait_status(ata_ctrl_t *ctrl, unsigned set, unsigned n_reset, 1249 1249 uint8_t *pstatus, unsigned timeout) 1250 1250 { -
uspace/drv/block/ata_bd/ata_bd.h
r132ab5d1 r5a6cc679 153 153 } ata_fun_t; 154 154 155 extern int ata_ctrl_init(ata_ctrl_t *, ata_base_t *);156 extern int ata_ctrl_remove(ata_ctrl_t *);157 extern int ata_ctrl_gone(ata_ctrl_t *);155 extern errno_t ata_ctrl_init(ata_ctrl_t *, ata_base_t *); 156 extern errno_t ata_ctrl_remove(ata_ctrl_t *); 157 extern errno_t ata_ctrl_gone(ata_ctrl_t *); 158 158 159 159 extern bd_ops_t ata_bd_ops; -
uspace/drv/block/ata_bd/main.c
r132ab5d1 r5a6cc679 41 41 #include "main.h" 42 42 43 static int ata_dev_add(ddf_dev_t *dev);44 static int ata_dev_remove(ddf_dev_t *dev);45 static int ata_dev_gone(ddf_dev_t *dev);46 static int ata_fun_online(ddf_fun_t *fun);47 static int ata_fun_offline(ddf_fun_t *fun);43 static errno_t ata_dev_add(ddf_dev_t *dev); 44 static errno_t ata_dev_remove(ddf_dev_t *dev); 45 static errno_t ata_dev_gone(ddf_dev_t *dev); 46 static errno_t ata_fun_online(ddf_fun_t *fun); 47 static errno_t ata_fun_offline(ddf_fun_t *fun); 48 48 49 49 static void ata_bd_connection(ipc_callid_t, ipc_call_t *, void *); … … 62 62 }; 63 63 64 static int ata_get_res(ddf_dev_t *dev, ata_base_t *ata_res)64 static errno_t ata_get_res(ddf_dev_t *dev, ata_base_t *ata_res) 65 65 { 66 66 async_sess_t *parent_sess; 67 67 hw_res_list_parsed_t hw_res; 68 int rc;68 errno_t rc; 69 69 70 70 parent_sess = ddf_dev_parent_sess_get(dev); … … 108 108 * @return EOK on success or an error code. 109 109 */ 110 static int ata_dev_add(ddf_dev_t *dev)110 static errno_t ata_dev_add(ddf_dev_t *dev) 111 111 { 112 112 ata_ctrl_t *ctrl; 113 113 ata_base_t res; 114 int rc;114 errno_t rc; 115 115 116 116 rc = ata_get_res(dev, &res); … … 151 151 } 152 152 153 int ata_fun_create(disk_t *disk)153 errno_t ata_fun_create(disk_t *disk) 154 154 { 155 155 ata_ctrl_t *ctrl = disk->ctrl; 156 int rc;156 errno_t rc; 157 157 char *fun_name = NULL; 158 158 ddf_fun_t *fun = NULL; … … 212 212 } 213 213 214 int ata_fun_remove(disk_t *disk)215 { 216 int rc;214 errno_t ata_fun_remove(disk_t *disk) 215 { 216 errno_t rc; 217 217 char *fun_name; 218 218 … … 250 250 } 251 251 252 int ata_fun_unbind(disk_t *disk)253 { 254 int rc;252 errno_t ata_fun_unbind(disk_t *disk) 253 { 254 errno_t rc; 255 255 char *fun_name; 256 256 … … 282 282 } 283 283 284 static int ata_dev_remove(ddf_dev_t *dev)284 static errno_t ata_dev_remove(ddf_dev_t *dev) 285 285 { 286 286 ata_ctrl_t *ctrl = (ata_ctrl_t *)ddf_dev_data_get(dev); … … 291 291 } 292 292 293 static int ata_dev_gone(ddf_dev_t *dev)293 static errno_t ata_dev_gone(ddf_dev_t *dev) 294 294 { 295 295 ata_ctrl_t *ctrl = (ata_ctrl_t *)ddf_dev_data_get(dev); … … 300 300 } 301 301 302 static int ata_fun_online(ddf_fun_t *fun)302 static errno_t ata_fun_online(ddf_fun_t *fun) 303 303 { 304 304 ddf_msg(LVL_DEBUG, "ata_fun_online()"); … … 306 306 } 307 307 308 static int ata_fun_offline(ddf_fun_t *fun)308 static errno_t ata_fun_offline(ddf_fun_t *fun) 309 309 { 310 310 ddf_msg(LVL_DEBUG, "ata_fun_offline()"); -
uspace/drv/block/ata_bd/main.h
r132ab5d1 r5a6cc679 38 38 #include "ata_bd.h" 39 39 40 extern int ata_fun_create(disk_t *);41 extern int ata_fun_remove(disk_t *);42 extern int ata_fun_unbind(disk_t *);40 extern errno_t ata_fun_create(disk_t *); 41 extern errno_t ata_fun_remove(disk_t *); 42 extern errno_t ata_fun_unbind(disk_t *); 43 43 44 44 #endif -
uspace/drv/block/ddisk/ddisk.c
r132ab5d1 r5a6cc679 56 56 #define DDISK_CMD_IRQ_DEASSERT 0x4 57 57 58 static int ddisk_dev_add(ddf_dev_t *);59 static int ddisk_dev_remove(ddf_dev_t *);60 static int ddisk_dev_gone(ddf_dev_t *);61 static int ddisk_fun_online(ddf_fun_t *);62 static int ddisk_fun_offline(ddf_fun_t *);58 static errno_t ddisk_dev_add(ddf_dev_t *); 59 static errno_t ddisk_dev_remove(ddf_dev_t *); 60 static errno_t ddisk_dev_gone(ddf_dev_t *); 61 static errno_t ddisk_fun_online(ddf_fun_t *); 62 static errno_t ddisk_fun_offline(ddf_fun_t *); 63 63 64 64 static void ddisk_bd_connection(ipc_callid_t, ipc_call_t *, void *); … … 117 117 } ddisk_t; 118 118 119 static int ddisk_bd_open(bd_srvs_t *, bd_srv_t *);120 static int ddisk_bd_close(bd_srv_t *);121 static int ddisk_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *, size_t);122 static int ddisk_bd_write_blocks(bd_srv_t *, aoff64_t, size_t, const void *,119 static errno_t ddisk_bd_open(bd_srvs_t *, bd_srv_t *); 120 static errno_t ddisk_bd_close(bd_srv_t *); 121 static errno_t ddisk_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *, size_t); 122 static errno_t ddisk_bd_write_blocks(bd_srv_t *, aoff64_t, size_t, const void *, 123 123 size_t); 124 static int ddisk_bd_get_block_size(bd_srv_t *, size_t *);125 static int ddisk_bd_get_num_blocks(bd_srv_t *, aoff64_t *);124 static errno_t ddisk_bd_get_block_size(bd_srv_t *, size_t *); 125 static errno_t ddisk_bd_get_num_blocks(bd_srv_t *, aoff64_t *); 126 126 127 127 bd_ops_t ddisk_bd_ops = { … … 188 188 } 189 189 190 int ddisk_bd_open(bd_srvs_t *bds, bd_srv_t *bd)191 { 192 return EOK; 193 } 194 195 int ddisk_bd_close(bd_srv_t *bd)190 errno_t ddisk_bd_open(bd_srvs_t *bds, bd_srv_t *bd) 191 { 192 return EOK; 193 } 194 195 errno_t ddisk_bd_close(bd_srv_t *bd) 196 196 { 197 197 return EOK; … … 199 199 200 200 static 201 int ddisk_rw_block(ddisk_t *ddisk, bool read, aoff64_t ba, void *buf)201 errno_t ddisk_rw_block(ddisk_t *ddisk, bool read, aoff64_t ba, void *buf) 202 202 { 203 203 fibril_mutex_lock(&ddisk->lock); … … 236 236 237 237 static 238 int ddisk_bd_rw_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt, void *buf,238 errno_t ddisk_bd_rw_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt, void *buf, 239 239 size_t size, bool is_read) 240 240 { 241 241 ddisk_t *ddisk = (ddisk_t *) bd->srvs->sarg; 242 242 aoff64_t i; 243 int rc;243 errno_t rc; 244 244 245 245 if (size < cnt * DDISK_BLOCK_SIZE) … … 256 256 } 257 257 258 int ddisk_bd_read_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt, void *buf,258 errno_t ddisk_bd_read_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt, void *buf, 259 259 size_t size) 260 260 { … … 262 262 } 263 263 264 int ddisk_bd_write_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt,264 errno_t ddisk_bd_write_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt, 265 265 const void *buf, size_t size) 266 266 { … … 268 268 } 269 269 270 int ddisk_bd_get_block_size(bd_srv_t *bd, size_t *rsize)270 errno_t ddisk_bd_get_block_size(bd_srv_t *bd, size_t *rsize) 271 271 { 272 272 *rsize = DDISK_BLOCK_SIZE; … … 274 274 } 275 275 276 int ddisk_bd_get_num_blocks(bd_srv_t *bd, aoff64_t *rnb)276 errno_t ddisk_bd_get_num_blocks(bd_srv_t *bd, aoff64_t *rnb) 277 277 { 278 278 ddisk_t *ddisk = (ddisk_t *) bd->srvs->sarg; … … 282 282 } 283 283 284 static int ddisk_get_res(ddf_dev_t *dev, ddisk_res_t *ddisk_res)284 static errno_t ddisk_get_res(ddf_dev_t *dev, ddisk_res_t *ddisk_res) 285 285 { 286 286 async_sess_t *parent_sess; 287 287 hw_res_list_parsed_t hw_res; 288 int rc;288 errno_t rc; 289 289 290 290 parent_sess = ddf_dev_parent_sess_get(dev); … … 317 317 } 318 318 319 static int ddisk_fun_create(ddisk_t *ddisk)320 { 321 int rc;319 static errno_t ddisk_fun_create(ddisk_t *ddisk) 320 { 321 errno_t rc; 322 322 ddf_fun_t *fun = NULL; 323 323 … … 350 350 } 351 351 352 static int ddisk_fun_remove(ddisk_t *ddisk)353 { 354 int rc;352 static errno_t ddisk_fun_remove(ddisk_t *ddisk) 353 { 354 errno_t rc; 355 355 356 356 if (ddisk->fun == NULL) … … 381 381 } 382 382 383 static int ddisk_fun_unbind(ddisk_t *ddisk)384 { 385 int rc;383 static errno_t ddisk_fun_unbind(ddisk_t *ddisk) 384 { 385 errno_t rc; 386 386 387 387 if (ddisk->fun == NULL) … … 410 410 * @return EOK on success or an error code. 411 411 */ 412 static int ddisk_dev_add(ddf_dev_t *dev)412 static errno_t ddisk_dev_add(ddf_dev_t *dev) 413 413 { 414 414 ddisk_t *ddisk; 415 415 ddisk_res_t res; 416 int rc;416 errno_t rc; 417 417 418 418 /* … … 530 530 531 531 532 static int ddisk_dev_remove_common(ddisk_t *ddisk, bool surprise)533 { 534 int rc;532 static errno_t ddisk_dev_remove_common(ddisk_t *ddisk, bool surprise) 533 { 534 errno_t rc; 535 535 536 536 if (!surprise) … … 558 558 } 559 559 560 static int ddisk_dev_remove(ddf_dev_t *dev)560 static errno_t ddisk_dev_remove(ddf_dev_t *dev) 561 561 { 562 562 ddisk_t *ddisk = (ddisk_t *) ddf_dev_data_get(dev); … … 566 566 } 567 567 568 static int ddisk_dev_gone(ddf_dev_t *dev)568 static errno_t ddisk_dev_gone(ddf_dev_t *dev) 569 569 { 570 570 ddisk_t *ddisk = (ddisk_t *) ddf_dev_data_get(dev); … … 574 574 } 575 575 576 static int ddisk_fun_online(ddf_fun_t *fun)576 static errno_t ddisk_fun_online(ddf_fun_t *fun) 577 577 { 578 578 ddf_msg(LVL_DEBUG, "ddisk_fun_online()"); … … 580 580 } 581 581 582 static int ddisk_fun_offline(ddf_fun_t *fun)582 static errno_t ddisk_fun_offline(ddf_fun_t *fun) 583 583 { 584 584 ddf_msg(LVL_DEBUG, "ddisk_fun_offline()"); -
uspace/drv/block/usbmast/bo_trans.c
r132ab5d1 r5a6cc679 58 58 * @return Error code 59 59 */ 60 int usb_massstor_cmd(usbmast_fun_t *mfun, uint32_t tag, scsi_cmd_t *cmd)61 { 62 int rc;60 errno_t usb_massstor_cmd(usbmast_fun_t *mfun, uint32_t tag, scsi_cmd_t *cmd) 61 { 62 errno_t rc; 63 63 64 64 if (cmd->data_in && cmd->data_out) … … 192 192 * @return Error code 193 193 */ 194 int usb_massstor_reset(usbmast_dev_t *mdev)194 errno_t usb_massstor_reset(usbmast_dev_t *mdev) 195 195 { 196 196 return usb_control_request_set( … … 234 234 uint8_t max_lun; 235 235 size_t data_recv_len; 236 int rc = usb_control_request_get(236 errno_t rc = usb_control_request_get( 237 237 usb_device_get_default_pipe(mdev->usb_dev), 238 238 USB_REQUEST_TYPE_CLASS, USB_REQUEST_RECIPIENT_INTERFACE, -
uspace/drv/block/usbmast/bo_trans.h
r132ab5d1 r5a6cc679 86 86 } scsi_cmd_t; 87 87 88 extern int usb_massstor_cmd(usbmast_fun_t *, uint32_t, scsi_cmd_t *);89 extern int usb_massstor_reset(usbmast_dev_t *);88 extern errno_t usb_massstor_cmd(usbmast_fun_t *, uint32_t, scsi_cmd_t *); 89 extern errno_t usb_massstor_reset(usbmast_dev_t *); 90 90 extern void usb_massstor_reset_recovery(usbmast_dev_t *); 91 91 extern int usb_massstor_get_max_lun(usbmast_dev_t *); -
uspace/drv/block/usbmast/main.c
r132ab5d1 r5a6cc679 77 77 }; 78 78 79 static int usbmast_fun_create(usbmast_dev_t *mdev, unsigned lun);79 static errno_t usbmast_fun_create(usbmast_dev_t *mdev, unsigned lun); 80 80 static void usbmast_bd_connection(ipc_callid_t iid, ipc_call_t *icall, 81 81 void *arg); 82 82 83 static int usbmast_bd_open(bd_srvs_t *, bd_srv_t *);84 static int usbmast_bd_close(bd_srv_t *);85 static int usbmast_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *, size_t);86 static int usbmast_bd_sync_cache(bd_srv_t *, aoff64_t, size_t);87 static int usbmast_bd_write_blocks(bd_srv_t *, aoff64_t, size_t, const void *, size_t);88 static int usbmast_bd_get_block_size(bd_srv_t *, size_t *);89 static int usbmast_bd_get_num_blocks(bd_srv_t *, aoff64_t *);83 static errno_t usbmast_bd_open(bd_srvs_t *, bd_srv_t *); 84 static errno_t usbmast_bd_close(bd_srv_t *); 85 static errno_t usbmast_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *, size_t); 86 static errno_t usbmast_bd_sync_cache(bd_srv_t *, aoff64_t, size_t); 87 static errno_t usbmast_bd_write_blocks(bd_srv_t *, aoff64_t, size_t, const void *, size_t); 88 static errno_t usbmast_bd_get_block_size(bd_srv_t *, size_t *); 89 static errno_t usbmast_bd_get_num_blocks(bd_srv_t *, aoff64_t *); 90 90 91 91 static bd_ops_t usbmast_bd_ops = { … … 109 109 * @return Error code. 110 110 */ 111 static int usbmast_device_gone(usb_device_t *dev)111 static errno_t usbmast_device_gone(usb_device_t *dev) 112 112 { 113 113 usbmast_dev_t *mdev = usb_device_data_get(dev); … … 115 115 116 116 for (size_t i = 0; i < mdev->lun_count; ++i) { 117 const int rc = ddf_fun_unbind(mdev->luns[i]);117 const errno_t rc = ddf_fun_unbind(mdev->luns[i]); 118 118 if (rc != EOK) { 119 119 usb_log_error("Failed to unbind LUN function %zu: " … … 133 133 * @return Error code. 134 134 */ 135 static int usbmast_device_remove(usb_device_t *dev)135 static errno_t usbmast_device_remove(usb_device_t *dev) 136 136 { 137 137 //TODO: flush buffers, or whatever. … … 145 145 * @return Error code. 146 146 */ 147 static int usbmast_device_add(usb_device_t *dev)148 { 149 int rc;147 static errno_t usbmast_device_add(usb_device_t *dev) 148 { 149 errno_t rc; 150 150 usbmast_dev_t *mdev = NULL; 151 151 unsigned i; … … 198 198 if (mdev->luns[i] == NULL) 199 199 continue; 200 const int rc = ddf_fun_unbind(mdev->luns[i]);200 const errno_t rc = ddf_fun_unbind(mdev->luns[i]); 201 201 if (rc != EOK) { 202 202 usb_log_warning("Failed to unbind LUN function %zu: " … … 217 217 * @return EOK on success or an error code. 218 218 */ 219 static int usbmast_fun_create(usbmast_dev_t *mdev, unsigned lun)220 { 221 int rc;219 static errno_t usbmast_fun_create(usbmast_dev_t *mdev, unsigned lun) 220 { 221 errno_t rc; 222 222 char *fun_name = NULL; 223 223 ddf_fun_t *fun = NULL; … … 326 326 327 327 /** Open device. */ 328 static int usbmast_bd_open(bd_srvs_t *bds, bd_srv_t *bd)328 static errno_t usbmast_bd_open(bd_srvs_t *bds, bd_srv_t *bd) 329 329 { 330 330 return EOK; … … 332 332 333 333 /** Close device. */ 334 static int usbmast_bd_close(bd_srv_t *bd)334 static errno_t usbmast_bd_close(bd_srv_t *bd) 335 335 { 336 336 return EOK; … … 338 338 339 339 /** Read blocks from the device. */ 340 static int usbmast_bd_read_blocks(bd_srv_t *bd, uint64_t ba, size_t cnt, void *buf,340 static errno_t usbmast_bd_read_blocks(bd_srv_t *bd, uint64_t ba, size_t cnt, void *buf, 341 341 size_t size) 342 342 { … … 350 350 351 351 /** Synchronize blocks to nonvolatile storage. */ 352 static int usbmast_bd_sync_cache(bd_srv_t *bd, uint64_t ba, size_t cnt)352 static errno_t usbmast_bd_sync_cache(bd_srv_t *bd, uint64_t ba, size_t cnt) 353 353 { 354 354 usbmast_fun_t *mfun = bd_srv_usbmast(bd); … … 358 358 359 359 /** Write blocks to the device. */ 360 static int usbmast_bd_write_blocks(bd_srv_t *bd, uint64_t ba, size_t cnt,360 static errno_t usbmast_bd_write_blocks(bd_srv_t *bd, uint64_t ba, size_t cnt, 361 361 const void *buf, size_t size) 362 362 { … … 370 370 371 371 /** Get device block size. */ 372 static int usbmast_bd_get_block_size(bd_srv_t *bd, size_t *rsize)372 static errno_t usbmast_bd_get_block_size(bd_srv_t *bd, size_t *rsize) 373 373 { 374 374 usbmast_fun_t *mfun = bd_srv_usbmast(bd); … … 378 378 379 379 /** Get number of blocks on device. */ 380 static int usbmast_bd_get_num_blocks(bd_srv_t *bd, aoff64_t *rnb)380 static errno_t usbmast_bd_get_num_blocks(bd_srv_t *bd, aoff64_t *rnb) 381 381 { 382 382 usbmast_fun_t *mfun = bd_srv_usbmast(bd); -
uspace/drv/block/usbmast/scsi_ms.c
r132ab5d1 r5a6cc679 72 72 } 73 73 74 static int usb_massstor_unit_ready(usbmast_fun_t *mfun)74 static errno_t usb_massstor_unit_ready(usbmast_fun_t *mfun) 75 75 { 76 76 scsi_cmd_t cmd; 77 77 scsi_cdb_test_unit_ready_t cdb; 78 int rc;78 errno_t rc; 79 79 80 80 memset(&cdb, 0, sizeof(cdb)); … … 107 107 * XXX This is too simplified. 108 108 */ 109 static int usbmast_run_cmd(usbmast_fun_t *mfun, scsi_cmd_t *cmd)109 static errno_t usbmast_run_cmd(usbmast_fun_t *mfun, scsi_cmd_t *cmd) 110 110 { 111 111 uint8_t sense_key; 112 112 scsi_sense_data_t sense_buf; 113 int rc;113 errno_t rc; 114 114 115 115 do { … … 162 162 * @return Error code 163 163 */ 164 int usbmast_inquiry(usbmast_fun_t *mfun, usbmast_inquiry_data_t *inq_res)164 errno_t usbmast_inquiry(usbmast_fun_t *mfun, usbmast_inquiry_data_t *inq_res) 165 165 { 166 166 scsi_std_inquiry_data_t inq_data; 167 167 scsi_cmd_t cmd; 168 168 scsi_cdb_inquiry_t cdb; 169 int rc;169 errno_t rc; 170 170 171 171 memset(&cdb, 0, sizeof(cdb)); … … 231 231 * @return Error code. 232 232 */ 233 int usbmast_request_sense(usbmast_fun_t *mfun, void *buf, size_t size)233 errno_t usbmast_request_sense(usbmast_fun_t *mfun, void *buf, size_t size) 234 234 { 235 235 scsi_cmd_t cmd; 236 236 scsi_cdb_request_sense_t cdb; 237 int rc;237 errno_t rc; 238 238 239 239 memset(&cdb, 0, sizeof(cdb)); … … 272 272 * @return Error code. 273 273 */ 274 int usbmast_read_capacity(usbmast_fun_t *mfun, uint32_t *nblocks,274 errno_t usbmast_read_capacity(usbmast_fun_t *mfun, uint32_t *nblocks, 275 275 uint32_t *block_size) 276 276 { … … 278 278 scsi_cdb_read_capacity_10_t cdb; 279 279 scsi_read_capacity_10_data_t data; 280 int rc;280 errno_t rc; 281 281 282 282 memset(&cdb, 0, sizeof(cdb)); … … 323 323 * @return Error code 324 324 */ 325 int usbmast_read(usbmast_fun_t *mfun, uint64_t ba, size_t nblocks, void *buf)325 errno_t usbmast_read(usbmast_fun_t *mfun, uint64_t ba, size_t nblocks, void *buf) 326 326 { 327 327 scsi_cmd_t cmd; 328 328 scsi_cdb_read_10_t cdb; 329 int rc;329 errno_t rc; 330 330 331 331 if (ba > UINT32_MAX) … … 378 378 * @return Error code 379 379 */ 380 int usbmast_write(usbmast_fun_t *mfun, uint64_t ba, size_t nblocks,380 errno_t usbmast_write(usbmast_fun_t *mfun, uint64_t ba, size_t nblocks, 381 381 const void *data) 382 382 { 383 383 scsi_cmd_t cmd; 384 384 scsi_cdb_write_10_t cdb; 385 int rc;385 errno_t rc; 386 386 387 387 if (ba > UINT32_MAX) … … 428 428 * @return Error code 429 429 */ 430 int usbmast_sync_cache(usbmast_fun_t *mfun, uint64_t ba, size_t nblocks)430 errno_t usbmast_sync_cache(usbmast_fun_t *mfun, uint64_t ba, size_t nblocks) 431 431 { 432 432 if (ba > UINT32_MAX) … … 447 447 }; 448 448 449 const int rc = usbmast_run_cmd(mfun, &cmd);449 const errno_t rc = usbmast_run_cmd(mfun, &cmd); 450 450 451 451 if (rc != EOK) { -
uspace/drv/block/usbmast/scsi_ms.h
r132ab5d1 r5a6cc679 60 60 } usbmast_inquiry_data_t; 61 61 62 extern int usbmast_inquiry(usbmast_fun_t *, usbmast_inquiry_data_t *);63 extern int usbmast_request_sense(usbmast_fun_t *, void *, size_t);64 extern int usbmast_read_capacity(usbmast_fun_t *, uint32_t *, uint32_t *);65 extern int usbmast_read(usbmast_fun_t *, uint64_t, size_t, void *);66 extern int usbmast_write(usbmast_fun_t *, uint64_t, size_t, const void *);67 extern int usbmast_sync_cache(usbmast_fun_t *, uint64_t, size_t);62 extern errno_t usbmast_inquiry(usbmast_fun_t *, usbmast_inquiry_data_t *); 63 extern errno_t usbmast_request_sense(usbmast_fun_t *, void *, size_t); 64 extern errno_t usbmast_read_capacity(usbmast_fun_t *, uint32_t *, uint32_t *); 65 extern errno_t usbmast_read(usbmast_fun_t *, uint64_t, size_t, void *); 66 extern errno_t usbmast_write(usbmast_fun_t *, uint64_t, size_t, const void *); 67 extern errno_t usbmast_sync_cache(usbmast_fun_t *, uint64_t, size_t); 68 68 extern const char *usbmast_scsi_dev_type_str(unsigned); 69 69
Note:
See TracChangeset
for help on using the changeset viewer.
