Home
last modified time | relevance | path

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

123

/linux-6.6.21/drivers/staging/rts5208/
Drtsx_scsi.c24 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 …]
Dspi.c436 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()
469 int spi_read_flash_id(struct scsi_cmnd *srb, struct rtsx_chip *chip) in spi_read_flash_id() argument
477 len = ((u16)(srb->cmnd[7]) << 8) | srb->cmnd[8]; in spi_read_flash_id()
[all …]
Dspi.h44 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);
Drtsx.c121 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 chip->srb = srb; in queuecommand_lck()
156 static int command_abort(struct scsi_cmnd *srb) in DEF_SCSI_QCMD()
158 struct Scsi_Host *host = srb->device->host; in DEF_SCSI_QCMD()
165 if (chip->srb != srb) { in DEF_SCSI_QCMD()
[all …]
Dms.h192 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);
Drtsx_transport.c34 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()
119 unsigned int buflen, struct scsi_cmnd *srb) in rtsx_stor_set_xfer_buf() argument
123 rtsx_stor_access_xfer_buf(buffer, buflen, srb, &index, &offset, in rtsx_stor_set_xfer_buf()
125 if (buflen < scsi_bufflen(srb)) in rtsx_stor_set_xfer_buf()
[all …]
Dsd.c3286 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 …]
Dsd.h270 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-6.6.21/drivers/usb/storage/
Dcypress_atacb.c73 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 …]
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.c467 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 …]
Djumpshot.c214 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 …]
Ddatafab.c202 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 …]
Dshuttle_usbat.c149 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 …]
Disd200.c330 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 …]
Dscsiglue.c373 static int queuecommand_lck(struct scsi_cmnd *srb) in queuecommand_lck() argument
376 struct us_data *us = host_to_us(srb->device->host); in queuecommand_lck()
379 if (us->srb != NULL) { in queuecommand_lck()
381 "Error in %s: us->srb = %p\n", __func__, us->srb); in queuecommand_lck()
388 srb->result = DID_NO_CONNECT << 16; in queuecommand_lck()
389 done(srb); in queuecommand_lck()
394 (srb->cmnd[0] == ATA_12 || srb->cmnd[0] == ATA_16)) { in queuecommand_lck()
395 memcpy(srb->sense_buffer, usb_stor_sense_invalidCDB, in queuecommand_lck()
397 srb->result = SAM_STAT_CHECK_CONDITION; in queuecommand_lck()
398 done(srb); in queuecommand_lck()
[all …]
Dsddr09.c53 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 …]
Dfreecom.c152 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 …]
Dsddr55.c290 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 …]
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 …]
Dene_ub6250.c519 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 …]
/linux-6.6.21/drivers/scsi/
Ddc395x.c319 struct ScsiReqBlk srb; member
328 static void data_out_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
330 static void data_in_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
332 static void command_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
334 static void status_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
336 static void msgout_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
338 static void msgin_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
340 static void data_out_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
342 static void data_in_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb,
344 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) | SAM_STAT_CHECK_CONDITION; in tw_decode_sense()
597 tw_dev->srb[request_id] = NULL; /* Flag internal command */ in tw_aen_read_queue()
959 tw_dev->srb[request_id] = NULL; in tw_chrdev_ioctl()
1164 tw_dev->srb[request_id]->result = (DID_OK << 16); in tw_setfeature()
1165 scsi_done(tw_dev->srb[request_id]); in tw_setfeature()
[all …]
/linux-6.6.21/drivers/usb/image/
Dmicrotek.c226 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()
337 static int mts_scsi_abort(struct scsi_cmnd *srb) in mts_scsi_abort() argument
339 struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]); in mts_scsi_abort()
348 static int mts_scsi_host_reset(struct scsi_cmnd *srb) in mts_scsi_host_reset() argument
350 struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]); in mts_scsi_host_reset()
365 mts_scsi_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *srb);
396 set_host_byte(context->srb, DID_ERROR); in mts_int_submit_urb()
[all …]
/linux-6.6.21/drivers/scsi/qla4xxx/
Dql4_isr.c20 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 …]

123