/Linux-v5.10/drivers/staging/rts5208/ |
D | rtsx_scsi.c | 24 struct scsi_cmnd *srb = chip->srb; in scsi_show_command() local 29 switch (srb->cmnd[0]) { in scsi_show_command() 303 if (srb->cmnd[0] != TEST_UNIT_READY) in scsi_show_command() 305 what, srb->cmd_len); in scsi_show_command() 308 len = min_t(unsigned short, srb->cmd_len, 16); in scsi_show_command() 309 dev_dbg(rtsx_dev(chip), "%*ph\n", len, srb->cmnd); in scsi_show_command() 411 static int test_unit_ready(struct scsi_cmnd *srb, struct rtsx_chip *chip) in test_unit_ready() argument 413 unsigned int lun = SCSI_LUN(srb); in test_unit_ready() 427 if (get_lun_card(chip, SCSI_LUN(srb)) == SD_CARD) { in test_unit_ready() 463 static int inquiry(struct scsi_cmnd *srb, struct rtsx_chip *chip) in inquiry() argument [all …]
|
D | spi.c | 436 int spi_get_status(struct scsi_cmnd *srb, struct rtsx_chip *chip) in spi_get_status() argument 443 min_t(int, scsi_bufflen(srb), 1), srb); in spi_get_status() 444 scsi_set_resid(srb, scsi_bufflen(srb) - 1); in spi_get_status() 449 int spi_set_parameter(struct scsi_cmnd *srb, struct rtsx_chip *chip) in spi_set_parameter() argument 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() 471 int spi_read_flash_id(struct scsi_cmnd *srb, struct rtsx_chip *chip) in spi_read_flash_id() argument 479 len = ((u16)(srb->cmnd[7]) << 8) | srb->cmnd[8]; in spi_read_flash_id() [all …]
|
D | rtsx.c | 121 static int queuecommand_lck(struct scsi_cmnd *srb, in queuecommand_lck() argument 124 struct rtsx_dev *dev = host_to_rtsx(srb->device->host); in queuecommand_lck() 128 if (chip->srb) { in queuecommand_lck() 130 chip->srb); in queuecommand_lck() 137 srb->result = DID_NO_CONNECT << 16; in queuecommand_lck() 138 done(srb); in queuecommand_lck() 143 srb->scsi_done = done; in queuecommand_lck() 144 chip->srb = srb; in queuecommand_lck() 157 static int command_abort(struct scsi_cmnd *srb) in DEF_SCSI_QCMD() 159 struct Scsi_Host *host = srb->device->host; in DEF_SCSI_QCMD() [all …]
|
D | spi.h | 44 int spi_get_status(struct scsi_cmnd *srb, struct rtsx_chip *chip); 45 int spi_set_parameter(struct scsi_cmnd *srb, struct rtsx_chip *chip); 46 int spi_read_flash_id(struct scsi_cmnd *srb, struct rtsx_chip *chip); 47 int spi_read_flash(struct scsi_cmnd *srb, struct rtsx_chip *chip); 48 int spi_write_flash(struct scsi_cmnd *srb, struct rtsx_chip *chip); 49 int spi_erase_flash(struct scsi_cmnd *srb, struct rtsx_chip *chip); 50 int spi_write_flash_status(struct scsi_cmnd *srb, struct rtsx_chip *chip);
|
D | ms.h | 192 int ms_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip, 194 int mspro_format(struct scsi_cmnd *srb, struct rtsx_chip *chip, 205 int mg_set_leaf_id(struct scsi_cmnd *srb, struct rtsx_chip *chip); 206 int mg_get_local_EKB(struct scsi_cmnd *srb, struct rtsx_chip *chip); 207 int mg_chg(struct scsi_cmnd *srb, struct rtsx_chip *chip); 208 int mg_get_rsp_chg(struct scsi_cmnd *srb, struct rtsx_chip *chip); 209 int mg_rsp(struct scsi_cmnd *srb, struct rtsx_chip *chip); 210 int mg_get_ICV(struct scsi_cmnd *srb, struct rtsx_chip *chip); 211 int mg_set_ICV(struct scsi_cmnd *srb, struct rtsx_chip *chip);
|
D | rtsx_transport.c | 34 struct scsi_cmnd *srb, in rtsx_stor_access_xfer_buf() argument 42 if (scsi_sg_count(srb) == 0) { in rtsx_stor_access_xfer_buf() 45 if (*offset >= scsi_bufflen(srb)) in rtsx_stor_access_xfer_buf() 47 cnt = min(buflen, scsi_bufflen(srb) - *offset); in rtsx_stor_access_xfer_buf() 49 sgbuffer = (unsigned char *)scsi_sglist(srb) + *offset; in rtsx_stor_access_xfer_buf() 64 (struct scatterlist *)scsi_sglist(srb) in rtsx_stor_access_xfer_buf() 74 while (cnt < buflen && *index < scsi_sg_count(srb)) { in rtsx_stor_access_xfer_buf() 121 unsigned int buflen, struct scsi_cmnd *srb) in rtsx_stor_set_xfer_buf() argument 125 rtsx_stor_access_xfer_buf(buffer, buflen, srb, &index, &offset, in rtsx_stor_set_xfer_buf() 127 if (buflen < scsi_bufflen(srb)) in rtsx_stor_set_xfer_buf() [all …]
|
D | sd.c | 3286 int sd_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip, u32 start_sector, argument 3294 if (srb->sc_data_direction == DMA_FROM_DEVICE) { 3336 ((sd_card->pre_dir != srb->sc_data_direction) || 3400 trans_dma_enable(srb->sc_data_direction, chip, sector_cnt * 512, 3403 if (srb->sc_data_direction == DMA_FROM_DEVICE) { 3416 if (srb->sc_data_direction == DMA_FROM_DEVICE) { 3436 trans_dma_enable(srb->sc_data_direction, chip, 3478 trans_dma_enable(srb->sc_data_direction, chip, 3492 retval = rtsx_transfer_data(chip, SD_CARD, scsi_sglist(srb), 3493 scsi_bufflen(srb), scsi_sg_count(srb), [all …]
|
D | sd.h | 270 int sd_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip, 281 int sd_pass_thru_mode(struct scsi_cmnd *srb, struct rtsx_chip *chip); 282 int sd_execute_no_data(struct scsi_cmnd *srb, struct rtsx_chip *chip); 283 int sd_execute_read_data(struct scsi_cmnd *srb, struct rtsx_chip *chip); 284 int sd_execute_write_data(struct scsi_cmnd *srb, struct rtsx_chip *chip); 285 int sd_get_cmd_rsp(struct scsi_cmnd *srb, struct rtsx_chip *chip); 286 int sd_hw_rst(struct scsi_cmnd *srb, struct rtsx_chip *chip);
|
/Linux-v5.10/drivers/usb/storage/ |
D | cypress_atacb.c | 73 static void cypress_atacb_passthrough(struct scsi_cmnd *srb, struct us_data *us) in cypress_atacb_passthrough() argument 77 if (likely(srb->cmnd[0] != ATA_16 && srb->cmnd[0] != ATA_12)) { in cypress_atacb_passthrough() 78 usb_stor_transparent_scsi_command(srb, us); 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() 99 srb->cmd_len = 16; 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() [all …]
|
D | protocol.c | 45 void usb_stor_pad12_command(struct scsi_cmnd *srb, struct us_data *us) in usb_stor_pad12_command() argument 54 for (; srb->cmd_len < 12; srb->cmd_len++) in usb_stor_pad12_command() 55 srb->cmnd[srb->cmd_len] = 0; in usb_stor_pad12_command() 58 usb_stor_invoke_transport(srb, us); in usb_stor_pad12_command() 61 void usb_stor_ufi_command(struct scsi_cmnd *srb, struct us_data *us) in usb_stor_ufi_command() argument 72 for (; srb->cmd_len < 12; srb->cmd_len++) in usb_stor_ufi_command() 73 srb->cmnd[srb->cmd_len] = 0; in usb_stor_ufi_command() 76 srb->cmd_len = 12; 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() [all …]
|
D | transport.c | 462 struct scsi_cmnd* srb) in usb_stor_bulk_srb() argument 465 int result = usb_stor_bulk_transfer_sglist(us, pipe, scsi_sglist(srb), in usb_stor_bulk_srb() 466 scsi_sg_count(srb), scsi_bufflen(srb), in usb_stor_bulk_srb() 469 scsi_set_resid(srb, scsi_bufflen(srb) - partial); in usb_stor_bulk_srb() 519 static void last_sector_hacks(struct us_data *us, struct scsi_cmnd *srb) in last_sector_hacks() argument 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() 549 disk = srb->request->rq_disk; in last_sector_hacks() 558 if (srb->result == SAM_STAT_GOOD && scsi_get_resid(srb) == 0) { in last_sector_hacks() [all …]
|
D | jumpshot.c | 214 usb_stor_access_xfer_buf(buffer, len, us->srb, in jumpshot_read_data() 270 usb_stor_access_xfer_buf(buffer, len, us->srb, in jumpshot_write_data() 367 struct scsi_cmnd * srb, in jumpshot_handle_mode_sense() argument 387 pc = srb->cmnd[2] >> 6; in jumpshot_handle_mode_sense() 388 page_code = srb->cmnd[2] & 0x3F; in jumpshot_handle_mode_sense() 458 usb_stor_set_xfer_buf(ptr, i, srb); in jumpshot_handle_mode_sense() 474 static int jumpshot_transport(struct scsi_cmnd *srb, struct us_data *us) in jumpshot_transport() argument 494 if (srb->cmnd[0] == INQUIRY) { in jumpshot_transport() 501 if (srb->cmnd[0] == READ_CAPACITY) { in jumpshot_transport() 519 usb_stor_set_xfer_buf(ptr, 8, srb); in jumpshot_transport() [all …]
|
D | datafab.c | 202 usb_stor_access_xfer_buf(buffer, len, us->srb, in datafab_read_data() 265 usb_stor_access_xfer_buf(buffer, len, us->srb, in datafab_write_data() 438 struct scsi_cmnd * srb, in datafab_handle_mode_sense() argument 463 pc = srb->cmnd[2] >> 6; in datafab_handle_mode_sense() 464 page_code = srb->cmnd[2] & 0x3F; in datafab_handle_mode_sense() 534 usb_stor_set_xfer_buf(ptr, i, srb); in datafab_handle_mode_sense() 548 static int datafab_transport(struct scsi_cmnd *srb, struct us_data *us) in datafab_transport() argument 569 if (srb->cmnd[0] == INQUIRY) { in datafab_transport() 576 if (srb->cmnd[0] == READ_CAPACITY) { in datafab_transport() 589 usb_stor_set_xfer_buf(ptr, 8, srb); in datafab_transport() [all …]
|
D | shuttle_usbat.c | 149 static int usbat_flash_transport(struct scsi_cmnd * srb, struct us_data *us); 150 static int usbat_hp8200e_transport(struct scsi_cmnd *srb, struct us_data *us); 1180 usb_stor_access_xfer_buf(buffer, len, us->srb, in usbat_flash_read_data() 1256 usb_stor_access_xfer_buf(buffer, len, us->srb, in usbat_flash_write_data() 1291 struct scsi_cmnd *srb) in usbat_hp8200e_handle_read10() argument 1300 usb_stor_dbg(us, "transfersize %d\n", srb->transfersize); in usbat_hp8200e_handle_read10() 1302 if (scsi_bufflen(srb) < 0x10000) { in usbat_hp8200e_handle_read10() 1309 scsi_sglist(srb), in usbat_hp8200e_handle_read10() 1310 scsi_bufflen(srb), scsi_sg_count(srb), 1); in usbat_hp8200e_handle_read10() 1328 srb->transfersize = scsi_bufflen(srb)/len; in usbat_hp8200e_handle_read10() [all …]
|
D | isd200.c | 330 struct scsi_cmnd srb; member 399 static void isd200_build_sense(struct us_data *us, struct scsi_cmnd *srb) in isd200_build_sense() argument 402 struct sense_data *buf = (struct sense_data *) &srb->sense_buffer[0]; in isd200_build_sense() 452 struct scsi_cmnd *srb = &info->srb; in isd200_set_srb() local 457 srb->sc_data_direction = dir; in isd200_set_srb() 458 srb->sdb.table.sgl = buff ? &info->sg : NULL; in isd200_set_srb() 459 srb->sdb.length = bufflen; in isd200_set_srb() 460 srb->sdb.table.nents = buff ? 1 : 0; in isd200_set_srb() 463 static void isd200_srb_set_bufflen(struct scsi_cmnd *srb, unsigned bufflen) in isd200_srb_set_bufflen() argument 465 srb->sdb.length = bufflen; in isd200_srb_set_bufflen() [all …]
|
D | scsiglue.c | 366 static int queuecommand_lck(struct scsi_cmnd *srb, in queuecommand_lck() argument 369 struct us_data *us = host_to_us(srb->device->host); in queuecommand_lck() 372 if (us->srb != NULL) { in queuecommand_lck() 374 "Error in %s: us->srb = %p\n", __func__, us->srb); in queuecommand_lck() 381 srb->result = DID_NO_CONNECT << 16; in queuecommand_lck() 382 done(srb); in queuecommand_lck() 387 (srb->cmnd[0] == ATA_12 || srb->cmnd[0] == ATA_16)) { in queuecommand_lck() 388 memcpy(srb->sense_buffer, usb_stor_sense_invalidCDB, in queuecommand_lck() 390 srb->result = SAM_STAT_CHECK_CONDITION; in queuecommand_lck() 391 done(srb); in queuecommand_lck() [all …]
|
D | sddr09.c | 53 static int sddr09_transport(struct scsi_cmnd *srb, struct us_data *us); 812 usb_stor_access_xfer_buf(buffer, len, us->srb, in sddr09_read_data() 1027 usb_stor_access_xfer_buf(buffer, len, us->srb, in sddr09_write_data() 1496 static int dpcm_transport(struct scsi_cmnd *srb, struct us_data *us) in dpcm_transport() argument 1500 usb_stor_dbg(us, "LUN=%d\n", (u8)srb->device->lun); in dpcm_transport() 1502 switch (srb->device->lun) { in dpcm_transport() 1508 ret = usb_stor_CB_transport(srb, us); in dpcm_transport() 1520 srb->device->lun = 0; in dpcm_transport() 1521 ret = sddr09_transport(srb, us); in dpcm_transport() 1522 srb->device->lun = 1; in dpcm_transport() [all …]
|
D | freecom.c | 152 freecom_readdata (struct scsi_cmnd *srb, struct us_data *us, in freecom_readdata() argument 176 result = usb_stor_bulk_srb(us, ipipe, srb); in freecom_readdata() 185 freecom_writedata (struct scsi_cmnd *srb, struct us_data *us, in freecom_writedata() argument 209 result = usb_stor_bulk_srb(us, opipe, srb); in freecom_writedata() 221 static int freecom_transport(struct scsi_cmnd *srb, struct us_data *us) in freecom_transport() argument 242 memcpy (fcb->Atapi, srb->cmnd, 12); in freecom_transport() 245 US_DEBUG(pdump(us, srb->cmnd, 12)); in freecom_transport() 331 usb_stor_dbg(us, "SCSI requested %d\n", scsi_bufflen(srb)); in freecom_transport() 334 switch (srb->cmnd[0]) { in freecom_transport() 342 length = scsi_bufflen(srb); in freecom_transport() [all …]
|
D | sddr55.c | 290 usb_stor_access_xfer_buf(buffer, len, us->srb, in sddr55_read_data() 359 usb_stor_access_xfer_buf(buffer, len, us->srb, in sddr55_write_data() 775 static int sddr55_transport(struct scsi_cmnd *srb, struct us_data *us) in sddr55_transport() argument 805 if (srb->cmnd[0] == REQUEST_SENSE) { in sddr55_transport() 814 usb_stor_set_xfer_buf (ptr, sizeof info->sense_data, srb); in sddr55_transport() 827 if (srb->cmnd[0] == INQUIRY) { in sddr55_transport() 860 if (srb->cmnd[0] == READ_CAPACITY) { in sddr55_transport() 888 usb_stor_set_xfer_buf(ptr, 8, srb); in sddr55_transport() 895 if (srb->cmnd[0] == MODE_SENSE_10) { in sddr55_transport() 899 usb_stor_set_xfer_buf(ptr, sizeof(mode_page_01), srb); in sddr55_transport() [all …]
|
D | usb.c | 294 usb_stor_set_xfer_buf(data, data_len, us->srb); in fill_inquiry_response() 302 struct scsi_cmnd *srb; in usb_stor_control_thread() local 318 srb = us->srb; in usb_stor_control_thread() 319 if (srb == NULL) { in usb_stor_control_thread() 328 srb->result = DID_ABORT << 16; in usb_stor_control_thread() 338 if (srb->sc_data_direction == DMA_BIDIRECTIONAL) { in usb_stor_control_thread() 340 srb->result = DID_ERROR << 16; in usb_stor_control_thread() 347 else if (srb->device->id && in usb_stor_control_thread() 350 srb->device->id, in usb_stor_control_thread() 351 srb->device->lun); in usb_stor_control_thread() [all …]
|
D | ene_ub6250.c | 522 result = usb_stor_bulk_srb(us, pipe, us->srb); in ene_send_scsi_cmd() 562 if (us->srb != NULL) in ene_send_scsi_cmd() 563 scsi_set_resid(us->srb, max(scsi_get_resid(us->srb), in ene_send_scsi_cmd() 573 static int do_scsi_request_sense(struct us_data *us, struct scsi_cmnd *srb) in do_scsi_request_sense() argument 585 usb_stor_set_xfer_buf(buf, sizeof(buf), srb); in do_scsi_request_sense() 589 static int do_scsi_inquiry(struct us_data *us, struct scsi_cmnd *srb) in do_scsi_inquiry() argument 597 usb_stor_set_xfer_buf(data_ptr, 36, srb); in do_scsi_inquiry() 601 static int sd_scsi_test_unit_ready(struct us_data *us, struct scsi_cmnd *srb) in sd_scsi_test_unit_ready() argument 615 static int sd_scsi_mode_sense(struct us_data *us, struct scsi_cmnd *srb) in sd_scsi_mode_sense() argument 626 usb_stor_set_xfer_buf(mediaWP, 12, srb); in sd_scsi_mode_sense() [all …]
|
/Linux-v5.10/drivers/scsi/ |
D | dc395x.c | 334 struct ScsiReqBlk srb; member 343 static void data_out_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 345 static void data_in_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 347 static void command_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 349 static void status_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 351 static void msgout_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 353 static void msgin_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 355 static void data_out_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 357 static void data_in_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 359 static void command_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, [all …]
|
D | 3w-xxxx.c | 418 tw_dev->srb[request_id]->sense_buffer[0] = (0x1 << 7 | 0x70); in tw_decode_sense() 421 tw_dev->srb[request_id]->sense_buffer[2] = tw_sense_table[i][1]; in tw_decode_sense() 424 tw_dev->srb[request_id]->sense_buffer[7] = 0xa; /* 10 bytes */ in tw_decode_sense() 427 tw_dev->srb[request_id]->sense_buffer[12] = tw_sense_table[i][2]; in tw_decode_sense() 430 tw_dev->srb[request_id]->sense_buffer[13] = tw_sense_table[i][3]; in tw_decode_sense() 432 tw_dev->srb[request_id]->result = (DID_OK << 16) | (CHECK_CONDITION << 1); in tw_decode_sense() 595 tw_dev->srb[request_id] = NULL; /* Flag internal command */ in tw_aen_read_queue() 957 tw_dev->srb[request_id] = NULL; in tw_chrdev_ioctl() 1162 tw_dev->srb[request_id]->result = (DID_OK << 16); in tw_setfeature() 1163 tw_dev->srb[request_id]->scsi_done(tw_dev->srb[request_id]); in tw_setfeature() [all …]
|
/Linux-v5.10/drivers/usb/image/ |
D | microtek.c | 222 static inline void mts_show_command(struct scsi_cmnd *srb) in mts_show_command() argument 226 switch (srb->cmnd[0]) { in mts_show_command() 296 MTS_DEBUG( "Command %s (%d bytes)\n", what, srb->cmd_len); in mts_show_command() 299 MTS_DEBUG( " %10ph\n", srb->cmnd); in mts_show_command() 333 static int mts_scsi_abort(struct scsi_cmnd *srb) in mts_scsi_abort() argument 335 struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]); in mts_scsi_abort() 344 static int mts_scsi_host_reset(struct scsi_cmnd *srb) in mts_scsi_host_reset() argument 346 struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]); in mts_scsi_host_reset() 361 mts_scsi_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *srb); 392 set_host_byte(context->srb, DID_ERROR); in mts_int_submit_urb() [all …]
|
/Linux-v5.10/drivers/scsi/qla4xxx/ |
D | ql4_isr.c | 20 struct srb *srb) in qla4xxx_copy_sense() argument 22 struct scsi_cmnd *cmd = srb->cmd; in qla4xxx_copy_sense() 38 srb->req_sense_ptr = cmd->sense_buffer; in qla4xxx_copy_sense() 39 srb->req_sense_len = sense_len; in qla4xxx_copy_sense() 55 srb->flags |= SRB_GOT_SENSE; in qla4xxx_copy_sense() 58 srb->req_sense_ptr += sense_len; in qla4xxx_copy_sense() 59 srb->req_sense_len -= sense_len; in qla4xxx_copy_sense() 60 if (srb->req_sense_len != 0) in qla4xxx_copy_sense() 61 ha->status_srb = srb; in qla4xxx_copy_sense() 77 struct srb *srb = ha->status_srb; in qla4xxx_status_cont_entry() local [all …]
|