Home
last modified time | relevance | path

Searched refs:srb (Results 1 – 25 of 72) sorted by relevance

123

/Linux-v4.19/drivers/staging/rts5208/
Drtsx_scsi.c35 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 …]
Dspi.c481 int spi_get_status(struct scsi_cmnd *srb, struct rtsx_chip *chip) in spi_get_status() argument
488 min_t(int, scsi_bufflen(srb), 1), srb); in spi_get_status()
489 scsi_set_resid(srb, scsi_bufflen(srb) - 1); in spi_get_status()
494 int spi_set_parameter(struct scsi_cmnd *srb, struct rtsx_chip *chip) in spi_set_parameter() argument
501 spi->spi_clock = ((u16)(srb->cmnd[8]) << 8) | srb->cmnd[9]; in spi_set_parameter()
503 spi->spi_clock = srb->cmnd[3]; in spi_set_parameter()
505 spi->clk_div = ((u16)(srb->cmnd[4]) << 8) | srb->cmnd[5]; in spi_set_parameter()
506 spi->write_en = srb->cmnd[6]; in spi_set_parameter()
516 int spi_read_flash_id(struct scsi_cmnd *srb, struct rtsx_chip *chip) in spi_read_flash_id() argument
524 len = ((u16)(srb->cmnd[7]) << 8) | srb->cmnd[8]; in spi_read_flash_id()
[all …]
Dspi.h56 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);
Drtsx.c132 static int queuecommand_lck(struct scsi_cmnd *srb, in queuecommand_lck() argument
135 struct rtsx_dev *dev = host_to_rtsx(srb->device->host); in queuecommand_lck()
139 if (chip->srb) { in queuecommand_lck()
141 chip->srb); in queuecommand_lck()
148 srb->result = DID_NO_CONNECT << 16; in queuecommand_lck()
149 done(srb); in queuecommand_lck()
154 srb->scsi_done = done; in queuecommand_lck()
155 chip->srb = srb; in queuecommand_lck()
168 static int command_abort(struct scsi_cmnd *srb) in DEF_SCSI_QCMD()
170 struct Scsi_Host *host = srb->device->host; in DEF_SCSI_QCMD()
[all …]
Dms.h204 int ms_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip,
206 int mspro_format(struct scsi_cmnd *srb, struct rtsx_chip *chip,
217 int mg_set_leaf_id(struct scsi_cmnd *srb, struct rtsx_chip *chip);
218 int mg_get_local_EKB(struct scsi_cmnd *srb, struct rtsx_chip *chip);
219 int mg_chg(struct scsi_cmnd *srb, struct rtsx_chip *chip);
220 int mg_get_rsp_chg(struct scsi_cmnd *srb, struct rtsx_chip *chip);
221 int mg_rsp(struct scsi_cmnd *srb, struct rtsx_chip *chip);
222 int mg_get_ICV(struct scsi_cmnd *srb, struct rtsx_chip *chip);
223 int mg_set_ICV(struct scsi_cmnd *srb, struct rtsx_chip *chip);
Drtsx_transport.c46 struct scsi_cmnd *srb, in rtsx_stor_access_xfer_buf() argument
54 if (scsi_sg_count(srb) == 0) { in rtsx_stor_access_xfer_buf()
57 if (*offset >= scsi_bufflen(srb)) in rtsx_stor_access_xfer_buf()
59 cnt = min(buflen, scsi_bufflen(srb) - *offset); in rtsx_stor_access_xfer_buf()
61 sgbuffer = (unsigned char *)scsi_sglist(srb) + *offset; in rtsx_stor_access_xfer_buf()
76 (struct scatterlist *)scsi_sglist(srb) in rtsx_stor_access_xfer_buf()
86 while (cnt < buflen && *index < scsi_sg_count(srb)) { in rtsx_stor_access_xfer_buf()
133 unsigned int buflen, struct scsi_cmnd *srb) in rtsx_stor_set_xfer_buf() argument
137 rtsx_stor_access_xfer_buf(buffer, buflen, srb, &index, &offset, in rtsx_stor_set_xfer_buf()
139 if (buflen < scsi_bufflen(srb)) in rtsx_stor_set_xfer_buf()
[all …]
Dsd.c3470 int sd_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip, u32 start_sector, argument
3478 if (srb->sc_data_direction == DMA_FROM_DEVICE) {
3520 ((sd_card->pre_dir != srb->sc_data_direction) ||
3584 trans_dma_enable(srb->sc_data_direction, chip, sector_cnt * 512,
3587 if (srb->sc_data_direction == DMA_FROM_DEVICE) {
3600 if (srb->sc_data_direction == DMA_FROM_DEVICE) {
3620 trans_dma_enable(srb->sc_data_direction, chip,
3662 trans_dma_enable(srb->sc_data_direction, chip,
3676 retval = rtsx_transfer_data(chip, SD_CARD, scsi_sglist(srb),
3677 scsi_bufflen(srb), scsi_sg_count(srb),
[all …]
Dsd.h282 int sd_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip,
294 int sd_pass_thru_mode(struct scsi_cmnd *srb, struct rtsx_chip *chip);
295 int sd_execute_no_data(struct scsi_cmnd *srb, struct rtsx_chip *chip);
296 int sd_execute_read_data(struct scsi_cmnd *srb, struct rtsx_chip *chip);
297 int sd_execute_write_data(struct scsi_cmnd *srb, struct rtsx_chip *chip);
298 int sd_get_cmd_rsp(struct scsi_cmnd *srb, struct rtsx_chip *chip);
299 int sd_hw_rst(struct scsi_cmnd *srb, struct rtsx_chip *chip);
Drtsx_transport.h34 struct scsi_cmnd *srb,
39 struct scsi_cmnd *srb);
41 struct scsi_cmnd *srb);
42 void rtsx_invoke_transport(struct scsi_cmnd *srb, struct rtsx_chip *chip);
/Linux-v4.19/drivers/usb/storage/
Dcypress_atacb.c72 static void cypress_atacb_passthrough(struct scsi_cmnd *srb, struct us_data *us) in cypress_atacb_passthrough() argument
76 if (likely(srb->cmnd[0] != ATA_16 && srb->cmnd[0] != ATA_12)) { in cypress_atacb_passthrough()
77 usb_stor_transparent_scsi_command(srb, us); in cypress_atacb_passthrough()
81 memcpy(save_cmnd, srb->cmnd, sizeof(save_cmnd)); in cypress_atacb_passthrough()
82 memset(srb->cmnd, 0, MAX_COMMAND_SIZE); in cypress_atacb_passthrough()
98 srb->cmd_len = 16; in cypress_atacb_passthrough()
100 srb->cmnd[0] = 0x24; /* in cypress_atacb_passthrough()
105 srb->cmnd[1] = 0x24; /* bVSCBSubCommand : 0x24 for ATACB */ in cypress_atacb_passthrough()
107 srb->cmnd[3] = 0xff - 1; /* in cypress_atacb_passthrough()
111 srb->cmnd[4] = 1; /* TransferBlockCount : 512 */ in cypress_atacb_passthrough()
[all …]
Dprotocol.c45 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 …]
Dtransport.c462 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 …]
Djumpshot.c213 usb_stor_access_xfer_buf(buffer, len, us->srb, in jumpshot_read_data()
269 usb_stor_access_xfer_buf(buffer, len, us->srb, in jumpshot_write_data()
366 struct scsi_cmnd * srb, in jumpshot_handle_mode_sense() argument
386 pc = srb->cmnd[2] >> 6; in jumpshot_handle_mode_sense()
387 page_code = srb->cmnd[2] & 0x3F; in jumpshot_handle_mode_sense()
457 usb_stor_set_xfer_buf(ptr, i, srb); in jumpshot_handle_mode_sense()
473 static int jumpshot_transport(struct scsi_cmnd *srb, struct us_data *us) in jumpshot_transport() argument
493 if (srb->cmnd[0] == INQUIRY) { in jumpshot_transport()
500 if (srb->cmnd[0] == READ_CAPACITY) { in jumpshot_transport()
518 usb_stor_set_xfer_buf(ptr, 8, srb); in jumpshot_transport()
[all …]
Ddatafab.c201 usb_stor_access_xfer_buf(buffer, len, us->srb, in datafab_read_data()
264 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 …]
Dshuttle_usbat.c148 static int usbat_flash_transport(struct scsi_cmnd * srb, struct us_data *us);
149 static int usbat_hp8200e_transport(struct scsi_cmnd *srb, struct us_data *us);
1179 usb_stor_access_xfer_buf(buffer, len, us->srb, in usbat_flash_read_data()
1255 usb_stor_access_xfer_buf(buffer, len, us->srb, in usbat_flash_write_data()
1290 struct scsi_cmnd *srb) in usbat_hp8200e_handle_read10() argument
1299 usb_stor_dbg(us, "transfersize %d\n", srb->transfersize); in usbat_hp8200e_handle_read10()
1301 if (scsi_bufflen(srb) < 0x10000) { in usbat_hp8200e_handle_read10()
1308 scsi_sglist(srb), in usbat_hp8200e_handle_read10()
1309 scsi_bufflen(srb), scsi_sg_count(srb), 1); in usbat_hp8200e_handle_read10()
1327 srb->transfersize = scsi_bufflen(srb)/len; in usbat_hp8200e_handle_read10()
[all …]
Disd200.c329 struct scsi_cmnd srb; member
398 static void isd200_build_sense(struct us_data *us, struct scsi_cmnd *srb) in isd200_build_sense() argument
401 struct sense_data *buf = (struct sense_data *) &srb->sense_buffer[0]; in isd200_build_sense()
451 struct scsi_cmnd *srb = &info->srb; in isd200_set_srb() local
456 srb->sc_data_direction = dir; in isd200_set_srb()
457 srb->sdb.table.sgl = buff ? &info->sg : NULL; in isd200_set_srb()
458 srb->sdb.length = bufflen; in isd200_set_srb()
459 srb->sdb.table.nents = buff ? 1 : 0; in isd200_set_srb()
462 static void isd200_srb_set_bufflen(struct scsi_cmnd *srb, unsigned bufflen) in isd200_srb_set_bufflen() argument
464 srb->sdb.length = bufflen; in isd200_srb_set_bufflen()
[all …]
Dscsiglue.c359 static int queuecommand_lck(struct scsi_cmnd *srb, in queuecommand_lck() argument
362 struct us_data *us = host_to_us(srb->device->host); in queuecommand_lck()
365 if (us->srb != NULL) { in queuecommand_lck()
367 __func__, us->srb); in queuecommand_lck()
374 srb->result = DID_NO_CONNECT << 16; in queuecommand_lck()
375 done(srb); in queuecommand_lck()
380 (srb->cmnd[0] == ATA_12 || srb->cmnd[0] == ATA_16)) { in queuecommand_lck()
381 memcpy(srb->sense_buffer, usb_stor_sense_invalidCDB, in queuecommand_lck()
383 srb->result = SAM_STAT_CHECK_CONDITION; in queuecommand_lck()
384 done(srb); in queuecommand_lck()
[all …]
Dsddr09.c52 static int sddr09_transport(struct scsi_cmnd *srb, struct us_data *us);
811 usb_stor_access_xfer_buf(buffer, len, us->srb, in sddr09_read_data()
1026 usb_stor_access_xfer_buf(buffer, len, us->srb, in sddr09_write_data()
1495 static int dpcm_transport(struct scsi_cmnd *srb, struct us_data *us) in dpcm_transport() argument
1499 usb_stor_dbg(us, "LUN=%d\n", (u8)srb->device->lun); in dpcm_transport()
1501 switch (srb->device->lun) { in dpcm_transport()
1507 ret = usb_stor_CB_transport(srb, us); in dpcm_transport()
1519 srb->device->lun = 0; in dpcm_transport()
1520 ret = sddr09_transport(srb, us); in dpcm_transport()
1521 srb->device->lun = 1; in dpcm_transport()
[all …]
Dfreecom.c151 freecom_readdata (struct scsi_cmnd *srb, struct us_data *us, in freecom_readdata() argument
175 result = usb_stor_bulk_srb(us, ipipe, srb); in freecom_readdata()
184 freecom_writedata (struct scsi_cmnd *srb, struct us_data *us, in freecom_writedata() argument
208 result = usb_stor_bulk_srb(us, opipe, srb); in freecom_writedata()
220 static int freecom_transport(struct scsi_cmnd *srb, struct us_data *us) in freecom_transport() argument
241 memcpy (fcb->Atapi, srb->cmnd, 12); in freecom_transport()
244 US_DEBUG(pdump(us, srb->cmnd, 12)); in freecom_transport()
330 usb_stor_dbg(us, "SCSI requested %d\n", scsi_bufflen(srb)); in freecom_transport()
333 switch (srb->cmnd[0]) { in freecom_transport()
341 length = scsi_bufflen(srb); in freecom_transport()
[all …]
Dsddr55.c289 usb_stor_access_xfer_buf(buffer, len, us->srb, in sddr55_read_data()
358 usb_stor_access_xfer_buf(buffer, len, us->srb, in sddr55_write_data()
774 static int sddr55_transport(struct scsi_cmnd *srb, struct us_data *us) in sddr55_transport() argument
804 if (srb->cmnd[0] == REQUEST_SENSE) { in sddr55_transport()
813 usb_stor_set_xfer_buf (ptr, sizeof info->sense_data, srb); in sddr55_transport()
826 if (srb->cmnd[0] == INQUIRY) { in sddr55_transport()
859 if (srb->cmnd[0] == READ_CAPACITY) { in sddr55_transport()
887 usb_stor_set_xfer_buf(ptr, 8, srb); in sddr55_transport()
894 if (srb->cmnd[0] == MODE_SENSE_10) { in sddr55_transport()
898 usb_stor_set_xfer_buf(ptr, sizeof(mode_page_01), srb); in sddr55_transport()
[all …]
Dusb.c294 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 …]
/Linux-v4.19/drivers/scsi/
Ddc395x.c335 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 …]
D3w-xxxx.c418 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()
955 tw_dev->srb[request_id] = NULL; in tw_chrdev_ioctl()
1156 tw_dev->srb[request_id]->result = (DID_OK << 16); in tw_setfeature()
1157 tw_dev->srb[request_id]->scsi_done(tw_dev->srb[request_id]); in tw_setfeature()
[all …]
/Linux-v4.19/drivers/usb/image/
Dmicrotek.c222 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 context->srb->result = DID_ERROR << 16; in mts_int_submit_urb()
[all …]
/Linux-v4.19/drivers/scsi/qla4xxx/
Dql4_isr.c21 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 …]

123