/drivers/staging/rts5208/ |
D | rtsx_scsi.c | 35 struct scsi_cmnd *srb = chip->srb; in scsi_show_command() local 40 switch (srb->cmnd[0]) { in scsi_show_command() 314 if (srb->cmnd[0] != TEST_UNIT_READY) in scsi_show_command() 316 what, srb->cmd_len); in scsi_show_command() 319 len = min_t(unsigned short, srb->cmd_len, 16); in scsi_show_command() 320 dev_dbg(rtsx_dev(chip), "%*ph\n", len, srb->cmnd); in scsi_show_command() 422 static int test_unit_ready(struct scsi_cmnd *srb, struct rtsx_chip *chip) in test_unit_ready() argument 424 unsigned int lun = SCSI_LUN(srb); in test_unit_ready() 438 if (get_lun_card(chip, SCSI_LUN(srb)) == SD_CARD) { in test_unit_ready() 474 static int inquiry(struct scsi_cmnd *srb, struct rtsx_chip *chip) in inquiry() argument [all …]
|
D | spi.c | 520 int spi_get_status(struct scsi_cmnd *srb, struct rtsx_chip *chip) in spi_get_status() argument 527 min_t(int, scsi_bufflen(srb), 1), srb); in spi_get_status() 528 scsi_set_resid(srb, scsi_bufflen(srb) - 1); in spi_get_status() 533 int spi_set_parameter(struct scsi_cmnd *srb, struct rtsx_chip *chip) in spi_set_parameter() argument 540 spi->spi_clock = ((u16)(srb->cmnd[8]) << 8) | srb->cmnd[9]; in spi_set_parameter() 542 spi->spi_clock = srb->cmnd[3]; in spi_set_parameter() 544 spi->clk_div = ((u16)(srb->cmnd[4]) << 8) | srb->cmnd[5]; in spi_set_parameter() 545 spi->write_en = srb->cmnd[6]; in spi_set_parameter() 553 int spi_read_flash_id(struct scsi_cmnd *srb, struct rtsx_chip *chip) in spi_read_flash_id() argument 561 len = ((u16)(srb->cmnd[7]) << 8) | srb->cmnd[8]; in spi_read_flash_id() [all …]
|
D | rtsx.c | 126 static int queuecommand_lck(struct scsi_cmnd *srb, in queuecommand_lck() argument 129 struct rtsx_dev *dev = host_to_rtsx(srb->device->host); in queuecommand_lck() 133 if (chip->srb != NULL) { in queuecommand_lck() 135 chip->srb); in queuecommand_lck() 142 srb->result = DID_NO_CONNECT << 16; in queuecommand_lck() 143 done(srb); in queuecommand_lck() 148 srb->scsi_done = done; in queuecommand_lck() 149 chip->srb = srb; in queuecommand_lck() 162 static int command_abort(struct scsi_cmnd *srb) in DEF_SCSI_QCMD() 164 struct Scsi_Host *host = srb->device->host; in DEF_SCSI_QCMD() [all …]
|
D | spi.h | 56 int spi_get_status(struct scsi_cmnd *srb, struct rtsx_chip *chip); 57 int spi_set_parameter(struct scsi_cmnd *srb, struct rtsx_chip *chip); 58 int spi_read_flash_id(struct scsi_cmnd *srb, struct rtsx_chip *chip); 59 int spi_read_flash(struct scsi_cmnd *srb, struct rtsx_chip *chip); 60 int spi_write_flash(struct scsi_cmnd *srb, struct rtsx_chip *chip); 61 int spi_erase_flash(struct scsi_cmnd *srb, struct rtsx_chip *chip); 62 int spi_write_flash_status(struct scsi_cmnd *srb, struct rtsx_chip *chip);
|
D | rtsx_transport.c | 42 unsigned int buflen, struct scsi_cmnd *srb, unsigned int *index, in rtsx_stor_access_xfer_buf() argument 49 if (scsi_sg_count(srb) == 0) { in rtsx_stor_access_xfer_buf() 50 if (*offset >= scsi_bufflen(srb)) in rtsx_stor_access_xfer_buf() 52 cnt = min(buflen, scsi_bufflen(srb) - *offset); in rtsx_stor_access_xfer_buf() 54 memcpy((unsigned char *) scsi_sglist(srb) + *offset, in rtsx_stor_access_xfer_buf() 57 memcpy(buffer, (unsigned char *) scsi_sglist(srb) + in rtsx_stor_access_xfer_buf() 70 (struct scatterlist *) scsi_sglist(srb) in rtsx_stor_access_xfer_buf() 78 while (cnt < buflen && *index < scsi_sg_count(srb)) { in rtsx_stor_access_xfer_buf() 128 unsigned int buflen, struct scsi_cmnd *srb) in rtsx_stor_set_xfer_buf() argument 132 rtsx_stor_access_xfer_buf(buffer, buflen, srb, &index, &offset, in rtsx_stor_set_xfer_buf() [all …]
|
D | ms.h | 205 int ms_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip, 207 int mspro_format(struct scsi_cmnd *srb, struct rtsx_chip *chip, 218 int mg_set_leaf_id(struct scsi_cmnd *srb, struct rtsx_chip *chip); 219 int mg_get_local_EKB(struct scsi_cmnd *srb, struct rtsx_chip *chip); 220 int mg_chg(struct scsi_cmnd *srb, struct rtsx_chip *chip); 221 int mg_get_rsp_chg(struct scsi_cmnd *srb, struct rtsx_chip *chip); 222 int mg_rsp(struct scsi_cmnd *srb, struct rtsx_chip *chip); 223 int mg_get_ICV(struct scsi_cmnd *srb, struct rtsx_chip *chip); 224 int mg_set_ICV(struct scsi_cmnd *srb, struct rtsx_chip *chip);
|
D | sd.c | 3736 int sd_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip, u32 start_sector, argument 3744 if (srb->sc_data_direction == DMA_FROM_DEVICE) { 3788 ((sd_card->pre_dir != srb->sc_data_direction) || 3854 trans_dma_enable(srb->sc_data_direction, chip, sector_cnt * 512, 3857 if (srb->sc_data_direction == DMA_FROM_DEVICE) { 3870 if (srb->sc_data_direction == DMA_FROM_DEVICE) { 3890 trans_dma_enable(srb->sc_data_direction, chip, 3934 trans_dma_enable(srb->sc_data_direction, chip, 3948 retval = rtsx_transfer_data(chip, SD_CARD, scsi_sglist(srb), 3949 scsi_bufflen(srb), scsi_sg_count(srb), [all …]
|
/drivers/scsi/ |
D | dc395x.c | 335 struct ScsiReqBlk srb; member 344 static void data_out_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 346 static void data_in_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 348 static void command_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 350 static void status_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 352 static void msgout_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 354 static void msgin_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 356 static void data_out_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 358 static void data_in_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 360 static void command_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, [all …]
|
D | 3w-xxxx.c | 419 tw_dev->srb[request_id]->sense_buffer[0] = (0x1 << 7 | 0x70); in tw_decode_sense() 422 tw_dev->srb[request_id]->sense_buffer[2] = tw_sense_table[i][1]; in tw_decode_sense() 425 tw_dev->srb[request_id]->sense_buffer[7] = 0xa; /* 10 bytes */ in tw_decode_sense() 428 tw_dev->srb[request_id]->sense_buffer[12] = tw_sense_table[i][2]; in tw_decode_sense() 431 tw_dev->srb[request_id]->sense_buffer[13] = tw_sense_table[i][3]; in tw_decode_sense() 433 tw_dev->srb[request_id]->result = (DID_OK << 16) | (CHECK_CONDITION << 1); in tw_decode_sense() 596 tw_dev->srb[request_id] = NULL; /* Flag internal command */ in tw_aen_read_queue() 956 tw_dev->srb[request_id] = NULL; in tw_chrdev_ioctl() 1154 tw_dev->srb[request_id]->result = (DID_OK << 16); in tw_setfeature() 1155 tw_dev->srb[request_id]->scsi_done(tw_dev->srb[request_id]); in tw_setfeature() [all …]
|
/drivers/usb/storage/ |
D | cypress_atacb.c | 85 static void cypress_atacb_passthrough(struct scsi_cmnd *srb, struct us_data *us) in cypress_atacb_passthrough() argument 89 if (likely(srb->cmnd[0] != ATA_16 && srb->cmnd[0] != ATA_12)) { in cypress_atacb_passthrough() 90 usb_stor_transparent_scsi_command(srb, us); in cypress_atacb_passthrough() 94 memcpy(save_cmnd, srb->cmnd, sizeof(save_cmnd)); in cypress_atacb_passthrough() 95 memset(srb->cmnd, 0, MAX_COMMAND_SIZE); in cypress_atacb_passthrough() 111 srb->cmd_len = 16; in cypress_atacb_passthrough() 113 srb->cmnd[0] = 0x24; /* bVSCBSignature : vendor-specific command in cypress_atacb_passthrough() 116 srb->cmnd[1] = 0x24; /* bVSCBSubCommand : 0x24 for ATACB */ in cypress_atacb_passthrough() 118 srb->cmnd[3] = 0xff - 1; /* features, sector count, lba low, lba med in cypress_atacb_passthrough() 120 srb->cmnd[4] = 1; /* TransferBlockCount : 512 */ in cypress_atacb_passthrough() [all …]
|
D | protocol.c | 60 void usb_stor_pad12_command(struct scsi_cmnd *srb, struct us_data *us) in usb_stor_pad12_command() argument 69 for (; srb->cmd_len < 12; srb->cmd_len++) in usb_stor_pad12_command() 70 srb->cmnd[srb->cmd_len] = 0; in usb_stor_pad12_command() 73 usb_stor_invoke_transport(srb, us); in usb_stor_pad12_command() 76 void usb_stor_ufi_command(struct scsi_cmnd *srb, struct us_data *us) in usb_stor_ufi_command() argument 86 for (; srb->cmd_len < 12; srb->cmd_len++) in usb_stor_ufi_command() 87 srb->cmnd[srb->cmd_len] = 0; in usb_stor_ufi_command() 90 srb->cmd_len = 12; in usb_stor_ufi_command() 95 switch (srb->cmnd[0]) { in usb_stor_ufi_command() 99 srb->cmnd[4] = 36; in usb_stor_ufi_command() [all …]
|
D | transport.c | 466 struct scsi_cmnd* srb) in usb_stor_bulk_srb() argument 469 int result = usb_stor_bulk_transfer_sglist(us, pipe, scsi_sglist(srb), in usb_stor_bulk_srb() 470 scsi_sg_count(srb), scsi_bufflen(srb), in usb_stor_bulk_srb() 473 scsi_set_resid(srb, scsi_bufflen(srb) - partial); in usb_stor_bulk_srb() 522 static void last_sector_hacks(struct us_data *us, struct scsi_cmnd *srb) in last_sector_hacks() argument 545 if (srb->cmnd[0] != READ_10 && srb->cmnd[0] != WRITE_10) in last_sector_hacks() 549 sector = (srb->cmnd[2] << 24) | (srb->cmnd[3] << 16) | in last_sector_hacks() 550 (srb->cmnd[4] << 8) | (srb->cmnd[5]); in last_sector_hacks() 551 disk = srb->request->rq_disk; in last_sector_hacks() 560 if (srb->result == SAM_STAT_GOOD && scsi_get_resid(srb) == 0) { in last_sector_hacks() [all …]
|
D | jumpshot.c | 225 usb_stor_access_xfer_buf(buffer, len, us->srb, in jumpshot_read_data() 281 usb_stor_access_xfer_buf(buffer, len, us->srb, in jumpshot_write_data() 378 struct scsi_cmnd * srb, in jumpshot_handle_mode_sense() argument 398 pc = srb->cmnd[2] >> 6; in jumpshot_handle_mode_sense() 399 page_code = srb->cmnd[2] & 0x3F; in jumpshot_handle_mode_sense() 469 usb_stor_set_xfer_buf(ptr, i, srb); in jumpshot_handle_mode_sense() 485 static int jumpshot_transport(struct scsi_cmnd *srb, struct us_data *us) in jumpshot_transport() argument 505 if (srb->cmnd[0] == INQUIRY) { in jumpshot_transport() 512 if (srb->cmnd[0] == READ_CAPACITY) { in jumpshot_transport() 530 usb_stor_set_xfer_buf(ptr, 8, srb); in jumpshot_transport() [all …]
|
D | datafab.c | 213 usb_stor_access_xfer_buf(buffer, len, us->srb, in datafab_read_data() 276 usb_stor_access_xfer_buf(buffer, len, us->srb, in datafab_write_data() 449 struct scsi_cmnd * srb, in datafab_handle_mode_sense() argument 474 pc = srb->cmnd[2] >> 6; in datafab_handle_mode_sense() 475 page_code = srb->cmnd[2] & 0x3F; in datafab_handle_mode_sense() 545 usb_stor_set_xfer_buf(ptr, i, srb); in datafab_handle_mode_sense() 559 static int datafab_transport(struct scsi_cmnd *srb, struct us_data *us) in datafab_transport() argument 580 if (srb->cmnd[0] == INQUIRY) { in datafab_transport() 587 if (srb->cmnd[0] == READ_CAPACITY) { in datafab_transport() 600 usb_stor_set_xfer_buf(ptr, 8, srb); in datafab_transport() [all …]
|
D | shuttle_usbat.c | 160 static int usbat_flash_transport(struct scsi_cmnd * srb, struct us_data *us); 161 static int usbat_hp8200e_transport(struct scsi_cmnd *srb, struct us_data *us); 1190 usb_stor_access_xfer_buf(buffer, len, us->srb, in usbat_flash_read_data() 1266 usb_stor_access_xfer_buf(buffer, len, us->srb, in usbat_flash_write_data() 1301 struct scsi_cmnd *srb) in usbat_hp8200e_handle_read10() argument 1310 usb_stor_dbg(us, "transfersize %d\n", srb->transfersize); in usbat_hp8200e_handle_read10() 1312 if (scsi_bufflen(srb) < 0x10000) { in usbat_hp8200e_handle_read10() 1319 scsi_sglist(srb), in usbat_hp8200e_handle_read10() 1320 scsi_bufflen(srb), scsi_sg_count(srb), 1); in usbat_hp8200e_handle_read10() 1338 srb->transfersize = scsi_bufflen(srb)/len; in usbat_hp8200e_handle_read10() [all …]
|
D | isd200.c | 341 struct scsi_cmnd srb; member 410 static void isd200_build_sense(struct us_data *us, struct scsi_cmnd *srb) in isd200_build_sense() argument 413 struct sense_data *buf = (struct sense_data *) &srb->sense_buffer[0]; in isd200_build_sense() 463 struct scsi_cmnd *srb = &info->srb; in isd200_set_srb() local 468 srb->sc_data_direction = dir; in isd200_set_srb() 469 srb->sdb.table.sgl = buff ? &info->sg : NULL; in isd200_set_srb() 470 srb->sdb.length = bufflen; in isd200_set_srb() 471 srb->sdb.table.nents = buff ? 1 : 0; in isd200_set_srb() 474 static void isd200_srb_set_bufflen(struct scsi_cmnd *srb, unsigned bufflen) in isd200_srb_set_bufflen() argument 476 srb->sdb.length = bufflen; in isd200_srb_set_bufflen() [all …]
|
D | scsiglue.c | 328 static int queuecommand_lck(struct scsi_cmnd *srb, in queuecommand_lck() argument 331 struct us_data *us = host_to_us(srb->device->host); in queuecommand_lck() 334 if (us->srb != NULL) { in queuecommand_lck() 336 __func__, us->srb); in queuecommand_lck() 343 srb->result = DID_NO_CONNECT << 16; in queuecommand_lck() 344 done(srb); in queuecommand_lck() 349 (srb->cmnd[0] == ATA_12 || srb->cmnd[0] == ATA_16)) { in queuecommand_lck() 350 memcpy(srb->sense_buffer, usb_stor_sense_invalidCDB, in queuecommand_lck() 352 srb->result = SAM_STAT_CHECK_CONDITION; in queuecommand_lck() 353 done(srb); in queuecommand_lck() [all …]
|
D | sddr09.c | 64 static int sddr09_transport(struct scsi_cmnd *srb, struct us_data *us); 823 usb_stor_access_xfer_buf(buffer, len, us->srb, in sddr09_read_data() 1035 usb_stor_access_xfer_buf(buffer, len, us->srb, in sddr09_write_data() 1499 static int dpcm_transport(struct scsi_cmnd *srb, struct us_data *us) in dpcm_transport() argument 1503 usb_stor_dbg(us, "LUN=%d\n", (u8)srb->device->lun); in dpcm_transport() 1505 switch (srb->device->lun) { in dpcm_transport() 1511 ret = usb_stor_CB_transport(srb, us); in dpcm_transport() 1523 srb->device->lun = 0; in dpcm_transport() 1524 ret = sddr09_transport(srb, us); in dpcm_transport() 1525 srb->device->lun = 1; in dpcm_transport() [all …]
|
D | sddr55.c | 300 usb_stor_access_xfer_buf(buffer, len, us->srb, in sddr55_read_data() 369 usb_stor_access_xfer_buf(buffer, len, us->srb, in sddr55_write_data() 780 static int sddr55_transport(struct scsi_cmnd *srb, struct us_data *us) in sddr55_transport() argument 810 if (srb->cmnd[0] == REQUEST_SENSE) { in sddr55_transport() 819 usb_stor_set_xfer_buf (ptr, sizeof info->sense_data, srb); in sddr55_transport() 830 if (srb->cmnd[0] == INQUIRY) { in sddr55_transport() 860 if (srb->cmnd[0] == READ_CAPACITY) { in sddr55_transport() 884 usb_stor_set_xfer_buf(ptr, 8, srb); in sddr55_transport() 891 if (srb->cmnd[0] == MODE_SENSE_10) { in sddr55_transport() 895 usb_stor_set_xfer_buf(ptr, sizeof(mode_page_01), srb); in sddr55_transport() [all …]
|
D | freecom.c | 155 freecom_readdata (struct scsi_cmnd *srb, struct us_data *us, in freecom_readdata() argument 179 result = usb_stor_bulk_srb(us, ipipe, srb); in freecom_readdata() 188 freecom_writedata (struct scsi_cmnd *srb, struct us_data *us, in freecom_writedata() argument 212 result = usb_stor_bulk_srb(us, opipe, srb); in freecom_writedata() 224 static int freecom_transport(struct scsi_cmnd *srb, struct us_data *us) in freecom_transport() argument 245 memcpy (fcb->Atapi, srb->cmnd, 12); in freecom_transport() 248 US_DEBUG(pdump(us, srb->cmnd, 12)); in freecom_transport() 326 usb_stor_dbg(us, "SCSI requested %d\n", scsi_bufflen(srb)); in freecom_transport() 329 switch (srb->cmnd[0]) { in freecom_transport() 337 length = scsi_bufflen(srb); in freecom_transport() [all …]
|
D | usb.c | 301 usb_stor_set_xfer_buf(data, data_len, us->srb); in fill_inquiry_response() 324 if (us->srb == NULL) { in usb_stor_control_thread() 333 us->srb->result = DID_ABORT << 16; in usb_stor_control_thread() 342 if (us->srb->sc_data_direction == DMA_BIDIRECTIONAL) { in usb_stor_control_thread() 344 us->srb->result = DID_ERROR << 16; in usb_stor_control_thread() 350 else if (us->srb->device->id && in usb_stor_control_thread() 353 us->srb->device->id, in usb_stor_control_thread() 354 us->srb->device->lun); in usb_stor_control_thread() 355 us->srb->result = DID_BAD_TARGET << 16; in usb_stor_control_thread() 358 else if (us->srb->device->lun > us->max_lun) { in usb_stor_control_thread() [all …]
|
D | alauda.c | 126 #define MEDIA_PORT(us) us->srb->device->lun 996 usb_stor_access_xfer_buf(buffer, len, us->srb, in alauda_read_data() 1071 usb_stor_access_xfer_buf(buffer, len, us->srb, in alauda_write_data() 1133 static int alauda_transport(struct scsi_cmnd *srb, struct us_data *us) in alauda_transport() argument 1142 if (srb->cmnd[0] == INQUIRY) { in alauda_transport() 1149 if (srb->cmnd[0] == TEST_UNIT_READY) { in alauda_transport() 1154 if (srb->cmnd[0] == READ_CAPACITY) { in alauda_transport() 1172 usb_stor_set_xfer_buf(ptr, 8, srb); in alauda_transport() 1176 if (srb->cmnd[0] == READ_10) { in alauda_transport() 1183 page = short_pack(srb->cmnd[3], srb->cmnd[2]); in alauda_transport() [all …]
|
D | ene_ub6250.c | 536 result = usb_stor_bulk_srb(us, pipe, us->srb); in ene_send_scsi_cmd() 574 if (us->srb != NULL) in ene_send_scsi_cmd() 575 scsi_set_resid(us->srb, max(scsi_get_resid(us->srb), in ene_send_scsi_cmd() 585 static int sd_scsi_test_unit_ready(struct us_data *us, struct scsi_cmnd *srb) in sd_scsi_test_unit_ready() argument 599 static int sd_scsi_inquiry(struct us_data *us, struct scsi_cmnd *srb) in sd_scsi_inquiry() argument 607 usb_stor_set_xfer_buf(data_ptr, 36, srb); in sd_scsi_inquiry() 611 static int sd_scsi_mode_sense(struct us_data *us, struct scsi_cmnd *srb) in sd_scsi_mode_sense() argument 622 usb_stor_set_xfer_buf(mediaWP, 12, srb); in sd_scsi_mode_sense() 624 usb_stor_set_xfer_buf(mediaNoWP, 12, srb); in sd_scsi_mode_sense() 630 static int sd_scsi_read_capacity(struct us_data *us, struct scsi_cmnd *srb) in sd_scsi_read_capacity() argument [all …]
|
/drivers/usb/image/ |
D | microtek.c | 225 static inline void mts_show_command(struct scsi_cmnd *srb) in mts_show_command() argument 229 switch (srb->cmnd[0]) { in mts_show_command() 299 MTS_DEBUG( "Command %s (%d bytes)\n", what, srb->cmd_len); in mts_show_command() 302 MTS_DEBUG( " %10ph\n", srb->cmnd); in mts_show_command() 336 static int mts_scsi_abort(struct scsi_cmnd *srb) in mts_scsi_abort() argument 338 struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]); in mts_scsi_abort() 347 static int mts_scsi_host_reset(struct scsi_cmnd *srb) in mts_scsi_host_reset() argument 349 struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]); in mts_scsi_host_reset() 364 mts_scsi_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *srb); 395 context->srb->result = DID_ERROR << 16; in mts_int_submit_urb() [all …]
|
/drivers/scsi/qla4xxx/ |
D | ql4_isr.c | 21 struct srb *srb) in qla4xxx_copy_sense() argument 23 struct scsi_cmnd *cmd = srb->cmd; in qla4xxx_copy_sense() 39 srb->req_sense_ptr = cmd->sense_buffer; in qla4xxx_copy_sense() 40 srb->req_sense_len = sense_len; in qla4xxx_copy_sense() 56 srb->flags |= SRB_GOT_SENSE; in qla4xxx_copy_sense() 59 srb->req_sense_ptr += sense_len; in qla4xxx_copy_sense() 60 srb->req_sense_len -= sense_len; in qla4xxx_copy_sense() 61 if (srb->req_sense_len != 0) in qla4xxx_copy_sense() 62 ha->status_srb = srb; in qla4xxx_copy_sense() 78 struct srb *srb = ha->status_srb; in qla4xxx_status_cont_entry() local [all …]
|