Changeset 1433ecda in mainline for uspace/drv/block/ata_bd
- 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
- File:
-
- 1 edited
-
uspace/drv/block/ata_bd/ata_bd.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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);
Note:
See TracChangeset
for help on using the changeset viewer.
