| /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 | 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 | scsiglue.c | 360 static int queuecommand_lck(struct scsi_cmnd *srb) in queuecommand_lck() argument 363 struct us_data *us = host_to_us(srb->device->host); in queuecommand_lck() 366 if (us->srb != NULL) { in queuecommand_lck() 368 "Error in %s: us->srb = %p\n", __func__, us->srb); in queuecommand_lck() 375 srb->result = DID_NO_CONNECT << 16; in queuecommand_lck() 376 done(srb); in queuecommand_lck() 381 (srb->cmnd[0] == ATA_12 || srb->cmnd[0] == ATA_16)) { in queuecommand_lck() 382 memcpy(srb->sense_buffer, usb_stor_sense_invalidCDB, in queuecommand_lck() 384 srb->result = SAM_STAT_CHECK_CONDITION; in queuecommand_lck() 385 done(srb); in queuecommand_lck() [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 811 if (srb->cmnd[0] == REQUEST_SENSE) { in sddr55_transport() 820 usb_stor_set_xfer_buf (ptr, sizeof info->sense_data, srb); in sddr55_transport() 833 if (srb->cmnd[0] == INQUIRY) { in sddr55_transport() 866 if (srb->cmnd[0] == READ_CAPACITY) { in sddr55_transport() 894 usb_stor_set_xfer_buf(ptr, 8, srb); in sddr55_transport() 901 if (srb->cmnd[0] == MODE_SENSE_10) { in sddr55_transport() 905 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 | 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 | 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);
|
| H A D | debug.h | 33 void usb_stor_show_command(const struct us_data *us, struct scsi_cmnd *srb);
|
| H A D | transport.h | 85 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 | a100u2w.c | 617 if (host_scb->status && escb->srb == cmd) in orc_device_reset() 648 escb->srb = NULL; in orc_device_reset() 649 escb->srb = cmd; in orc_device_reset() 779 if (scb->status && escb->srb == cmd) { in inia100_abort_cmd() 785 escb->srb = NULL; in inia100_abort_cmd() 851 escb->srb = cmd; in inia100_build_scb() 994 if ((cmd = (struct scsi_cmnd *) escb->srb) == NULL) { in inia100_scb_handler() 999 escb->srb = NULL; in inia100_scb_handler()
|
| H A D | qla1280.c | 406 static int qla1280_abort_command(struct scsi_qla_host *, struct srb *, int); 409 static int qla1280_64bit_start_scsi(struct scsi_qla_host *, struct srb *); 411 static int qla1280_32bit_start_scsi(struct scsi_qla_host *, struct srb *); 689 struct srb *sp = scsi_cmd_priv(cmd); in qla1280_queuecommand_lck() 736 _qla1280_wait_for_single_command(struct scsi_qla_host *ha, struct srb *sp, in _qla1280_wait_for_single_command() 754 qla1280_wait_for_single_command(struct scsi_qla_host *ha, struct srb *sp) in qla1280_wait_for_single_command() 767 struct srb *sp; in qla1280_wait_for_pending_commands() 813 struct srb *sp; in qla1280_error_action() 1234 struct srb *sp; in qla1280_done() 1244 sp = list_entry(done_q->next, struct srb, list); in qla1280_done() [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 mts_scsi_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *srb); 390 set_host_byte(context->srb, DID_ERROR); in mts_int_submit_urb() [all …]
|
| H A D | microtek.h | 19 struct scsi_cmnd *srb; member
|
| /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 …]
|
| H A D | ql4_glbl.h | 14 int qla4xxx_send_command_to_isp(struct scsi_qla_host *ha, struct srb *srb); 23 int qla4xxx_abort_task(struct scsi_qla_host *ha, struct srb *srb); 72 struct srb *qla4xxx_del_from_active_array(struct scsi_qla_host *ha,
|
| H A D | ql4_os.c | 4053 static struct srb* qla4xxx_get_new_srb(struct scsi_qla_host *ha, in qla4xxx_get_new_srb() 4057 struct srb *srb; in qla4xxx_get_new_srb() local 4059 srb = mempool_alloc(ha->srb_mempool, GFP_ATOMIC); in qla4xxx_get_new_srb() 4060 if (!srb) in qla4xxx_get_new_srb() 4061 return srb; in qla4xxx_get_new_srb() 4063 kref_init(&srb->srb_ref); in qla4xxx_get_new_srb() 4064 srb->ha = ha; in qla4xxx_get_new_srb() 4065 srb->ddb = ddb_entry; in qla4xxx_get_new_srb() 4066 srb->cmd = cmd; in qla4xxx_get_new_srb() 4067 srb->flags = 0; in qla4xxx_get_new_srb() [all …]
|
| H A D | ql4_def.h | 223 struct srb *srb; member 234 struct srb { struct 729 struct srb *status_srb;
|
| /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);
|
| H A D | qla_nvme.c | 23 struct srb *sp; 166 struct srb *sp = container_of(kref, struct srb, cmd_kref); in qla_nvme_release_fcp_cmd_kref() 198 struct srb *sp = container_of(kref, struct srb, cmd_kref); in qla_nvme_release_ls_cmd_kref() 243 struct srb *sp = container_of(kref, struct srb, cmd_kref); in qla_nvme_release_lsrsp_cmd_kref()
|