Changeset 1433ecda in mainline for uspace/drv/block
- Timestamp:
- 2018-04-04T15:42:37Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2c4e1cc
- Parents:
- 47b2d7e3
- Location:
- uspace/drv/block
- Files:
-
- 5 edited
-
ahci/ahci.c (modified) (2 diffs)
-
ata_bd/ata_bd.c (modified) (6 diffs)
-
usbmast/bo_trans.c (modified) (2 diffs)
-
usbmast/main.c (modified) (1 diff)
-
usbmast/scsi_ms.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/block/ahci/ahci.c
r47b2d7e3 r1433ecda 978 978 sata->cmd_header->cmdtableu = HI(phys); 979 979 sata->cmd_header->cmdtable = LO(phys); 980 sata->cmd_table = (uint32_t *) virt_table;980 sata->cmd_table = (uint32_t *) virt_table; 981 981 982 982 return sata; … … 1076 1076 fibril_mutex_unlock(&sata_devices_count_lock); 1077 1077 1078 rc = ddf_fun_set_name(sata->fun, sata_dev_name);1078 rc = ddf_fun_set_name(sata->fun, sata_dev_name); 1079 1079 if (rc != EOK) { 1080 1080 ddf_msg(LVL_ERROR, "Failed setting function name."); -
uspace/drv/block/ata_bd/ata_bd.c
r47b2d7e3 r1433ecda 428 428 429 429 d->blocks = 430 (uint32_t) idata.total_lba28_0 |430 (uint32_t) idata.total_lba28_0 | 431 431 ((uint32_t) idata.total_lba28_1 << 16); 432 432 } else { … … 439 439 440 440 d->blocks = 441 (uint64_t) idata.total_lba48_0 |441 (uint64_t) idata.total_lba48_0 | 442 442 ((uint64_t) idata.total_lba48_1 << 16) | 443 443 ((uint64_t) idata.total_lba48_2 << 32) | … … 461 461 for (i = 0; i < len; ++i) { 462 462 c = model[i]; 463 if (c >= 0x80) c = '?'; 463 if (c >= 0x80) 464 c = '?'; 464 465 465 466 chr_encode(c, d->model, &pos, 40); … … 795 796 pio_write_8(&ctrl->cmd->drive_head, drv_head); 796 797 797 if (wait_status(ctrl, 0, ~(SR_BSY |SR_DRQ), NULL, TIMEOUT_BSY) != EOK) {798 if (wait_status(ctrl, 0, ~(SR_BSY | SR_DRQ), NULL, TIMEOUT_BSY) != EOK) { 798 799 fibril_mutex_unlock(&ctrl->lock); 799 800 return EIO; … … 1263 1264 while ((status & ~n_reset) != 0 || (status & set) != set) { 1264 1265 --cnt; 1265 if (cnt <= 0) break; 1266 if (cnt <= 0) 1267 break; 1266 1268 1267 1269 status = pio_read_8(&ctrl->cmd->status); … … 1272 1274 async_usleep(10000); 1273 1275 --cnt; 1274 if (cnt <= 0) break; 1276 if (cnt <= 0) 1277 break; 1275 1278 1276 1279 status = pio_read_8(&ctrl->cmd->status); -
uspace/drv/block/usbmast/bo_trans.c
r47b2d7e3 r1433ecda 116 116 usb_pipe_clear_halt( 117 117 usb_device_get_default_pipe(mfun->mdev->usb_dev), dpipe); 118 } else if (rc != EOK) {118 } else if (rc != EOK) { 119 119 usb_log_error("Failed to transfer data: %s", str_error(rc)); 120 120 return EIO; … … 141 141 if (csw.dCSWTag != tag) { 142 142 usb_log_error("Received CSW with incorrect tag. (expected: %" 143 PRIX32 " received: %"PRIx32, tag, csw.dCSWTag);143 PRIX32 " received: %" PRIx32, tag, csw.dCSWTag); 144 144 return EIO; 145 145 } -
uspace/drv/block/usbmast/main.c
r47b2d7e3 r1433ecda 179 179 usb_log_debug("Get LUN count..."); 180 180 mdev->lun_count = usb_masstor_get_lun_count(mdev); 181 mdev->luns = calloc(mdev->lun_count, sizeof(ddf_fun_t *));181 mdev->luns = calloc(mdev->lun_count, sizeof(ddf_fun_t *)); 182 182 if (mdev->luns == NULL) { 183 183 usb_log_error("Failed allocating luns table."); -
uspace/drv/block/usbmast/scsi_ms.c
r47b2d7e3 r1433ecda 196 196 if (cmd.rcvd_size < SCSI_STD_INQUIRY_DATA_MIN_SIZE) { 197 197 usb_log_error("SCSI Inquiry response too short (%zu).", 198 cmd.rcvd_size);198 cmd.rcvd_size); 199 199 return EIO; 200 200 } … … 306 306 if (cmd.rcvd_size < sizeof(data)) { 307 307 usb_log_error("SCSI Read Capacity response too short (%zu).", 308 cmd.rcvd_size);308 cmd.rcvd_size); 309 309 return EIO; 310 310 } … … 349 349 rc = usbmast_run_cmd(mfun, &cmd); 350 350 351 if (rc != EOK) {351 if (rc != EOK) { 352 352 usb_log_error("Read (10) transport failed, device %s: %s.", 353 353 usb_device_get_name(mfun->mdev->usb_dev), str_error(rc));
Note:
See TracChangeset
for help on using the changeset viewer.
