/drivers/usb/storage/ |
D | uas.c | 45 struct scsi_cmnd *cmnd[MAX_CMNDS]; member 76 static int uas_submit_urbs(struct scsi_cmnd *cmnd, 79 static int uas_try_complete(struct scsi_cmnd *cmnd, const char *caller); 81 static void uas_log_cmd_state(struct scsi_cmnd *cmnd, const char *prefix, 102 struct scsi_cmnd *cmnd; in uas_do_work() local 112 if (!devinfo->cmnd[i]) in uas_do_work() 115 cmnd = devinfo->cmnd[i]; in uas_do_work() 116 cmdinfo = (void *)&cmnd->SCp; in uas_do_work() 121 err = uas_submit_urbs(cmnd, cmnd->device->hostdata); in uas_do_work() 145 struct scsi_cmnd *cmnd = container_of(scp, struct scsi_cmnd, SCp); in uas_add_work() local [all …]
|
D | cypress_atacb.c | 77 if (likely(srb->cmnd[0] != ATA_16 && srb->cmnd[0] != ATA_12)) { in cypress_atacb_passthrough() 82 memcpy(save_cmnd, srb->cmnd, sizeof(save_cmnd)); in cypress_atacb_passthrough() 83 memset(srb->cmnd, 0, MAX_COMMAND_SIZE); in cypress_atacb_passthrough() 101 srb->cmnd[0] = 0x24; /* in cypress_atacb_passthrough() 106 srb->cmnd[1] = 0x24; /* bVSCBSubCommand : 0x24 for ATACB */ in cypress_atacb_passthrough() 108 srb->cmnd[3] = 0xff - 1; /* in cypress_atacb_passthrough() 112 srb->cmnd[4] = 1; /* TransferBlockCount : 512 */ in cypress_atacb_passthrough() 115 srb->cmnd[ 6] = save_cmnd[ 4]; /* features */ in cypress_atacb_passthrough() 116 srb->cmnd[ 7] = save_cmnd[ 6]; /* sector count */ in cypress_atacb_passthrough() 117 srb->cmnd[ 8] = save_cmnd[ 8]; /* lba low */ in cypress_atacb_passthrough() [all …]
|
D | jumpshot.c | 387 pc = srb->cmnd[2] >> 6; in jumpshot_handle_mode_sense() 388 page_code = srb->cmnd[2] & 0x3F; in jumpshot_handle_mode_sense() 494 if (srb->cmnd[0] == INQUIRY) { in jumpshot_transport() 501 if (srb->cmnd[0] == READ_CAPACITY) { in jumpshot_transport() 524 if (srb->cmnd[0] == MODE_SELECT_10) { in jumpshot_transport() 529 if (srb->cmnd[0] == READ_10) { in jumpshot_transport() 530 block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) | in jumpshot_transport() 531 ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5])); in jumpshot_transport() 533 blocks = ((u32)(srb->cmnd[7]) << 8) | ((u32)(srb->cmnd[8])); in jumpshot_transport() 540 if (srb->cmnd[0] == READ_12) { in jumpshot_transport() [all …]
|
D | datafab.c | 463 pc = srb->cmnd[2] >> 6; in datafab_handle_mode_sense() 464 page_code = srb->cmnd[2] & 0x3F; in datafab_handle_mode_sense() 569 if (srb->cmnd[0] == INQUIRY) { in datafab_transport() 576 if (srb->cmnd[0] == READ_CAPACITY) { in datafab_transport() 594 if (srb->cmnd[0] == MODE_SELECT_10) { in datafab_transport() 601 if (srb->cmnd[0] == READ_10) { in datafab_transport() 602 block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) | in datafab_transport() 603 ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5])); in datafab_transport() 605 blocks = ((u32)(srb->cmnd[7]) << 8) | ((u32)(srb->cmnd[8])); in datafab_transport() 612 if (srb->cmnd[0] == READ_12) { in datafab_transport() [all …]
|
D | shuttle_usbat.c | 1586 data[i] = (i-7 >= srb->cmd_len) ? 0 : srb->cmnd[i-7]; in usbat_hp8200e_transport() 1593 if (srb->cmnd[0] == TEST_UNIT_READY) in usbat_hp8200e_transport() 1613 } else if (srb->cmnd[0] == READ_10 || in usbat_hp8200e_transport() 1614 srb->cmnd[0] == GPCMD_READ_CD) { in usbat_hp8200e_transport() 1641 result = usbat_write_block(us, USBAT_ATA, srb->cmnd, 12, in usbat_hp8200e_transport() 1642 srb->cmnd[0] == GPCMD_BLANK ? 75 : 10, 0); in usbat_hp8200e_transport() 1690 if (srb->cmnd[0] == INQUIRY) { in usbat_flash_transport() 1697 if (srb->cmnd[0] == READ_CAPACITY) { in usbat_flash_transport() 1723 if (srb->cmnd[0] == MODE_SELECT_10) { in usbat_flash_transport() 1728 if (srb->cmnd[0] == READ_10) { in usbat_flash_transport() [all …]
|
D | realtek_cr.c | 363 u8 cmnd[12] = { 0 }; in rts51x_read_mem() local 372 cmnd[0] = 0xF0; in rts51x_read_mem() 373 cmnd[1] = 0x0D; in rts51x_read_mem() 374 cmnd[2] = (u8) (addr >> 8); in rts51x_read_mem() 375 cmnd[3] = (u8) addr; in rts51x_read_mem() 376 cmnd[4] = (u8) (len >> 8); in rts51x_read_mem() 377 cmnd[5] = (u8) len; in rts51x_read_mem() 379 retval = rts51x_bulk_transport(us, 0, cmnd, 12, in rts51x_read_mem() 394 u8 cmnd[12] = { 0 }; in rts51x_write_mem() local 403 cmnd[0] = 0xF0; in rts51x_write_mem() [all …]
|
D | protocol.c | 55 srb->cmnd[srb->cmd_len] = 0; in usb_stor_pad12_command() 73 srb->cmnd[srb->cmd_len] = 0; in usb_stor_ufi_command() 81 switch (srb->cmnd[0]) { in usb_stor_ufi_command() 85 srb->cmnd[4] = 36; in usb_stor_ufi_command() 90 srb->cmnd[7] = 0; in usb_stor_ufi_command() 91 srb->cmnd[8] = 8; in usb_stor_ufi_command() 96 srb->cmnd[4] = 18; in usb_stor_ufi_command()
|
D | transport.c | 543 if (srb->cmnd[0] != READ_10 && srb->cmnd[0] != WRITE_10) in last_sector_hacks() 547 sector = (srb->cmnd[2] << 24) | (srb->cmnd[3] << 16) | in last_sector_hacks() 548 (srb->cmnd[4] << 8) | (srb->cmnd[5]); in last_sector_hacks() 589 if (srb->cmnd[0] != TEST_UNIT_READY) in last_sector_hacks() 656 srb->cmnd[0] == SYNCHRONIZE_CACHE) { in usb_stor_invoke_transport() 677 if (unlikely((srb->cmnd[0] == ATA_16 || srb->cmnd[0] == ATA_12) && in usb_stor_invoke_transport() 681 !(srb->cmnd[2] & 0x20))) { in usb_stor_invoke_transport() 691 !((srb->cmnd[0] == REQUEST_SENSE) || in usb_stor_invoke_transport() 692 (srb->cmnd[0] == INQUIRY) || in usb_stor_invoke_transport() 693 (srb->cmnd[0] == MODE_SENSE) || in usb_stor_invoke_transport() [all …]
|
D | sddr55.c | 805 if (srb->cmnd[0] == REQUEST_SENSE) { in sddr55_transport() 827 if (srb->cmnd[0] == INQUIRY) { in sddr55_transport() 860 if (srb->cmnd[0] == READ_CAPACITY) { in sddr55_transport() 895 if (srb->cmnd[0] == MODE_SENSE_10) { in sddr55_transport() 901 if ( (srb->cmnd[2] & 0x3F) == 0x01 ) { in sddr55_transport() 905 } else if ( (srb->cmnd[2] & 0x3F) == 0x3F ) { in sddr55_transport() 914 if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) { in sddr55_transport() 917 (srb->cmnd[4]&0x03) ? "Prevent" : "Allow"); in sddr55_transport() 923 if (srb->cmnd[0] == READ_10 || srb->cmnd[0] == WRITE_10) { in sddr55_transport() 925 page = short_pack(srb->cmnd[3], srb->cmnd[2]); in sddr55_transport() [all …]
|
D | sddr09.c | 1561 if (srb->cmnd[0] == REQUEST_SENSE && havefakesense) { in sddr09_transport() 1580 if (srb->cmnd[0] == INQUIRY) { in sddr09_transport() 1586 if (srb->cmnd[0] == READ_CAPACITY) { in sddr09_transport() 1627 if (srb->cmnd[0] == MODE_SENSE_10) { in sddr09_transport() 1628 int modepage = (srb->cmnd[2] & 0x3F); in sddr09_transport() 1651 if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) in sddr09_transport() 1656 if (srb->cmnd[0] == READ_10) { in sddr09_transport() 1658 page = short_pack(srb->cmnd[3], srb->cmnd[2]); in sddr09_transport() 1660 page |= short_pack(srb->cmnd[5], srb->cmnd[4]); in sddr09_transport() 1661 pages = short_pack(srb->cmnd[8], srb->cmnd[7]); in sddr09_transport() [all …]
|
D | isd200.c | 329 unsigned char cmnd[BLK_MAX_CDB]; member 488 srb->cmnd = info->cmnd; in isd200_action() 555 memcpy(srb->cmnd, &ata, sizeof(ata.generic)); in isd200_action() 616 memcpy(srb->cmnd, ataCdb, sizeof(ataCdb->generic)); in isd200_invoke_transport() 660 !((srb->cmnd[0] == REQUEST_SENSE) || in isd200_invoke_transport() 661 (srb->cmnd[0] == INQUIRY) || in isd200_invoke_transport() 662 (srb->cmnd[0] == MODE_SENSE) || in isd200_invoke_transport() 663 (srb->cmnd[0] == LOG_SENSE) || in isd200_invoke_transport() 664 (srb->cmnd[0] == MODE_SENSE_10))) { in isd200_invoke_transport() 1234 switch (srb->cmnd[0]) { in isd200_scsi_to_ata() [all …]
|
D | alauda.c | 1136 if (srb->cmnd[0] == INQUIRY) { in alauda_transport() 1143 if (srb->cmnd[0] == TEST_UNIT_READY) { in alauda_transport() 1148 if (srb->cmnd[0] == READ_CAPACITY) { in alauda_transport() 1170 if (srb->cmnd[0] == READ_10) { in alauda_transport() 1177 page = short_pack(srb->cmnd[3], srb->cmnd[2]); in alauda_transport() 1179 page |= short_pack(srb->cmnd[5], srb->cmnd[4]); in alauda_transport() 1180 pages = short_pack(srb->cmnd[8], srb->cmnd[7]); in alauda_transport() 1187 if (srb->cmnd[0] == WRITE_10) { in alauda_transport() 1194 page = short_pack(srb->cmnd[3], srb->cmnd[2]); in alauda_transport() 1196 page |= short_pack(srb->cmnd[5], srb->cmnd[4]); in alauda_transport() [all …]
|
/drivers/scsi/bfa/ |
D | bfad_im.c | 27 static int bfad_im_queuecommand(struct Scsi_Host *h, struct scsi_cmnd *cmnd); 37 struct scsi_cmnd *cmnd = (struct scsi_cmnd *)dio; in bfa_cb_ioim_done() local 46 scsi_set_resid(cmnd, 0); in bfa_cb_ioim_done() 52 memcpy(cmnd->sense_buffer, sns_info, sns_len); in bfa_cb_ioim_done() 57 scsi_set_resid(cmnd, residue); in bfa_cb_ioim_done() 59 (scsi_bufflen(cmnd) - residue) < in bfa_cb_ioim_done() 60 cmnd->underflow) { in bfa_cb_ioim_done() 65 cmnd->result = host_status << 16 | scsi_status; in bfa_cb_ioim_done() 70 cmnd->result = DID_TIME_OUT << 16; in bfa_cb_ioim_done() 73 cmnd->result = DID_TRANSPORT_DISRUPTED << 16; in bfa_cb_ioim_done() [all …]
|
/drivers/staging/rts5208/ |
D | rtsx_scsi.c | 29 switch (srb->cmnd[0]) { in scsi_show_command() 303 if (srb->cmnd[0] != TEST_UNIT_READY) in scsi_show_command() 309 dev_dbg(rtsx_dev(chip), "%*ph\n", len, srb->cmnd); in scsi_show_command() 554 if (srb->cmnd[1] == 1) in start_stop_unit() 557 switch (srb->cmnd[0x4]) { in start_stop_unit() 585 prevent = srb->cmnd[4] & 0x1; in allow_medium_removal() 776 page_code = srb->cmnd[2] & 0x3f; in mode_sense() 781 if (srb->cmnd[0] == MODE_SENSE) { in mode_sense() 783 ms_mode_sense(chip, srb->cmnd[0], in mode_sense() 798 ms_mode_sense(chip, srb->cmnd[0], in mode_sense() [all …]
|
D | spi.c | 456 spi->spi_clock = ((u16)(srb->cmnd[8]) << 8) | srb->cmnd[9]; in spi_set_parameter() 458 spi->spi_clock = srb->cmnd[3]; in spi_set_parameter() 460 spi->clk_div = ((u16)(srb->cmnd[4]) << 8) | srb->cmnd[5]; in spi_set_parameter() 461 spi->write_en = srb->cmnd[6]; in spi_set_parameter() 479 len = ((u16)(srb->cmnd[7]) << 8) | srb->cmnd[8]; in spi_read_flash_id() 496 rtsx_add_cmd(chip, WRITE_REG_CMD, SPI_COMMAND, 0xFF, srb->cmnd[3]); in spi_read_flash_id() 497 rtsx_add_cmd(chip, WRITE_REG_CMD, SPI_ADDR2, 0xFF, srb->cmnd[4]); in spi_read_flash_id() 498 rtsx_add_cmd(chip, WRITE_REG_CMD, SPI_ADDR1, 0xFF, srb->cmnd[5]); in spi_read_flash_id() 499 rtsx_add_cmd(chip, WRITE_REG_CMD, SPI_ADDR0, 0xFF, srb->cmnd[6]); in spi_read_flash_id() 502 rtsx_add_cmd(chip, WRITE_REG_CMD, SPI_LENGTH1, 0xFF, srb->cmnd[7]); in spi_read_flash_id() [all …]
|
/drivers/scsi/csiostor/ |
D | csio_scsi.c | 174 memcpy(fcp_cmnd->fc_cdb, scmnd->cmnd, 16); in csio_scsi_fcp_cmnd() 1560 struct scsi_cmnd *cmnd = (struct scsi_cmnd *)csio_scsi_cmnd(req); in csio_scsi_err_handler() local 1568 struct csio_rnode *rn = (struct csio_rnode *)(cmnd->device->hostdata); in csio_scsi_err_handler() 1601 memcpy(cmnd->sense_buffer, in csio_scsi_err_handler() 1606 scsi_set_resid(cmnd, 0); in csio_scsi_err_handler() 1610 scsi_set_resid(cmnd, in csio_scsi_err_handler() 1615 ((scsi_bufflen(cmnd) - scsi_get_resid(cmnd)) in csio_scsi_err_handler() 1616 < cmnd->underflow)) in csio_scsi_err_handler() 1627 " resid:0x%x\n", cmnd->cmnd[0], in csio_scsi_err_handler() 1628 scsi_bufflen(cmnd), scsi_get_resid(cmnd)); in csio_scsi_err_handler() [all …]
|
/drivers/scsi/aacraid/ |
D | aachba.c | 995 if (scsicmd->cmnd[2] == 0x83) { in get_container_serial_callback() 1086 sp[1] = scsicmd->cmnd[2]; in get_container_serial_callback() 1553 memcpy(hbacmd->cdb, cmd->cmnd, cmd->cmd_len); in aac_construct_hbacmd() 1578 memcpy(srbcmd->cdb, cmd->cmnd, cmd->cmd_len); in aac_scsi_64() 1609 memcpy(srbcmd->cdb, cmd->cmnd, cmd->cmd_len); in aac_scsi_32() 2327 switch (scsicmd->cmnd[0]) { in io_callback() 2330 lba = ((scsicmd->cmnd[1] & 0x1F) << 16) | in io_callback() 2331 (scsicmd->cmnd[2] << 8) | scsicmd->cmnd[3]; in io_callback() 2335 lba = ((u64)scsicmd->cmnd[2] << 56) | in io_callback() 2336 ((u64)scsicmd->cmnd[3] << 48) | in io_callback() [all …]
|
/drivers/scsi/lpfc/ |
D | lpfc_scsi.c | 592 struct scsi_cmnd *cmnd) in lpfc_get_scsi_buf_s3() argument 631 struct scsi_cmnd *cmnd) in lpfc_get_scsi_buf_s4() argument 644 if (cmnd && phba->cfg_fcp_io_sched == LPFC_FCP_SCHED_BY_HDWQ) { in lpfc_get_scsi_buf_s4() 645 tag = blk_mq_unique_tag(cmnd->request); in lpfc_get_scsi_buf_s4() 743 struct scsi_cmnd *cmnd) in lpfc_get_scsi_buf() argument 745 return phba->lpfc_get_scsi_buf(phba, ndlp, cmnd); in lpfc_get_scsi_buf() 2913 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err() 2925 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err() 2943 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err() 2960 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err() [all …]
|
/drivers/mmc/host/ |
D | vub300.c | 342 union sd_command cmnd; member 482 vub300->cmnd.poll.header_size = 22; in send_irqpoll() 483 vub300->cmnd.poll.header_type = 1; in send_irqpoll() 484 vub300->cmnd.poll.port_number = 0; in send_irqpoll() 485 vub300->cmnd.poll.command_type = 2; in send_irqpoll() 486 vub300->cmnd.poll.poll_timeout_lsb = 0xFF & (unsigned)timeout; in send_irqpoll() 487 vub300->cmnd.poll.poll_timeout_msb = 0xFF & (unsigned)(timeout >> 8); in send_irqpoll() 490 , &vub300->cmnd, sizeof(vub300->cmnd) in send_irqpoll() 1066 vub300->cmnd.head.header_size = 20; in send_command() 1067 vub300->cmnd.head.header_type = 0x00; in send_command() [all …]
|
/drivers/scsi/snic/ |
D | snic_trc.h | 113 ((u64)sc->cmnd[0] << 56 | (u64)sc->cmnd[7] << 40 | \ 114 (u64)sc->cmnd[8] << 32 | (u64)sc->cmnd[2] << 24 | \ 115 (u64)sc->cmnd[3] << 16 | (u64)sc->cmnd[4] << 8 | \ 116 (u64)sc->cmnd[5])
|
/drivers/scsi/ |
D | gdth.c | 333 char *cmnd, int timeout, u32 *info) in __gdth_execute() argument 357 scp->cmnd = cmnd; in __gdth_execute() 362 TRACE(("__gdth_execute() cmd 0x%x\n", scp->cmnd[0])); in __gdth_execute() 375 int gdth_execute(struct Scsi_Host *shost, gdth_cmd_str *gdtcmd, char *cmnd, in gdth_execute() argument 379 int rval = __gdth_execute(sdev, gdtcmd, cmnd, timeout, info); in gdth_execute() 954 if (ha->cmd_tab[i].cmnd == UNUSED_CMND) { in gdth_get_cmd_index() 955 ha->cmd_tab[i].cmnd = ha->pccb->RequestBuffer; in gdth_get_cmd_index() 1036 if (ha->cmd_tab[j].cmnd != UNUSED_CMND) in gdth_release_event() 1626 if (nscp->cmnd[0] == TEST_UNIT_READY) { in gdth_next() 1658 if (b == ha->virt_bus && nscp->cmnd[0] != INQUIRY && in gdth_next() [all …]
|
D | ps3rom.c | 88 unsigned char opcode = cmd->cmnd[0]; in ps3rom_atapi_request() 96 memcpy(&atapi_cmnd.pkt, cmd->cmnd, 12); in ps3rom_atapi_request() 150 return cmd->cmnd[2] << 24 | cmd->cmnd[3] << 16 | cmd->cmnd[4] << 8 | in srb10_lba() 151 cmd->cmnd[5]; in srb10_lba() 156 return cmd->cmnd[7] << 8 | cmd->cmnd[8]; in srb10_len() 214 opcode = cmd->cmnd[0]; in ps3rom_queuecommand_lck() 309 if (cmd->cmnd[0] == REQUEST_SENSE) { in ps3rom_interrupt()
|
D | 53c700.c | 566 slot->cmnd = NULL; in free_slot() 614 char *cmnd = NCR_700_get_sense_cmnd(SCp->device); in NCR_700_scsi_done() local 621 result = cmnd[7]; in NCR_700_scsi_done() 623 SCp->cmd_len = cmnd[8]; in NCR_700_scsi_done() 995 char *cmnd = in process_script_interrupt() local 1014 cmnd[0] = REQUEST_SENSE; in process_script_interrupt() 1015 cmnd[1] = (lun & 0x7) << 5; in process_script_interrupt() 1016 cmnd[2] = 0; in process_script_interrupt() 1017 cmnd[3] = 0; in process_script_interrupt() 1018 cmnd[4] = SCSI_SENSE_BUFFERSIZE; in process_script_interrupt() [all …]
|
D | sd.c | 892 cmd->cmnd[0] = UNMAP; in sd_setup_unmap_cmnd() 893 cmd->cmnd[8] = 24; in sd_setup_unmap_cmnd() 927 cmd->cmnd[0] = WRITE_SAME_16; in sd_setup_write_same16_cmnd() 929 cmd->cmnd[1] = 0x8; /* UNMAP */ in sd_setup_write_same16_cmnd() 930 put_unaligned_be64(lba, &cmd->cmnd[2]); in sd_setup_write_same16_cmnd() 931 put_unaligned_be32(nr_blocks, &cmd->cmnd[10]); in sd_setup_write_same16_cmnd() 959 cmd->cmnd[0] = WRITE_SAME; in sd_setup_write_same10_cmnd() 961 cmd->cmnd[1] = 0x8; /* UNMAP */ in sd_setup_write_same10_cmnd() 962 put_unaligned_be32(lba, &cmd->cmnd[2]); in sd_setup_write_same10_cmnd() 963 put_unaligned_be16(nr_blocks, &cmd->cmnd[7]); in sd_setup_write_same10_cmnd() [all …]
|
/drivers/usb/gadget/function/ |
D | f_mass_storage.c | 285 u8 cmnd[MAX_COMMAND_SIZE]; member 651 if (common->cmnd[0] == READ_6) in do_read() 652 lba = get_unaligned_be24(&common->cmnd[1]); in do_read() 654 lba = get_unaligned_be32(&common->cmnd[2]); in do_read() 661 if ((common->cmnd[1] & ~0x18) != 0) { in do_read() 788 if (common->cmnd[0] == WRITE_6) in do_write() 789 lba = get_unaligned_be24(&common->cmnd[1]); in do_write() 791 lba = get_unaligned_be32(&common->cmnd[2]); in do_write() 799 if (common->cmnd[1] & ~0x18) { in do_write() 803 if (!curlun->nofua && (common->cmnd[1] & 0x08)) { /* FUA */ in do_write() [all …]
|