Changeset 83062ff in mainline
- Timestamp:
- 2014-09-12T05:30:31Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fa65df1
- Parents:
- c53b58e
- Location:
- uspace/drv/bus/usb/usbmast
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbmast/bo_trans.h
rc53b58e r83062ff 60 60 61 61 /** Command Descriptor Block */ 62 void *cdb;62 const void *cdb; 63 63 /** CDB size in bytes */ 64 64 size_t cdb_size; -
uspace/drv/bus/usb/usbmast/scsi_ms.c
rc53b58e r83062ff 394 394 int usbmast_sync_cache(usbmast_fun_t *mfun, uint64_t ba, size_t nblocks) 395 395 { 396 scsi_cmd_t cmd;397 scsi_cdb_sync_cache_10_t cdb;398 int rc;399 400 396 if (ba > UINT32_MAX) 401 397 return ELIMIT; … … 404 400 return ELIMIT; 405 401 406 memset(&cdb, 0, sizeof(cdb)); 407 cdb.op_code = SCSI_CMD_SYNC_CACHE_10; 408 cdb.lba = host2uint32_t_be(ba); 409 cdb.numlb = host2uint16_t_be(nblocks); 410 411 memset(&cmd, 0, sizeof(cmd)); 412 cmd.cdb = &cdb; 413 cmd.cdb_size = sizeof(cdb); 414 415 rc = usbmast_run_cmd(mfun, &cmd); 402 const scsi_cdb_sync_cache_10_t cdb = { 403 .op_code = SCSI_CMD_SYNC_CACHE_10, 404 .lba = host2uint32_t_be(ba), 405 .numlb = host2uint16_t_be(nblocks), 406 }; 407 408 scsi_cmd_t cmd = { 409 .cdb = &cdb, 410 .cdb_size = sizeof(cdb), 411 }; 412 413 const int rc = usbmast_run_cmd(mfun, &cmd); 416 414 417 415 if (rc != EOK) {
Note:
See TracChangeset
for help on using the changeset viewer.