/Linux-v4.19/drivers/usb/storage/ |
D | uas.c | 45 struct scsi_cmnd *cmnd[MAX_CMNDS]; member 75 static int uas_submit_urbs(struct scsi_cmnd *cmnd, 78 static int uas_try_complete(struct scsi_cmnd *cmnd, const char *caller); 80 static void uas_log_cmd_state(struct scsi_cmnd *cmnd, const char *prefix, 88 struct scsi_cmnd *cmnd; in uas_do_work() local 98 if (!devinfo->cmnd[i]) in uas_do_work() 101 cmnd = devinfo->cmnd[i]; in uas_do_work() 102 cmdinfo = (void *)&cmnd->SCp; in uas_do_work() 107 err = uas_submit_urbs(cmnd, cmnd->device->hostdata); in uas_do_work() 120 struct scsi_cmnd *cmnd = container_of(scp, struct scsi_cmnd, SCp); in uas_add_work() local [all …]
|
D | cypress_atacb.c | 76 if (likely(srb->cmnd[0] != ATA_16 && srb->cmnd[0] != ATA_12)) { in cypress_atacb_passthrough() 81 memcpy(save_cmnd, srb->cmnd, sizeof(save_cmnd)); in cypress_atacb_passthrough() 82 memset(srb->cmnd, 0, MAX_COMMAND_SIZE); in cypress_atacb_passthrough() 100 srb->cmnd[0] = 0x24; /* in cypress_atacb_passthrough() 105 srb->cmnd[1] = 0x24; /* bVSCBSubCommand : 0x24 for ATACB */ in cypress_atacb_passthrough() 107 srb->cmnd[3] = 0xff - 1; /* in cypress_atacb_passthrough() 111 srb->cmnd[4] = 1; /* TransferBlockCount : 512 */ in cypress_atacb_passthrough() 114 srb->cmnd[ 6] = save_cmnd[ 4]; /* features */ in cypress_atacb_passthrough() 115 srb->cmnd[ 7] = save_cmnd[ 6]; /* sector count */ in cypress_atacb_passthrough() 116 srb->cmnd[ 8] = save_cmnd[ 8]; /* lba low */ in cypress_atacb_passthrough() [all …]
|
D | jumpshot.c | 386 pc = srb->cmnd[2] >> 6; in jumpshot_handle_mode_sense() 387 page_code = srb->cmnd[2] & 0x3F; in jumpshot_handle_mode_sense() 493 if (srb->cmnd[0] == INQUIRY) { in jumpshot_transport() 500 if (srb->cmnd[0] == READ_CAPACITY) { in jumpshot_transport() 523 if (srb->cmnd[0] == MODE_SELECT_10) { in jumpshot_transport() 528 if (srb->cmnd[0] == READ_10) { in jumpshot_transport() 529 block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) | in jumpshot_transport() 530 ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5])); in jumpshot_transport() 532 blocks = ((u32)(srb->cmnd[7]) << 8) | ((u32)(srb->cmnd[8])); in jumpshot_transport() 539 if (srb->cmnd[0] == READ_12) { in jumpshot_transport() [all …]
|
D | datafab.c | 462 pc = srb->cmnd[2] >> 6; in datafab_handle_mode_sense() 463 page_code = srb->cmnd[2] & 0x3F; in datafab_handle_mode_sense() 568 if (srb->cmnd[0] == INQUIRY) { in datafab_transport() 575 if (srb->cmnd[0] == READ_CAPACITY) { in datafab_transport() 593 if (srb->cmnd[0] == MODE_SELECT_10) { in datafab_transport() 600 if (srb->cmnd[0] == READ_10) { in datafab_transport() 601 block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) | in datafab_transport() 602 ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5])); in datafab_transport() 604 blocks = ((u32)(srb->cmnd[7]) << 8) | ((u32)(srb->cmnd[8])); in datafab_transport() 611 if (srb->cmnd[0] == READ_12) { in datafab_transport() [all …]
|
D | shuttle_usbat.c | 1585 data[i] = (i-7 >= srb->cmd_len) ? 0 : srb->cmnd[i-7]; in usbat_hp8200e_transport() 1592 if (srb->cmnd[0] == TEST_UNIT_READY) in usbat_hp8200e_transport() 1612 } else if (srb->cmnd[0] == READ_10 || in usbat_hp8200e_transport() 1613 srb->cmnd[0] == GPCMD_READ_CD) { in usbat_hp8200e_transport() 1640 result = usbat_write_block(us, USBAT_ATA, srb->cmnd, 12, in usbat_hp8200e_transport() 1641 srb->cmnd[0] == GPCMD_BLANK ? 75 : 10, 0); in usbat_hp8200e_transport() 1689 if (srb->cmnd[0] == INQUIRY) { in usbat_flash_transport() 1696 if (srb->cmnd[0] == READ_CAPACITY) { in usbat_flash_transport() 1722 if (srb->cmnd[0] == MODE_SELECT_10) { in usbat_flash_transport() 1727 if (srb->cmnd[0] == READ_10) { in usbat_flash_transport() [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 | realtek_cr.c | 362 u8 cmnd[12] = { 0 }; in rts51x_read_mem() local 371 cmnd[0] = 0xF0; in rts51x_read_mem() 372 cmnd[1] = 0x0D; in rts51x_read_mem() 373 cmnd[2] = (u8) (addr >> 8); in rts51x_read_mem() 374 cmnd[3] = (u8) addr; in rts51x_read_mem() 375 cmnd[4] = (u8) (len >> 8); in rts51x_read_mem() 376 cmnd[5] = (u8) len; in rts51x_read_mem() 378 retval = rts51x_bulk_transport(us, 0, cmnd, 12, in rts51x_read_mem() 393 u8 cmnd[12] = { 0 }; in rts51x_write_mem() local 402 cmnd[0] = 0xF0; in rts51x_write_mem() [all …]
|
D | sddr55.c | 804 if (srb->cmnd[0] == REQUEST_SENSE) { in sddr55_transport() 826 if (srb->cmnd[0] == INQUIRY) { in sddr55_transport() 859 if (srb->cmnd[0] == READ_CAPACITY) { in sddr55_transport() 894 if (srb->cmnd[0] == MODE_SENSE_10) { in sddr55_transport() 900 if ( (srb->cmnd[2] & 0x3F) == 0x01 ) { in sddr55_transport() 904 } else if ( (srb->cmnd[2] & 0x3F) == 0x3F ) { in sddr55_transport() 913 if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) { in sddr55_transport() 916 (srb->cmnd[4]&0x03) ? "Prevent" : "Allow"); in sddr55_transport() 922 if (srb->cmnd[0] == READ_10 || srb->cmnd[0] == WRITE_10) { in sddr55_transport() 924 page = short_pack(srb->cmnd[3], srb->cmnd[2]); in sddr55_transport() [all …]
|
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() 670 if (unlikely((srb->cmnd[0] == ATA_16 || srb->cmnd[0] == ATA_12) && in usb_stor_invoke_transport() 674 !(srb->cmnd[2] & 0x20))) { in usb_stor_invoke_transport() 684 !((srb->cmnd[0] == REQUEST_SENSE) || in usb_stor_invoke_transport() 685 (srb->cmnd[0] == INQUIRY) || in usb_stor_invoke_transport() 686 (srb->cmnd[0] == MODE_SENSE) || in usb_stor_invoke_transport() 687 (srb->cmnd[0] == LOG_SENSE) || in usb_stor_invoke_transport() [all …]
|
D | sddr09.c | 1560 if (srb->cmnd[0] == REQUEST_SENSE && havefakesense) { in sddr09_transport() 1579 if (srb->cmnd[0] == INQUIRY) { in sddr09_transport() 1585 if (srb->cmnd[0] == READ_CAPACITY) { in sddr09_transport() 1626 if (srb->cmnd[0] == MODE_SENSE_10) { in sddr09_transport() 1627 int modepage = (srb->cmnd[2] & 0x3F); in sddr09_transport() 1650 if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) in sddr09_transport() 1655 if (srb->cmnd[0] == READ_10) { in sddr09_transport() 1657 page = short_pack(srb->cmnd[3], srb->cmnd[2]); in sddr09_transport() 1659 page |= short_pack(srb->cmnd[5], srb->cmnd[4]); in sddr09_transport() 1660 pages = short_pack(srb->cmnd[8], srb->cmnd[7]); in sddr09_transport() [all …]
|
D | isd200.c | 328 unsigned char cmnd[BLK_MAX_CDB]; member 487 srb->cmnd = info->cmnd; in isd200_action() 554 memcpy(srb->cmnd, &ata, sizeof(ata.generic)); in isd200_action() 615 memcpy(srb->cmnd, ataCdb, sizeof(ataCdb->generic)); in isd200_invoke_transport() 659 !((srb->cmnd[0] == REQUEST_SENSE) || in isd200_invoke_transport() 660 (srb->cmnd[0] == INQUIRY) || in isd200_invoke_transport() 661 (srb->cmnd[0] == MODE_SENSE) || in isd200_invoke_transport() 662 (srb->cmnd[0] == LOG_SENSE) || in isd200_invoke_transport() 663 (srb->cmnd[0] == MODE_SENSE_10))) { in isd200_invoke_transport() 1233 switch (srb->cmnd[0]) { in isd200_scsi_to_ata() [all …]
|
/Linux-v4.19/drivers/scsi/bfa/ |
D | bfad_im.c | 35 static int bfad_im_queuecommand(struct Scsi_Host *h, struct scsi_cmnd *cmnd); 45 struct scsi_cmnd *cmnd = (struct scsi_cmnd *)dio; in bfa_cb_ioim_done() local 54 scsi_set_resid(cmnd, 0); in bfa_cb_ioim_done() 60 memcpy(cmnd->sense_buffer, sns_info, sns_len); in bfa_cb_ioim_done() 65 scsi_set_resid(cmnd, residue); in bfa_cb_ioim_done() 67 (scsi_bufflen(cmnd) - residue) < in bfa_cb_ioim_done() 68 cmnd->underflow) { in bfa_cb_ioim_done() 73 cmnd->result = host_status << 16 | scsi_status; in bfa_cb_ioim_done() 78 cmnd->result = DID_TIME_OUT << 16; in bfa_cb_ioim_done() 81 cmnd->result = DID_TRANSPORT_DISRUPTED << 16; in bfa_cb_ioim_done() [all …]
|
/Linux-v4.19/drivers/staging/rts5208/ |
D | rtsx_scsi.c | 40 switch (srb->cmnd[0]) { in scsi_show_command() 314 if (srb->cmnd[0] != TEST_UNIT_READY) in scsi_show_command() 320 dev_dbg(rtsx_dev(chip), "%*ph\n", len, srb->cmnd); in scsi_show_command() 566 if (srb->cmnd[1] == 1) in start_stop_unit() 569 switch (srb->cmnd[0x4]) { in start_stop_unit() 597 prevent = srb->cmnd[4] & 0x1; in allow_medium_removal() 790 page_code = srb->cmnd[2] & 0x3f; in mode_sense() 795 if (srb->cmnd[0] == MODE_SENSE) { in mode_sense() 797 ms_mode_sense(chip, srb->cmnd[0], in mode_sense() 812 ms_mode_sense(chip, srb->cmnd[0], in mode_sense() [all …]
|
D | spi.c | 501 spi->spi_clock = ((u16)(srb->cmnd[8]) << 8) | srb->cmnd[9]; in spi_set_parameter() 503 spi->spi_clock = srb->cmnd[3]; in spi_set_parameter() 505 spi->clk_div = ((u16)(srb->cmnd[4]) << 8) | srb->cmnd[5]; in spi_set_parameter() 506 spi->write_en = srb->cmnd[6]; in spi_set_parameter() 524 len = ((u16)(srb->cmnd[7]) << 8) | srb->cmnd[8]; in spi_read_flash_id() 541 rtsx_add_cmd(chip, WRITE_REG_CMD, SPI_COMMAND, 0xFF, srb->cmnd[3]); in spi_read_flash_id() 542 rtsx_add_cmd(chip, WRITE_REG_CMD, SPI_ADDR2, 0xFF, srb->cmnd[4]); in spi_read_flash_id() 543 rtsx_add_cmd(chip, WRITE_REG_CMD, SPI_ADDR1, 0xFF, srb->cmnd[5]); in spi_read_flash_id() 544 rtsx_add_cmd(chip, WRITE_REG_CMD, SPI_ADDR0, 0xFF, srb->cmnd[6]); in spi_read_flash_id() 547 rtsx_add_cmd(chip, WRITE_REG_CMD, SPI_LENGTH1, 0xFF, srb->cmnd[7]); in spi_read_flash_id() [all …]
|
/Linux-v4.19/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 …]
|
/Linux-v4.19/drivers/scsi/aacraid/ |
D | aachba.c | 1005 if (scsicmd->cmnd[2] == 0x83) { in get_container_serial_callback() 1096 sp[1] = scsicmd->cmnd[2]; in get_container_serial_callback() 1562 memcpy(hbacmd->cdb, cmd->cmnd, cmd->cmd_len); in aac_construct_hbacmd() 1587 memcpy(srbcmd->cdb, cmd->cmnd, cmd->cmd_len); in aac_scsi_64() 1618 memcpy(srbcmd->cdb, cmd->cmnd, cmd->cmd_len); in aac_scsi_32() 2338 switch (scsicmd->cmnd[0]) { in io_callback() 2341 lba = ((scsicmd->cmnd[1] & 0x1F) << 16) | in io_callback() 2342 (scsicmd->cmnd[2] << 8) | scsicmd->cmnd[3]; in io_callback() 2346 lba = ((u64)scsicmd->cmnd[2] << 56) | in io_callback() 2347 ((u64)scsicmd->cmnd[3] << 48) | in io_callback() [all …]
|
/Linux-v4.19/include/trace/events/ |
D | scsi.h | 216 __dynamic_array(unsigned char, cmnd, cmd->cmd_len) 224 __entry->opcode = cmd->cmnd[0]; 229 memcpy(__get_dynamic_array(cmnd), cmd->cmnd, cmd->cmd_len); 238 __parse_cdb(__get_dynamic_array(cmnd), __entry->cmd_len), 239 __print_hex(__get_dynamic_array(cmnd), __entry->cmd_len)) 259 __dynamic_array(unsigned char, cmnd, cmd->cmd_len) 268 __entry->opcode = cmd->cmnd[0]; 273 memcpy(__get_dynamic_array(cmnd), cmd->cmnd, cmd->cmd_len); 282 __parse_cdb(__get_dynamic_array(cmnd), __entry->cmd_len), 283 __print_hex(__get_dynamic_array(cmnd), __entry->cmd_len), [all …]
|
/Linux-v4.19/drivers/scsi/lpfc/ |
D | lpfc_scsi.c | 93 lpfc_debug_save_data(struct lpfc_hba *phba, struct scsi_cmnd *cmnd) in lpfc_debug_save_data() argument 96 struct scatterlist *sgde = scsi_sglist(cmnd); in lpfc_debug_save_data() 122 lpfc_debug_save_dif(struct lpfc_hba *phba, struct scsi_cmnd *cmnd) in lpfc_debug_save_dif() argument 125 struct scatterlist *sgde = scsi_prot_sglist(cmnd); in lpfc_debug_save_dif() 3095 (cmd->cmnd[7] << 8 | cmd->cmnd[8])); in lpfc_parse_bg_err() 3103 (cmd->cmnd[7] << 8 | cmd->cmnd[8])); in lpfc_parse_bg_err() 3116 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err() 3128 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err() 3146 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err() 3163 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err() [all …]
|
/Linux-v4.19/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])
|
/Linux-v4.19/drivers/mmc/host/ |
D | vub300.c | 345 union sd_command cmnd; member 485 vub300->cmnd.poll.header_size = 22; in send_irqpoll() 486 vub300->cmnd.poll.header_type = 1; in send_irqpoll() 487 vub300->cmnd.poll.port_number = 0; in send_irqpoll() 488 vub300->cmnd.poll.command_type = 2; in send_irqpoll() 489 vub300->cmnd.poll.poll_timeout_lsb = 0xFF & (unsigned)timeout; in send_irqpoll() 490 vub300->cmnd.poll.poll_timeout_msb = 0xFF & (unsigned)(timeout >> 8); in send_irqpoll() 493 , &vub300->cmnd, sizeof(vub300->cmnd) in send_irqpoll() 1069 vub300->cmnd.head.header_size = 20; in send_command() 1070 vub300->cmnd.head.header_type = 0x00; in send_command() [all …]
|
/Linux-v4.19/arch/ia64/hp/sim/ |
D | simscsi.c | 164 offset = (((sc->cmnd[1] & 0x1f) << 16) | (sc->cmnd[2] << 8) | sc->cmnd[3])*512; in simscsi_readwrite6() 198 offset = (((unsigned long)sc->cmnd[2] << 24) in simscsi_readwrite10() 199 | ((unsigned long)sc->cmnd[3] << 16) in simscsi_readwrite10() 200 | ((unsigned long)sc->cmnd[4] << 8) in simscsi_readwrite10() 201 | ((unsigned long)sc->cmnd[5] << 0))*512UL; in simscsi_readwrite10() 218 target_id, sc->cmnd[0], sc->serial_number, sp, done); in simscsi_queuecommand_lck() 224 switch (sc->cmnd[0]) { in simscsi_queuecommand_lck() 311 panic("simscsi: unknown SCSI command %u\n", sc->cmnd[0]); in simscsi_queuecommand_lck()
|
/Linux-v4.19/drivers/scsi/ |
D | sd.c | 769 cmd->cmnd[0] = UNMAP; in sd_setup_unmap_cmnd() 770 cmd->cmnd[8] = 24; in sd_setup_unmap_cmnd() 802 cmd->cmnd[0] = WRITE_SAME_16; in sd_setup_write_same16_cmnd() 804 cmd->cmnd[1] = 0x8; /* UNMAP */ in sd_setup_write_same16_cmnd() 805 put_unaligned_be64(sector, &cmd->cmnd[2]); in sd_setup_write_same16_cmnd() 806 put_unaligned_be32(nr_sectors, &cmd->cmnd[10]); in sd_setup_write_same16_cmnd() 832 cmd->cmnd[0] = WRITE_SAME; in sd_setup_write_same10_cmnd() 834 cmd->cmnd[1] = 0x8; /* UNMAP */ in sd_setup_write_same10_cmnd() 835 put_unaligned_be32(sector, &cmd->cmnd[2]); in sd_setup_write_same10_cmnd() 836 put_unaligned_be16(nr_sectors, &cmd->cmnd[7]); in sd_setup_write_same10_cmnd() [all …]
|
D | ps3rom.c | 100 unsigned char opcode = cmd->cmnd[0]; in ps3rom_atapi_request() 108 memcpy(&atapi_cmnd.pkt, cmd->cmnd, 12); in ps3rom_atapi_request() 162 return cmd->cmnd[2] << 24 | cmd->cmnd[3] << 16 | cmd->cmnd[4] << 8 | in srb10_lba() 163 cmd->cmnd[5]; in srb10_lba() 168 return cmd->cmnd[7] << 8 | cmd->cmnd[8]; in srb10_len() 226 opcode = cmd->cmnd[0]; in ps3rom_queuecommand_lck() 321 if (cmd->cmnd[0] == REQUEST_SENSE) { in ps3rom_interrupt()
|
/Linux-v4.19/include/scsi/ |
D | scsi_common.h | 22 scsi_command_size(const unsigned char *cmnd) in scsi_command_size() argument 24 return (cmnd[0] == VARIABLE_LENGTH_CMD) ? in scsi_command_size() 25 scsi_varlen_cdb_length(cmnd) : COMMAND_SIZE(cmnd[0]); in scsi_command_size()
|
/Linux-v4.19/drivers/usb/gadget/function/ |
D | f_mass_storage.c | 284 u8 cmnd[MAX_COMMAND_SIZE]; member 627 if (common->cmnd[0] == READ_6) in do_read() 628 lba = get_unaligned_be24(&common->cmnd[1]); in do_read() 630 lba = get_unaligned_be32(&common->cmnd[2]); in do_read() 637 if ((common->cmnd[1] & ~0x18) != 0) { in do_read() 764 if (common->cmnd[0] == WRITE_6) in do_write() 765 lba = get_unaligned_be24(&common->cmnd[1]); in do_write() 767 lba = get_unaligned_be32(&common->cmnd[2]); in do_write() 775 if (common->cmnd[1] & ~0x18) { in do_write() 779 if (!curlun->nofua && (common->cmnd[1] & 0x08)) { /* FUA */ in do_write() [all …]
|