Home
last modified time | relevance | path

Searched refs:cmnd (Results 1 – 25 of 176) sorted by relevance

12345678

/linux-6.12.1/drivers/usb/storage/
Duas.c46 struct scsi_cmnd *cmnd[MAX_CMNDS]; member
77 static int uas_submit_urbs(struct scsi_cmnd *cmnd,
80 static int uas_try_complete(struct scsi_cmnd *cmnd, const char *caller);
82 static void uas_log_cmd_state(struct scsi_cmnd *cmnd, const char *prefix,
103 struct scsi_cmnd *cmnd; in uas_do_work() local
113 if (!devinfo->cmnd[i]) in uas_do_work()
116 cmnd = devinfo->cmnd[i]; in uas_do_work()
117 cmdinfo = scsi_cmd_priv(cmnd); in uas_do_work()
122 err = uas_submit_urbs(cmnd, cmnd->device->hostdata); in uas_do_work()
143 static void uas_add_work(struct scsi_cmnd *cmnd) in uas_add_work() argument
[all …]
Dcypress_atacb.c77 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 …]
Djumpshot.c387 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 …]
Ddatafab.c462 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 …]
Dshuttle_usbat.c1586 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 …]
Drealtek_cr.c363 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 …]
Dprotocol.c55 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()
Dtransport.c548 if (srb->cmnd[0] != READ_10 && srb->cmnd[0] != WRITE_10) in last_sector_hacks()
552 sector = (srb->cmnd[2] << 24) | (srb->cmnd[3] << 16) | in last_sector_hacks()
553 (srb->cmnd[4] << 8) | (srb->cmnd[5]); in last_sector_hacks()
594 if (srb->cmnd[0] != TEST_UNIT_READY) in last_sector_hacks()
661 srb->cmnd[0] == SYNCHRONIZE_CACHE) { in usb_stor_invoke_transport()
682 if (unlikely((srb->cmnd[0] == ATA_16 || srb->cmnd[0] == ATA_12) && in usb_stor_invoke_transport()
686 !(srb->cmnd[2] & 0x20))) { in usb_stor_invoke_transport()
696 !((srb->cmnd[0] == REQUEST_SENSE) || in usb_stor_invoke_transport()
697 (srb->cmnd[0] == INQUIRY) || in usb_stor_invoke_transport()
698 (srb->cmnd[0] == MODE_SENSE) || in usb_stor_invoke_transport()
[all …]
Dsddr55.c805 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 …]
Dsddr09.c1561 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 …]
/linux-6.12.1/drivers/scsi/bfa/
Dbfad_im.c27 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 …]
/linux-6.12.1/drivers/staging/rts5208/
Drtsx_scsi.c29 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 …]
Dspi.c456 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()
477 len = ((u16)(srb->cmnd[7]) << 8) | srb->cmnd[8]; in spi_read_flash_id()
494 rtsx_add_cmd(chip, WRITE_REG_CMD, SPI_COMMAND, 0xFF, srb->cmnd[3]); in spi_read_flash_id()
495 rtsx_add_cmd(chip, WRITE_REG_CMD, SPI_ADDR2, 0xFF, srb->cmnd[4]); in spi_read_flash_id()
496 rtsx_add_cmd(chip, WRITE_REG_CMD, SPI_ADDR1, 0xFF, srb->cmnd[5]); in spi_read_flash_id()
497 rtsx_add_cmd(chip, WRITE_REG_CMD, SPI_ADDR0, 0xFF, srb->cmnd[6]); in spi_read_flash_id()
500 rtsx_add_cmd(chip, WRITE_REG_CMD, SPI_LENGTH1, 0xFF, srb->cmnd[7]); in spi_read_flash_id()
[all …]
/linux-6.12.1/drivers/scsi/
Dsd_trace.h18 TP_PROTO(struct scsi_cmnd *cmnd, sector_t lba,
21 TP_ARGS(cmnd, lba, wp_offset),
33 __entry->host_no = cmnd->device->host->host_no;
34 __entry->channel = cmnd->device->channel;
35 __entry->id = cmnd->device->id;
36 __entry->lun = cmnd->device->lun;
48 TP_PROTO(struct scsi_cmnd *cmnd, sector_t rq_sector,
51 TP_ARGS(cmnd, rq_sector, wp_offset, good_bytes),
64 __entry->host_no = cmnd->device->host->host_no;
65 __entry->channel = cmnd->device->channel;
[all …]
Dps3rom.c88 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()
212 opcode = cmd->cmnd[0]; in ps3rom_queuecommand_lck()
305 if (cmd->cmnd[0] == REQUEST_SENSE) { in ps3rom_interrupt()
Dscsi_error.c562 if (scmd->cmnd[0] == TEST_UNIT_READY && in scsi_check_sense()
836 if (scmd->cmnd[0] == TEST_UNIT_READY) in scsi_eh_completed_normally()
1040 unsigned char *cmnd, int cmnd_size, unsigned sense_bytes) in scsi_eh_prep_cmnd() argument
1062 memcpy(ses->cmnd, scmd->cmnd, sizeof(ses->cmnd)); in scsi_eh_prep_cmnd()
1063 memset(scmd->cmnd, 0, sizeof(scmd->cmnd)); in scsi_eh_prep_cmnd()
1076 scmd->cmnd[0] = REQUEST_SENSE; in scsi_eh_prep_cmnd()
1077 scmd->cmnd[4] = scmd->sdb.length; in scsi_eh_prep_cmnd()
1078 scmd->cmd_len = COMMAND_SIZE(scmd->cmnd[0]); in scsi_eh_prep_cmnd()
1081 if (cmnd) { in scsi_eh_prep_cmnd()
1082 BUG_ON(cmnd_size > sizeof(scmd->cmnd)); in scsi_eh_prep_cmnd()
[all …]
/linux-6.12.1/include/scsi/
Dscsi_common.h35 scsi_command_size(const unsigned char *cmnd) in scsi_command_size() argument
37 return (cmnd[0] == VARIABLE_LENGTH_CMD) ? in scsi_command_size()
38 scsi_varlen_cdb_length(cmnd) : COMMAND_SIZE(cmnd[0]); in scsi_command_size()
42 scsi_command_control(const unsigned char *cmnd) in scsi_command_control() argument
44 return (cmnd[0] == VARIABLE_LENGTH_CMD) ? in scsi_command_control()
45 cmnd[1] : cmnd[COMMAND_SIZE(cmnd[0]) - 1]; in scsi_command_control()
/linux-6.12.1/drivers/scsi/csiostor/
Dcsio_scsi.c174 memcpy(fcp_cmnd->fc_cdb, scmnd->cmnd, 16); in csio_scsi_fcp_cmnd()
1564 struct scsi_cmnd *cmnd = (struct scsi_cmnd *)csio_scsi_cmnd(req); in csio_scsi_err_handler() local
1572 struct csio_rnode *rn = (struct csio_rnode *)(cmnd->device->hostdata); in csio_scsi_err_handler()
1605 memcpy(cmnd->sense_buffer, in csio_scsi_err_handler()
1610 scsi_set_resid(cmnd, 0); in csio_scsi_err_handler()
1614 scsi_set_resid(cmnd, in csio_scsi_err_handler()
1619 ((scsi_bufflen(cmnd) - scsi_get_resid(cmnd)) in csio_scsi_err_handler()
1620 < cmnd->underflow)) in csio_scsi_err_handler()
1631 " resid:0x%x\n", cmnd->cmnd[0], in csio_scsi_err_handler()
1632 scsi_bufflen(cmnd), scsi_get_resid(cmnd)); in csio_scsi_err_handler()
[all …]
/linux-6.12.1/drivers/scsi/aacraid/
Daachba.c1009 if (scsicmd->cmnd[2] == 0x83) { in get_container_serial_callback()
1100 sp[1] = scsicmd->cmnd[2]; in get_container_serial_callback()
1566 memcpy(hbacmd->cdb, cmd->cmnd, cmd->cmd_len); in aac_construct_hbacmd()
1591 memcpy(srbcmd->cdb, cmd->cmnd, cmd->cmd_len); in aac_scsi_64()
1622 memcpy(srbcmd->cdb, cmd->cmnd, cmd->cmd_len); in aac_scsi_32()
2333 switch (scsicmd->cmnd[0]) { in io_callback()
2336 lba = ((scsicmd->cmnd[1] & 0x1F) << 16) | in io_callback()
2337 (scsicmd->cmnd[2] << 8) | scsicmd->cmnd[3]; in io_callback()
2341 lba = ((u64)scsicmd->cmnd[2] << 56) | in io_callback()
2342 ((u64)scsicmd->cmnd[3] << 48) | in io_callback()
[all …]
/linux-6.12.1/include/trace/events/
Dscsi.h175 __dynamic_array(unsigned char, cmnd, cmd->cmd_len)
183 __entry->opcode = cmd->cmnd[0];
190 memcpy(__get_dynamic_array(cmnd), cmd->cmnd, cmd->cmd_len);
199 __parse_cdb(__get_dynamic_array(cmnd), __entry->cmd_len),
200 __print_hex(__get_dynamic_array(cmnd), __entry->cmd_len))
222 __dynamic_array(unsigned char, cmnd, cmd->cmd_len)
231 __entry->opcode = cmd->cmnd[0];
238 memcpy(__get_dynamic_array(cmnd), cmd->cmnd, cmd->cmd_len);
248 __parse_cdb(__get_dynamic_array(cmnd), __entry->cmd_len),
249 __print_hex(__get_dynamic_array(cmnd), __entry->cmd_len),
[all …]
/linux-6.12.1/drivers/mmc/host/
Dvub300.c342 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 …]
/linux-6.12.1/drivers/scsi/snic/
Dsnic_trc.h96 ((u64)sc->cmnd[0] << 56 | (u64)sc->cmnd[7] << 40 | \
97 (u64)sc->cmnd[8] << 32 | (u64)sc->cmnd[2] << 24 | \
98 (u64)sc->cmnd[3] << 16 | (u64)sc->cmnd[4] << 8 | \
99 (u64)sc->cmnd[5])
/linux-6.12.1/drivers/scsi/lpfc/
Dlpfc_scsi.c558 struct scsi_cmnd *cmnd) in lpfc_get_scsi_buf_s3() argument
599 struct scsi_cmnd *cmnd) in lpfc_get_scsi_buf_s4() argument
611 if (cmnd && phba->cfg_fcp_io_sched == LPFC_FCP_SCHED_BY_HDWQ) { in lpfc_get_scsi_buf_s4()
612 tag = blk_mq_unique_tag(scsi_cmd_to_rq(cmnd)); in lpfc_get_scsi_buf_s4()
659 if (cmnd && cmnd->cmd_len > LPFC_FCP_CDB_LEN) in lpfc_get_scsi_buf_s4()
694 struct scsi_cmnd *cmnd) in lpfc_get_scsi_buf() argument
696 return phba->lpfc_get_scsi_buf(phba, ndlp, cmnd); in lpfc_get_scsi_buf()
2920 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
2932 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
2947 "bgstat=x%x bghm=x%x\n", cmd->cmnd[0], in lpfc_parse_bg_err()
[all …]
/linux-6.12.1/drivers/scsi/elx/efct/
Defct_unsol.c159 efct_populate_io_fcp_cmd(struct efct_io *io, struct fcp_cmnd *cmnd, in efct_populate_io_fcp_cmd() argument
164 io->exp_xfer_len = be32_to_cpu(cmnd->fc_dl); in efct_populate_io_fcp_cmd()
181 efct_get_flags_fcp_cmd(struct fcp_cmnd *cmnd) in efct_get_flags_fcp_cmd() argument
185 switch (cmnd->fc_pri_ta & FCP_PTA_MASK) { in efct_get_flags_fcp_cmd()
199 if (cmnd->fc_flags & FCP_CFL_WRDATA) in efct_get_flags_fcp_cmd()
201 if (cmnd->fc_flags & FCP_CFL_RDDATA) in efct_get_flags_fcp_cmd()
343 struct fcp_cmnd *cmnd = NULL; in efct_dispatch_fcp_cmd() local
352 cmnd = seq->payload->dma.virt; in efct_dispatch_fcp_cmd()
358 lun = scsilun_to_int(&cmnd->fc_lun); in efct_dispatch_fcp_cmd()
379 efct_populate_io_fcp_cmd(io, cmnd, fchdr, true); in efct_dispatch_fcp_cmd()
[all …]
/linux-6.12.1/drivers/usb/gadget/function/
Df_mass_storage.c257 u8 cmnd[MAX_COMMAND_SIZE]; member
621 if (common->cmnd[0] == READ_6) in do_read()
622 lba = get_unaligned_be24(&common->cmnd[1]); in do_read()
624 if (common->cmnd[0] == READ_16) in do_read()
625 lba = get_unaligned_be64(&common->cmnd[2]); in do_read()
627 lba = get_unaligned_be32(&common->cmnd[2]); in do_read()
634 if ((common->cmnd[1] & ~0x18) != 0) { in do_read()
761 if (common->cmnd[0] == WRITE_6) in do_write()
762 lba = get_unaligned_be24(&common->cmnd[1]); in do_write()
764 if (common->cmnd[0] == WRITE_16) in do_write()
[all …]

12345678