| /linux/drivers/usb/storage/ |
| H A 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 …]
|
| H A 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 …]
|
| H A D | transport.c | 467 struct scsi_cmnd* srb) in usb_stor_bulk_srb() argument 470 int result = usb_stor_bulk_transfer_sglist(us, pipe, scsi_sglist(srb), in usb_stor_bulk_srb() 471 scsi_sg_count(srb), scsi_bufflen(srb), in usb_stor_bulk_srb() 474 scsi_set_resid(srb, scsi_bufflen(srb) - partial); in usb_stor_bulk_srb() 524 static void last_sector_hacks(struct us_data *us, struct scsi_cmnd *srb) in last_sector_hacks() argument 548 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() 554 disk = scsi_cmd_to_rq(srb)->q->disk; in last_sector_hacks() 563 if (srb->result == SAM_STAT_GOOD && scsi_get_resid(srb) == 0) { in last_sector_hacks() [all …]
|
| H A 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 …]
|
| H A 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() 437 struct scsi_cmnd * srb, in datafab_handle_mode_sense() argument 462 pc = srb->cmnd[2] >> 6; in datafab_handle_mode_sense() 463 page_code = srb->cmnd[2] & 0x3F; in datafab_handle_mode_sense() 533 usb_stor_set_xfer_buf(ptr, i, srb); in datafab_handle_mode_sense() 547 static int datafab_transport(struct scsi_cmnd *srb, struct us_data *us) in datafab_transport() argument 568 if (srb->cmnd[0] == INQUIRY) { in datafab_transport() 575 if (srb->cmnd[0] == READ_CAPACITY) { in datafab_transport() 588 usb_stor_set_xfer_buf(ptr, 8, srb); in datafab_transport() [all …]
|
| H A D | shuttle_usbat.c | 150 static int usbat_flash_transport(struct scsi_cmnd * srb, struct us_data *us); 151 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 …]
|
| H A 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 …]
|
| H A 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 …]
|
| H A 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() 781 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() 832 if (srb->cmnd[0] == INQUIRY) { in sddr55_transport() 865 if (srb->cmnd[0] == READ_CAPACITY) { in sddr55_transport() 893 usb_stor_set_xfer_buf(ptr, 8, srb); in sddr55_transport() 900 if (srb->cmnd[0] == MODE_SENSE_10) { in sddr55_transport() 904 usb_stor_set_xfer_buf(ptr, sizeof(mode_page_01), srb); in sddr55_transport() [all …]
|
| H A 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 …]
|
| H A D | usb.c | 376 usb_stor_set_xfer_buf(data, data_len, us->srb); in fill_inquiry_response() 384 struct scsi_cmnd *srb; in usb_stor_control_thread() local 400 srb = us->srb; in usb_stor_control_thread() 401 if (srb == NULL) { in usb_stor_control_thread() 410 srb->result = DID_ABORT << 16; in usb_stor_control_thread() 420 if (srb->sc_data_direction == DMA_BIDIRECTIONAL) { in usb_stor_control_thread() 422 srb->result = DID_ERROR << 16; in usb_stor_control_thread() 429 else if (srb->device->id && in usb_stor_control_thread() 432 srb->device->id, in usb_stor_control_thread() 433 srb->device->lun); in usb_stor_control_thread() [all …]
|
| H A D | ene_ub6250.c | 519 result = usb_stor_bulk_srb(us, pipe, us->srb); in ene_send_scsi_cmd() 559 if (us->srb != NULL) in ene_send_scsi_cmd() 560 scsi_set_resid(us->srb, max(scsi_get_resid(us->srb), in ene_send_scsi_cmd() 570 static int do_scsi_request_sense(struct us_data *us, struct scsi_cmnd *srb) in do_scsi_request_sense() argument 582 usb_stor_set_xfer_buf(buf, sizeof(buf), srb); in do_scsi_request_sense() 586 static int do_scsi_inquiry(struct us_data *us, struct scsi_cmnd *srb) in do_scsi_inquiry() argument 594 usb_stor_set_xfer_buf(data_ptr, 36, srb); in do_scsi_inquiry() 598 static int sd_scsi_test_unit_ready(struct us_data *us, struct scsi_cmnd *srb) in sd_scsi_test_unit_ready() argument 612 static int sd_scsi_mode_sense(struct us_data *us, struct scsi_cmnd *srb) in sd_scsi_mode_sense() argument 623 usb_stor_set_xfer_buf(mediaWP, 12, srb); in sd_scsi_mode_sense() [all …]
|
| H A D | alauda.c | 116 #define MEDIA_PORT(us) us->srb->device->lun 996 usb_stor_access_xfer_buf(buffer, len, us->srb, in alauda_read_data() 1068 usb_stor_access_xfer_buf(buffer, len, us->srb, in alauda_write_data() 1130 static int alauda_transport(struct scsi_cmnd *srb, struct us_data *us) in alauda_transport() argument 1139 if (srb->cmnd[0] == INQUIRY) { in alauda_transport() 1146 if (srb->cmnd[0] == TEST_UNIT_READY) { in alauda_transport() 1151 if (srb->cmnd[0] == READ_CAPACITY) { in alauda_transport() 1169 usb_stor_set_xfer_buf(ptr, 8, srb); in alauda_transport() 1173 if (srb->cmnd[0] == READ_10) { in alauda_transport() 1180 page = short_pack(srb->cmnd[3], srb->cmnd[2]); in alauda_transport() [all …]
|
| H A D | realtek_cr.c | 117 #define SCSI_LUN(srb) ((srb)->device->lun) argument 787 static inline int working_scsi(struct scsi_cmnd *srb) in working_scsi() argument 789 if ((srb->cmnd[0] == TEST_UNIT_READY) || in working_scsi() 790 (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL)) { in working_scsi() 797 static void rts51x_invoke_transport(struct scsi_cmnd *srb, struct us_data *us) in rts51x_invoke_transport() argument 809 if (working_scsi(srb)) { in rts51x_invoke_transport() 819 chip->proto_handler_backup(srb, us); in rts51x_invoke_transport() 823 if ((srb->cmnd[0] == TEST_UNIT_READY) && in rts51x_invoke_transport() 825 if (TST_LUN_READY(chip, srb->device->lun)) { in rts51x_invoke_transport() 826 srb->result = SAM_STAT_GOOD; in rts51x_invoke_transport() [all …]
|
| H A D | debug.c | 41 void usb_stor_show_command(const struct us_data *us, struct scsi_cmnd *srb) in usb_stor_show_command() argument 45 switch (srb->cmnd[0]) { in usb_stor_show_command() 138 usb_stor_dbg(us, "Command %s (%d bytes)\n", what, srb->cmd_len); in usb_stor_show_command() 139 usb_stor_dbg(us, "bytes: %*ph\n", min_t(int, srb->cmd_len, 16), in usb_stor_show_command() 140 (const unsigned char *)srb->cmnd); in usb_stor_show_command()
|
| H A D | karma.c | 145 static int rio_karma_transport(struct scsi_cmnd *srb, struct us_data *us) in rio_karma_transport() argument 150 if (srb->cmnd[0] == READ_10 && !data->in_storage) { in rio_karma_transport() 156 return usb_stor_Bulk_transport(srb, us); in rio_karma_transport() 157 } else if (srb->cmnd[0] == START_STOP) { in rio_karma_transport() 165 return usb_stor_Bulk_transport(srb, us); in rio_karma_transport()
|
| H A D | protocol.h | 37 unsigned int buflen, struct scsi_cmnd *srb, struct scatterlist **, 41 unsigned int buflen, struct scsi_cmnd *srb);
|
| /linux/drivers/scsi/ |
| H A D | dc395x.c | 260 struct ScsiReqBlk srb; member 269 static void data_out_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 271 static void data_in_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 273 static void command_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 275 static void status_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 277 static void msgout_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 279 static void msgin_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 281 static void data_out_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 283 static void data_in_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, 285 static void command_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, [all …]
|
| H A D | 3w-9xxx.c | 317 tw_dev->srb[request_id] = NULL; in twa_aen_drain_queue() 449 tw_dev->srb[request_id] = NULL; in twa_aen_read_queue() 510 tw_dev->srb[request_id] = NULL; in twa_aen_sync_time() 701 tw_dev->srb[request_id] = NULL; in twa_chrdev_ioctl() 1019 …memcpy(tw_dev->srb[request_id]->sense_buffer, full_command_packet->header.sense_data, TW_SENSE_DAT… in twa_fill_sense() 1020 tw_dev->srb[request_id]->result = (full_command_packet->command.newcommand.status << 1); in twa_fill_sense() 1301 if (tw_dev->srb[request_id] != NULL) { in twa_interrupt() 1313 if (tw_dev->srb[request_id] != NULL) { in twa_interrupt() 1321 if (tw_dev->srb[request_id] == NULL) { in twa_interrupt() 1332 cmd = tw_dev->srb[request_id]; in twa_interrupt() [all …]
|
| H A D | 3w-sas.c | 299 struct scsi_cmnd *srb = NULL; in twl_scsiop_execute_scsi() local 303 if (tw_dev->srb[request_id]) in twl_scsiop_execute_scsi() 304 srb = tw_dev->srb[request_id]; in twl_scsiop_execute_scsi() 318 memcpy(command_packet->cdb, srb->cmnd, TW_MAX_CDB_LEN); in twl_scsiop_execute_scsi() 322 if (srb) { in twl_scsiop_execute_scsi() 323 command_packet->unit = srb->device->id; in twl_scsiop_execute_scsi() 325 cpu_to_le16(TW_REQ_LUN_IN(srb->device->lun, request_id)); in twl_scsiop_execute_scsi() 336 if (scsi_sg_count(srb)) { in twl_scsiop_execute_scsi() 337 sg_count = scsi_dma_map(srb); in twl_scsiop_execute_scsi() 341 scsi_for_each_sg(srb, sg, sg_count, i) { in twl_scsiop_execute_scsi() [all …]
|
| /linux/drivers/usb/image/ |
| H A D | microtek.c | 226 static inline void mts_show_command(struct scsi_cmnd *srb) in mts_show_command() argument 230 switch (srb->cmnd[0]) { in mts_show_command() 300 MTS_DEBUG( "Command %s (%d bytes)\n", what, srb->cmd_len); in mts_show_command() 303 MTS_DEBUG( " %10ph\n", srb->cmnd); in mts_show_command() 331 static int mts_scsi_abort(struct scsi_cmnd *srb) in mts_scsi_abort() argument 333 struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]); in mts_scsi_abort() 342 static int mts_scsi_host_reset(struct scsi_cmnd *srb) in mts_scsi_host_reset() argument 344 struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]); in mts_scsi_host_reset() 359 struct scsi_cmnd *srb); 390 set_host_byte(context->srb, DID_ERROR); in mts_int_submit_urb() [all …]
|
| /linux/drivers/scsi/qla4xxx/ |
| H A 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 …]
|
| H A D | ql4_iocb.c | 147 static void qla4xxx_build_scsi_iocbs(struct srb *srb, in qla4xxx_build_scsi_iocbs() argument 158 cmd = srb->cmd; in qla4xxx_build_scsi_iocbs() 159 ha = srb->ha; in qla4xxx_build_scsi_iocbs() 272 int qla4xxx_send_command_to_isp(struct scsi_qla_host *ha, struct srb * srb) in qla4xxx_send_command_to_isp() argument 274 struct scsi_cmnd *cmd = srb->cmd; in qla4xxx_send_command_to_isp() 284 ddb_entry = srb->ddb; in qla4xxx_send_command_to_isp() 355 qla4xxx_build_scsi_iocbs(srb, cmd_entry, tot_dsds); in qla4xxx_send_command_to_isp() 358 srb->cmd->host_scribble = (unsigned char *)(unsigned long)index; in qla4xxx_send_command_to_isp() 361 srb->state = SRB_ACTIVE_STATE; in qla4xxx_send_command_to_isp() 362 srb->flags |= SRB_DMA_VALID; in qla4xxx_send_command_to_isp() [all …]
|
| /linux/drivers/s390/scsi/ |
| H A D | zfcp_dbf.c | 197 struct fsf_status_read_buffer *srb = req->data; in zfcp_dbf_hba_fsf_uss() local 214 if (!srb) in zfcp_dbf_hba_fsf_uss() 217 rec->u.uss.status_type = srb->status_type; in zfcp_dbf_hba_fsf_uss() 218 rec->u.uss.status_subtype = srb->status_subtype; in zfcp_dbf_hba_fsf_uss() 219 rec->u.uss.d_id = ntoh24(srb->d_id); in zfcp_dbf_hba_fsf_uss() 220 rec->u.uss.lun = srb->fcp_lun; in zfcp_dbf_hba_fsf_uss() 221 memcpy(&rec->u.uss.queue_designator, &srb->queue_designator, in zfcp_dbf_hba_fsf_uss() 225 rec->pl_len = (!srb->length) ? 0 : srb->length - in zfcp_dbf_hba_fsf_uss() 229 zfcp_dbf_pl_write(dbf, srb->payload.data, rec->pl_len, in zfcp_dbf_hba_fsf_uss() 647 struct fsf_status_read_buffer *srb = in zfcp_dbf_san_in_els() local [all …]
|
| /linux/drivers/scsi/qla2xxx/ |
| H A D | qla_nvme.h | 28 struct srb; 31 struct srb *sp; 149 void qla24xx_async_gffid_sp_done(struct srb *sp, int);
|