Home
last modified time | relevance | path

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

/linux-4.4.14/drivers/usb/storage/
Dcypress_atacb.c85 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 …]
Dprotocol.c60 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 …]
Dtransport.c466 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 …]
Djumpshot.c225 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 …]
Ddatafab.c213 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 …]
Dshuttle_usbat.c160 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 …]
Disd200.c341 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 …]
Dscsiglue.c324 static int queuecommand_lck(struct scsi_cmnd *srb, in queuecommand_lck() argument
327 struct us_data *us = host_to_us(srb->device->host); in queuecommand_lck()
330 if (us->srb != NULL) { in queuecommand_lck()
332 __func__, us->srb); in queuecommand_lck()
339 srb->result = DID_NO_CONNECT << 16; in queuecommand_lck()
340 done(srb); in queuecommand_lck()
345 srb->scsi_done = done; in queuecommand_lck()
346 us->srb = srb; in queuecommand_lck()
359 static int command_abort(struct scsi_cmnd *srb) in DEF_SCSI_QCMD()
361 struct us_data *us = host_to_us(srb->device->host); in DEF_SCSI_QCMD()
[all …]
Dsddr09.c64 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 …]
Dfreecom.c155 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 …]
Dsddr55.c300 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 …]
Dusb.c301 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 …]
Dalauda.c126 #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 …]
Dene_ub6250.c529 result = usb_stor_bulk_srb(us, pipe, us->srb); in ene_send_scsi_cmd()
567 if (us->srb != NULL) in ene_send_scsi_cmd()
568 scsi_set_resid(us->srb, max(scsi_get_resid(us->srb), in ene_send_scsi_cmd()
578 static int sd_scsi_test_unit_ready(struct us_data *us, struct scsi_cmnd *srb) in sd_scsi_test_unit_ready() argument
592 static int sd_scsi_inquiry(struct us_data *us, struct scsi_cmnd *srb) in sd_scsi_inquiry() argument
600 usb_stor_set_xfer_buf(data_ptr, 36, srb); in sd_scsi_inquiry()
604 static int sd_scsi_mode_sense(struct us_data *us, struct scsi_cmnd *srb) in sd_scsi_mode_sense() argument
615 usb_stor_set_xfer_buf(mediaWP, 12, srb); in sd_scsi_mode_sense()
617 usb_stor_set_xfer_buf(mediaNoWP, 12, srb); in sd_scsi_mode_sense()
623 static int sd_scsi_read_capacity(struct us_data *us, struct scsi_cmnd *srb) in sd_scsi_read_capacity() argument
[all …]
Drealtek_cr.c128 #define SCSI_LUN(srb) ((srb)->device->lun) argument
796 static inline int working_scsi(struct scsi_cmnd *srb) in working_scsi() argument
798 if ((srb->cmnd[0] == TEST_UNIT_READY) || in working_scsi()
799 (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL)) { in working_scsi()
806 static void rts51x_invoke_transport(struct scsi_cmnd *srb, struct us_data *us) in rts51x_invoke_transport() argument
818 if (working_scsi(srb)) { in rts51x_invoke_transport()
829 chip->proto_handler_backup(srb, us); in rts51x_invoke_transport()
833 if ((srb->cmnd[0] == TEST_UNIT_READY) && in rts51x_invoke_transport()
835 if (TST_LUN_READY(chip, srb->device->lun)) { in rts51x_invoke_transport()
836 srb->result = SAM_STAT_GOOD; in rts51x_invoke_transport()
[all …]
Ddebug.c57 void usb_stor_show_command(const struct us_data *us, struct scsi_cmnd *srb) in usb_stor_show_command() argument
62 switch (srb->cmnd[0]) { in usb_stor_show_command()
155 usb_stor_dbg(us, "Command %s (%d bytes)\n", what, srb->cmd_len); in usb_stor_show_command()
157 for (i = 0; i < srb->cmd_len && i < 16; i++) in usb_stor_show_command()
158 US_DEBUGPX(" %02x", srb->cmnd[i]); in usb_stor_show_command()
Dkarma.c156 static int rio_karma_transport(struct scsi_cmnd *srb, struct us_data *us) in rio_karma_transport() argument
161 if (srb->cmnd[0] == READ_10 && !data->in_storage) { in rio_karma_transport()
167 return usb_stor_Bulk_transport(srb, us); in rio_karma_transport()
168 } else if (srb->cmnd[0] == START_STOP) { in rio_karma_transport()
176 return usb_stor_Bulk_transport(srb, us); in rio_karma_transport()
Dprotocol.h52 unsigned int buflen, struct scsi_cmnd *srb, struct scatterlist **,
56 unsigned int buflen, struct scsi_cmnd *srb);
Ddebug.h50 void usb_stor_show_command(const struct us_data *us, struct scsi_cmnd *srb);
Dtransport.h100 struct scsi_cmnd* srb);
Dusb.h136 struct scsi_cmnd *srb; /* current srb */ member
/linux-4.4.14/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.c520 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 …]
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.c126 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 …]
Dms.h205 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);
Drtsx_transport.c42 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 …]
Dsd.h282 int sd_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip,
293 int sd_pass_thru_mode(struct scsi_cmnd *srb, struct rtsx_chip *chip);
294 int sd_execute_no_data(struct scsi_cmnd *srb, struct rtsx_chip *chip);
295 int sd_execute_read_data(struct scsi_cmnd *srb, struct rtsx_chip *chip);
296 int sd_execute_write_data(struct scsi_cmnd *srb, struct rtsx_chip *chip);
297 int sd_get_cmd_rsp(struct scsi_cmnd *srb, struct rtsx_chip *chip);
298 int sd_hw_rst(struct scsi_cmnd *srb, struct rtsx_chip *chip);
Dsd.c3736 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 …]
Drtsx_transport.h33 unsigned int buflen, struct scsi_cmnd *srb, unsigned int *index,
36 unsigned int buflen, struct scsi_cmnd *srb);
38 unsigned int buflen, struct scsi_cmnd *srb);
39 void rtsx_invoke_transport(struct scsi_cmnd *srb, struct rtsx_chip *chip);
Dms.c2948 static int mspro_rw_multi_sector(struct scsi_cmnd *srb, argument
2964 if (srb->sc_data_direction == DMA_FROM_DEVICE) {
2972 if (srb->sc_data_direction == DMA_FROM_DEVICE) {
2982 if (srb->sc_data_direction == DMA_FROM_DEVICE) {
2997 if (srb->sc_data_direction == DMA_FROM_DEVICE)
3009 if ((ms_card->pre_dir != srb->sc_data_direction)
3055 WAIT_INT, mode_2k, scsi_sg_count(srb),
3056 scsi_sglist(srb), scsi_bufflen(srb));
3085 ms_card->pre_dir = srb->sc_data_direction;
3232 int mspro_format(struct scsi_cmnd *srb, struct rtsx_chip *chip, argument
[all …]
Drtsx.h90 #define SCSI_LUN(srb) ((srb)->device->lun) argument
Dxd.c1671 trans_dma_enable(chip->srb->sc_data_direction, chip, in xd_read_multiple_pages()
1682 scsi_sg_count(chip->srb), in xd_read_multiple_pages()
1888 trans_dma_enable(chip->srb->sc_data_direction, chip, in xd_write_multiple_pages()
1899 scsi_sg_count(chip->srb), in xd_write_multiple_pages()
1981 int xd_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip, in xd_rw() argument
1985 unsigned int lun = SCSI_LUN(srb); in xd_rw()
2001 scsi_sg_count(srb)); in xd_rw()
2003 ptr = (u8 *)scsi_sglist(srb); in xd_rw()
2034 if (srb->sc_data_direction == DMA_TO_DEVICE) { in xd_rw()
2139 if (srb->sc_data_direction == DMA_FROM_DEVICE) { in xd_rw()
[all …]
Drtsx_scsi.h141 int rtsx_scsi_handler(struct scsi_cmnd *srb, struct rtsx_chip *chip);
Dxd.h181 int xd_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip,
Drtsx_card.c985 int card_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip, in card_rw() argument
989 unsigned int lun = SCSI_LUN(srb); in card_rw()
1000 retval = chip->rw_card[lun](srb, chip, sec_addr, sec_cnt); in card_rw()
Drtsx_chip.h352 typedef int (*card_rw_func)(struct scsi_cmnd *srb, struct rtsx_chip *chip,
706 struct scsi_cmnd *srb; /* current srb */ member
Drtsx_card.h1013 int card_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip,
/linux-4.4.14/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.c419 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()
1151 tw_dev->srb[request_id]->result = (DID_OK << 16); in tw_setfeature()
1152 tw_dev->srb[request_id]->scsi_done(tw_dev->srb[request_id]); in tw_setfeature()
[all …]
D3w-9xxx.c316 tw_dev->srb[request_id] = NULL; in twa_aen_drain_queue()
449 tw_dev->srb[request_id] = NULL; in twa_aen_read_queue()
513 tw_dev->srb[request_id] = NULL; in twa_aen_sync_time()
701 tw_dev->srb[request_id] = NULL; in twa_chrdev_ioctl()
1018 …memcpy(tw_dev->srb[request_id]->sense_buffer, full_command_packet->header.sense_data, TW_SENSE_DAT… in twa_fill_sense()
1019 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 …]
D3w-sas.c299 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()
305 if (scsi_sglist(srb)) in twl_scsiop_execute_scsi()
306 sglist = scsi_sglist(srb); in twl_scsiop_execute_scsi()
321 memcpy(command_packet->cdb, srb->cmnd, TW_MAX_CDB_LEN); in twl_scsiop_execute_scsi()
325 if (srb) { in twl_scsiop_execute_scsi()
326 command_packet->unit = srb->device->id; in twl_scsiop_execute_scsi()
328 cpu_to_le16(TW_REQ_LUN_IN(srb->device->lun, request_id)); in twl_scsiop_execute_scsi()
339 if (scsi_sg_count(srb)) { in twl_scsiop_execute_scsi()
[all …]
Da100u2w.c617 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()
997 if ((cmd = (struct scsi_cmnd *) escb->srb) == NULL) { in inia100_scb_handler()
1002 escb->srb = NULL; in inia100_scb_handler()
Dqla1280.c434 static int qla1280_abort_command(struct scsi_qla_host *, struct srb *, int);
437 static int qla1280_64bit_start_scsi(struct scsi_qla_host *, struct srb *);
439 static int qla1280_32bit_start_scsi(struct scsi_qla_host *, struct srb *);
726 struct srb *sp = (struct srb *)CMD_SP(cmd); in qla1280_queuecommand_lck()
775 _qla1280_wait_for_single_command(struct scsi_qla_host *ha, struct srb *sp, in _qla1280_wait_for_single_command()
793 qla1280_wait_for_single_command(struct scsi_qla_host *ha, struct srb *sp) in qla1280_wait_for_single_command()
806 struct srb *sp; in qla1280_wait_for_pending_commands()
852 struct srb *sp; in qla1280_error_action()
862 sp = (struct srb *)CMD_SP(cmd); in qla1280_error_action()
1270 struct srb *sp; in qla1280_done()
[all …]
Da100u2w.h138 struct scsi_cmnd *srb; /*50 SRB Pointer */ member
D3w-xxxx.h400 struct scsi_cmnd *srb[TW_Q_LENGTH]; member
D3w-sas.h366 struct scsi_cmnd *srb[TW_Q_LENGTH]; member
D3w-9xxx.h646 struct scsi_cmnd *srb[TW_Q_LENGTH]; member
Dinitio.h385 struct scsi_cmnd *srb; /*50 SRB Pointer */ member
Dqla1280.h102 struct srb { struct
1036 struct srb *outstanding_cmds[MAX_OUTSTANDING_COMMANDS];
Dinitio.c721 cmnd->srb = NULL; in initio_release_scb()
972 if (tmp->srb == srbp) { in initio_abort_srb()
997 if (tmp->srb == srbp) { in initio_abort_srb()
1252 if (initio_abort_srb(host, scb->srb) != 0) { in tulip_scsi()
2572 cblk->srb = cmnd; in initio_build_scb()
2776 if ((cmnd = cblk->srb) == NULL) { in i91uSCBPost()
/linux-4.4.14/drivers/usb/image/
Dmicrotek.c225 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 …]
Dmicrotek.h18 struct scsi_cmnd *srb; member
/linux-4.4.14/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 …]
Dql4_iocb.c148 static void qla4xxx_build_scsi_iocbs(struct srb *srb, in qla4xxx_build_scsi_iocbs() argument
159 cmd = srb->cmd; in qla4xxx_build_scsi_iocbs()
160 ha = srb->ha; in qla4xxx_build_scsi_iocbs()
273 int qla4xxx_send_command_to_isp(struct scsi_qla_host *ha, struct srb * srb) in qla4xxx_send_command_to_isp() argument
275 struct scsi_cmnd *cmd = srb->cmd; in qla4xxx_send_command_to_isp()
285 ddb_entry = srb->ddb; in qla4xxx_send_command_to_isp()
356 qla4xxx_build_scsi_iocbs(srb, cmd_entry, tot_dsds); in qla4xxx_send_command_to_isp()
359 srb->cmd->host_scribble = (unsigned char *)(unsigned long)index; in qla4xxx_send_command_to_isp()
362 srb->state = SRB_ACTIVE_STATE; in qla4xxx_send_command_to_isp()
363 srb->flags |= SRB_DMA_VALID; in qla4xxx_send_command_to_isp()
[all …]
Dql4_glbl.h15 int qla4xxx_send_command_to_isp(struct scsi_qla_host *ha, struct srb *srb);
24 int qla4xxx_abort_task(struct scsi_qla_host *ha, struct srb *srb);
73 struct srb *qla4xxx_del_from_active_array(struct scsi_qla_host *ha,
Dql4_os.c4001 static struct srb* qla4xxx_get_new_srb(struct scsi_qla_host *ha, in qla4xxx_get_new_srb()
4005 struct srb *srb; in qla4xxx_get_new_srb() local
4007 srb = mempool_alloc(ha->srb_mempool, GFP_ATOMIC); in qla4xxx_get_new_srb()
4008 if (!srb) in qla4xxx_get_new_srb()
4009 return srb; in qla4xxx_get_new_srb()
4011 kref_init(&srb->srb_ref); in qla4xxx_get_new_srb()
4012 srb->ha = ha; in qla4xxx_get_new_srb()
4013 srb->ddb = ddb_entry; in qla4xxx_get_new_srb()
4014 srb->cmd = cmd; in qla4xxx_get_new_srb()
4015 srb->flags = 0; in qla4xxx_get_new_srb()
[all …]
Dql4_def.h224 struct srb { struct
734 struct srb *status_srb;
Dql4_mbx.c1173 int qla4xxx_abort_task(struct scsi_qla_host *ha, struct srb *srb) in qla4xxx_abort_task() argument
1177 struct scsi_cmnd *cmd = srb->cmd; in qla4xxx_abort_task()
1198 mbox_cmd[1] = srb->ddb->fw_ddb_index; in qla4xxx_abort_task()
/linux-4.4.14/drivers/s390/scsi/
Dzfcp_dbf.c112 struct fsf_status_read_buffer *srb = req->data; in zfcp_dbf_hba_fsf_uss() local
125 if (!srb) in zfcp_dbf_hba_fsf_uss()
128 rec->u.uss.status_type = srb->status_type; in zfcp_dbf_hba_fsf_uss()
129 rec->u.uss.status_subtype = srb->status_subtype; in zfcp_dbf_hba_fsf_uss()
130 rec->u.uss.d_id = ntoh24(srb->d_id); in zfcp_dbf_hba_fsf_uss()
131 rec->u.uss.lun = srb->fcp_lun; in zfcp_dbf_hba_fsf_uss()
132 memcpy(&rec->u.uss.queue_designator, &srb->queue_designator, in zfcp_dbf_hba_fsf_uss()
136 rec->pl_len = (!srb->length) ? 0 : srb->length - in zfcp_dbf_hba_fsf_uss()
140 zfcp_dbf_pl_write(dbf, srb->payload.data, rec->pl_len, in zfcp_dbf_hba_fsf_uss()
386 struct fsf_status_read_buffer *srb = in zfcp_dbf_san_in_els() local
[all …]
/linux-4.4.14/drivers/ipack/devices/
Dscc2698.h60 u8 d9, srb; /* Status register (b) */ member
/linux-4.4.14/drivers/scsi/qla2xxx/
Dqla_def.h387 typedef struct srb { struct
Dqla_os.c915 sp_get(struct srb *sp) in sp_get()