srb 57 drivers/ipack/devices/scc2698.h u8 d9, srb; /* Status register (b) */ srb 114 drivers/s390/scsi/zfcp_dbf.c struct fsf_status_read_buffer *srb = req->data; srb 131 drivers/s390/scsi/zfcp_dbf.c if (!srb) srb 134 drivers/s390/scsi/zfcp_dbf.c rec->u.uss.status_type = srb->status_type; srb 135 drivers/s390/scsi/zfcp_dbf.c rec->u.uss.status_subtype = srb->status_subtype; srb 136 drivers/s390/scsi/zfcp_dbf.c rec->u.uss.d_id = ntoh24(srb->d_id); srb 137 drivers/s390/scsi/zfcp_dbf.c rec->u.uss.lun = srb->fcp_lun; srb 138 drivers/s390/scsi/zfcp_dbf.c memcpy(&rec->u.uss.queue_designator, &srb->queue_designator, srb 142 drivers/s390/scsi/zfcp_dbf.c rec->pl_len = (!srb->length) ? 0 : srb->length - srb 146 drivers/s390/scsi/zfcp_dbf.c zfcp_dbf_pl_write(dbf, srb->payload.data, rec->pl_len, srb 589 drivers/s390/scsi/zfcp_dbf.c struct fsf_status_read_buffer *srb = srb 597 drivers/s390/scsi/zfcp_dbf.c length = (u16)(srb->length - srb 599 drivers/s390/scsi/zfcp_dbf.c sg_init_one(&sg, srb->payload.data, length); srb 601 drivers/s390/scsi/zfcp_dbf.c fsf->req_id, ntoh24(srb->d_id), length); srb 315 drivers/scsi/3w-9xxx.c tw_dev->srb[request_id] = NULL; srb 447 drivers/scsi/3w-9xxx.c tw_dev->srb[request_id] = NULL; srb 509 drivers/scsi/3w-9xxx.c tw_dev->srb[request_id] = NULL; srb 698 drivers/scsi/3w-9xxx.c tw_dev->srb[request_id] = NULL; srb 1020 drivers/scsi/3w-9xxx.c memcpy(tw_dev->srb[request_id]->sense_buffer, full_command_packet->header.sense_data, TW_SENSE_DATA_LENGTH); srb 1021 drivers/scsi/3w-9xxx.c tw_dev->srb[request_id]->result = (full_command_packet->command.newcommand.status << 1); srb 1303 drivers/scsi/3w-9xxx.c if (tw_dev->srb[request_id] != NULL) { srb 1315 drivers/scsi/3w-9xxx.c if (tw_dev->srb[request_id] != NULL) { srb 1323 drivers/scsi/3w-9xxx.c if (tw_dev->srb[request_id] == NULL) { srb 1334 drivers/scsi/3w-9xxx.c cmd = tw_dev->srb[request_id]; srb 1350 drivers/scsi/3w-9xxx.c if (full_command_packet->command.newcommand.sg_list[0].length < scsi_bufflen(tw_dev->srb[request_id])) srb 1595 drivers/scsi/3w-9xxx.c if (tw_dev->srb[i]) { srb 1596 drivers/scsi/3w-9xxx.c struct scsi_cmnd *cmd = tw_dev->srb[i]; srb 1778 drivers/scsi/3w-9xxx.c tw_dev->srb[request_id] = SCpnt; srb 1811 drivers/scsi/3w-9xxx.c struct scsi_cmnd *srb = NULL; srb 1815 drivers/scsi/3w-9xxx.c if (tw_dev->srb[request_id]) { srb 1816 drivers/scsi/3w-9xxx.c srb = tw_dev->srb[request_id]; srb 1817 drivers/scsi/3w-9xxx.c if (scsi_sglist(srb)) srb 1818 drivers/scsi/3w-9xxx.c sglist = scsi_sglist(srb); srb 1833 drivers/scsi/3w-9xxx.c memcpy(command_packet->cdb, srb->cmnd, TW_MAX_CDB_LEN); srb 1837 drivers/scsi/3w-9xxx.c if (srb) { srb 1838 drivers/scsi/3w-9xxx.c command_packet->unit = srb->device->id; srb 1840 drivers/scsi/3w-9xxx.c cpu_to_le16(TW_REQ_LUN_IN(srb->device->lun, request_id)); srb 1852 drivers/scsi/3w-9xxx.c if (scsi_sg_count(srb)) { srb 1853 drivers/scsi/3w-9xxx.c if (!twa_command_mapped(srb)) { srb 1854 drivers/scsi/3w-9xxx.c if (srb->sc_data_direction == DMA_TO_DEVICE || srb 1855 drivers/scsi/3w-9xxx.c srb->sc_data_direction == DMA_BIDIRECTIONAL) srb 1856 drivers/scsi/3w-9xxx.c scsi_sg_copy_to_buffer(srb, srb 1862 drivers/scsi/3w-9xxx.c sg_count = scsi_dma_map(srb); srb 1866 drivers/scsi/3w-9xxx.c scsi_for_each_sg(srb, sg, sg_count, i) { srb 1875 drivers/scsi/3w-9xxx.c command_packet->sgl_entries__lunh = cpu_to_le16(TW_REQ_LUN_IN((srb->device->lun >> 4), scsi_sg_count(tw_dev->srb[request_id]))); srb 1890 drivers/scsi/3w-9xxx.c if (srb) { srb 1891 drivers/scsi/3w-9xxx.c if (srb->cmnd[0] == READ_6 || srb->cmnd[0] == WRITE_6) srb 1892 drivers/scsi/3w-9xxx.c num_sectors = (u32)srb->cmnd[4]; srb 1894 drivers/scsi/3w-9xxx.c if (srb->cmnd[0] == READ_10 || srb->cmnd[0] == WRITE_10) srb 1895 drivers/scsi/3w-9xxx.c num_sectors = (u32)srb->cmnd[8] | ((u32)srb->cmnd[7] << 8); srb 1904 drivers/scsi/3w-9xxx.c if (srb) { srb 1905 drivers/scsi/3w-9xxx.c tw_dev->sgl_entries = scsi_sg_count(tw_dev->srb[request_id]); srb 1911 drivers/scsi/3w-9xxx.c if (srb) { srb 1924 drivers/scsi/3w-9xxx.c struct scsi_cmnd *cmd = tw_dev->srb[request_id]; srb 643 drivers/scsi/3w-9xxx.h struct scsi_cmnd *srb[TW_Q_LENGTH]; srb 297 drivers/scsi/3w-sas.c struct scsi_cmnd *srb = NULL; srb 301 drivers/scsi/3w-sas.c if (tw_dev->srb[request_id]) { srb 302 drivers/scsi/3w-sas.c srb = tw_dev->srb[request_id]; srb 303 drivers/scsi/3w-sas.c if (scsi_sglist(srb)) srb 304 drivers/scsi/3w-sas.c sglist = scsi_sglist(srb); srb 319 drivers/scsi/3w-sas.c memcpy(command_packet->cdb, srb->cmnd, TW_MAX_CDB_LEN); srb 323 drivers/scsi/3w-sas.c if (srb) { srb 324 drivers/scsi/3w-sas.c command_packet->unit = srb->device->id; srb 326 drivers/scsi/3w-sas.c cpu_to_le16(TW_REQ_LUN_IN(srb->device->lun, request_id)); srb 337 drivers/scsi/3w-sas.c if (scsi_sg_count(srb)) { srb 338 drivers/scsi/3w-sas.c sg_count = scsi_dma_map(srb); srb 342 drivers/scsi/3w-sas.c scsi_for_each_sg(srb, sg, sg_count, i) { srb 346 drivers/scsi/3w-sas.c command_packet->sgl_entries__lunh = cpu_to_le16(TW_REQ_LUN_IN((srb->device->lun >> 4), scsi_sg_count(tw_dev->srb[request_id]))); srb 358 drivers/scsi/3w-sas.c if (srb) { srb 359 drivers/scsi/3w-sas.c tw_dev->sector_count = scsi_bufflen(srb) / 512; srb 362 drivers/scsi/3w-sas.c tw_dev->sgl_entries = scsi_sg_count(srb); srb 396 drivers/scsi/3w-sas.c tw_dev->srb[request_id] = NULL; srb 444 drivers/scsi/3w-sas.c tw_dev->srb[request_id] = NULL; srb 586 drivers/scsi/3w-sas.c tw_dev->srb[request_id] = NULL; srb 771 drivers/scsi/3w-sas.c tw_dev->srb[request_id] = NULL; srb 893 drivers/scsi/3w-sas.c memcpy(tw_dev->srb[request_id]->sense_buffer, header->sense_data, TW_SENSE_DATA_LENGTH); srb 894 drivers/scsi/3w-sas.c tw_dev->srb[request_id]->result = (full_command_packet->command.newcommand.status << 1); srb 1170 drivers/scsi/3w-sas.c if (tw_dev->srb[request_id] != NULL) srb 1193 drivers/scsi/3w-sas.c if (tw_dev->srb[request_id] != NULL) { srb 1201 drivers/scsi/3w-sas.c if (tw_dev->srb[request_id] == NULL) { srb 1210 drivers/scsi/3w-sas.c cmd = tw_dev->srb[request_id]; srb 1217 drivers/scsi/3w-sas.c if (full_command_packet->command.newcommand.sg_list[0].length < scsi_bufflen(tw_dev->srb[request_id])) srb 1371 drivers/scsi/3w-sas.c struct scsi_cmnd *cmd = tw_dev->srb[i]; srb 1478 drivers/scsi/3w-sas.c tw_dev->srb[request_id] = SCpnt; srb 363 drivers/scsi/3w-sas.h struct scsi_cmnd *srb[TW_Q_LENGTH]; srb 418 drivers/scsi/3w-xxxx.c tw_dev->srb[request_id]->sense_buffer[0] = (0x1 << 7 | 0x70); srb 421 drivers/scsi/3w-xxxx.c tw_dev->srb[request_id]->sense_buffer[2] = tw_sense_table[i][1]; srb 424 drivers/scsi/3w-xxxx.c tw_dev->srb[request_id]->sense_buffer[7] = 0xa; /* 10 bytes */ srb 427 drivers/scsi/3w-xxxx.c tw_dev->srb[request_id]->sense_buffer[12] = tw_sense_table[i][2]; srb 430 drivers/scsi/3w-xxxx.c tw_dev->srb[request_id]->sense_buffer[13] = tw_sense_table[i][3]; srb 432 drivers/scsi/3w-xxxx.c tw_dev->srb[request_id]->result = (DID_OK << 16) | (CHECK_CONDITION << 1); srb 595 drivers/scsi/3w-xxxx.c tw_dev->srb[request_id] = NULL; /* Flag internal command */ srb 957 drivers/scsi/3w-xxxx.c tw_dev->srb[request_id] = NULL; srb 1164 drivers/scsi/3w-xxxx.c tw_dev->srb[request_id]->result = (DID_OK << 16); srb 1165 drivers/scsi/3w-xxxx.c tw_dev->srb[request_id]->scsi_done(tw_dev->srb[request_id]); srb 1291 drivers/scsi/3w-xxxx.c struct scsi_cmnd *srb; srb 1306 drivers/scsi/3w-xxxx.c srb = tw_dev->srb[i]; srb 1307 drivers/scsi/3w-xxxx.c if (srb != NULL) { srb 1308 drivers/scsi/3w-xxxx.c srb->result = (DID_RESET << 16); srb 1309 drivers/scsi/3w-xxxx.c scsi_dma_unmap(srb); srb 1310 drivers/scsi/3w-xxxx.c srb->scsi_done(srb); srb 1456 drivers/scsi/3w-xxxx.c scsi_sg_copy_from_buffer(tw_dev->srb[request_id], data, len); srb 1474 drivers/scsi/3w-xxxx.c sprintf(&request_buffer[16], "Logical Disk %-2d ", tw_dev->srb[request_id]->device->id); srb 1486 drivers/scsi/3w-xxxx.c if (is_unit_present[tw_dev->srb[request_id]->device->id] & TW_UNIT_ONLINE) { srb 1487 drivers/scsi/3w-xxxx.c tw_dev->is_unit_present[tw_dev->srb[request_id]->device->id] = 1; srb 1489 drivers/scsi/3w-xxxx.c tw_dev->is_unit_present[tw_dev->srb[request_id]->device->id] = 0; srb 1490 drivers/scsi/3w-xxxx.c tw_dev->srb[request_id]->result = (DID_BAD_TARGET << 16); srb 1508 drivers/scsi/3w-xxxx.c if (tw_dev->srb[request_id]->cmnd[2] != 0x8) { srb 1511 drivers/scsi/3w-xxxx.c tw_dev->srb[request_id]->result = (DID_OK << 16); srb 1512 drivers/scsi/3w-xxxx.c tw_dev->srb[request_id]->scsi_done(tw_dev->srb[request_id]); srb 1540 drivers/scsi/3w-xxxx.c param->table_id = TW_UNIT_INFORMATION_TABLE_BASE + tw_dev->srb[request_id]->device->id; srb 1617 drivers/scsi/3w-xxxx.c command_packet->unit__hostid = TW_UNITHOST_IN(0, tw_dev->srb[request_id]->device->id); srb 1630 drivers/scsi/3w-xxxx.c tw_dev->srb[request_id]->device->id; srb 1703 drivers/scsi/3w-xxxx.c struct scsi_cmnd *srb; srb 1708 drivers/scsi/3w-xxxx.c srb = tw_dev->srb[request_id]; srb 1710 drivers/scsi/3w-xxxx.c sglist = scsi_sglist(srb); srb 1723 drivers/scsi/3w-xxxx.c if (srb->cmnd[0] == READ_6 || srb->cmnd[0] == READ_10) { srb 1731 drivers/scsi/3w-xxxx.c command_packet->unit__hostid = TW_UNITHOST_IN(0, srb->device->id); srb 1735 drivers/scsi/3w-xxxx.c if (srb->cmnd[0] == WRITE_10) { srb 1736 drivers/scsi/3w-xxxx.c if ((srb->cmnd[1] & 0x8) || (srb->cmnd[1] & 0x10)) srb 1740 drivers/scsi/3w-xxxx.c if (srb->cmnd[0] == READ_6 || srb->cmnd[0] == WRITE_6) { srb 1741 drivers/scsi/3w-xxxx.c lba = ((u32)srb->cmnd[1] << 16) | ((u32)srb->cmnd[2] << 8) | (u32)srb->cmnd[3]; srb 1742 drivers/scsi/3w-xxxx.c num_sectors = (u32)srb->cmnd[4]; srb 1744 drivers/scsi/3w-xxxx.c lba = ((u32)srb->cmnd[2] << 24) | ((u32)srb->cmnd[3] << 16) | ((u32)srb->cmnd[4] << 8) | (u32)srb->cmnd[5]; srb 1745 drivers/scsi/3w-xxxx.c num_sectors = (u32)srb->cmnd[8] | ((u32)srb->cmnd[7] << 8); srb 1757 drivers/scsi/3w-xxxx.c use_sg = scsi_dma_map(srb); srb 1761 drivers/scsi/3w-xxxx.c scsi_for_each_sg(tw_dev->srb[request_id], sg, use_sg, i) { srb 1768 drivers/scsi/3w-xxxx.c tw_dev->sgl_entries = scsi_sg_count(tw_dev->srb[request_id]); srb 1802 drivers/scsi/3w-xxxx.c tw_dev->srb[request_id]->result = (DID_ERROR << 16); srb 1803 drivers/scsi/3w-xxxx.c tw_dev->srb[request_id]->scsi_done(tw_dev->srb[request_id]); srb 1828 drivers/scsi/3w-xxxx.c command_packet->unit__hostid = TW_UNITHOST_IN(0, tw_dev->srb[request_id]->device->id); srb 1913 drivers/scsi/3w-xxxx.c if (is_unit_present[tw_dev->srb[request_id]->device->id] & TW_UNIT_ONLINE) { srb 1914 drivers/scsi/3w-xxxx.c tw_dev->is_unit_present[tw_dev->srb[request_id]->device->id] = 1; srb 1916 drivers/scsi/3w-xxxx.c tw_dev->is_unit_present[tw_dev->srb[request_id]->device->id] = 0; srb 1917 drivers/scsi/3w-xxxx.c tw_dev->srb[request_id]->result = (DID_BAD_TARGET << 16); srb 1943 drivers/scsi/3w-xxxx.c tw_dev->srb[request_id] = SCpnt; srb 2095 drivers/scsi/3w-xxxx.c if (tw_dev->srb[request_id] == NULL) { srb 2104 drivers/scsi/3w-xxxx.c if (tw_dev->srb[request_id] != NULL) { srb 2113 drivers/scsi/3w-xxxx.c if (tw_dev->srb[request_id] == NULL) { srb 2126 drivers/scsi/3w-xxxx.c switch (tw_dev->srb[request_id]->cmnd[0]) { srb 2161 drivers/scsi/3w-xxxx.c tw_dev->srb[request_id]->result = (DID_OK << 16); srb 2167 drivers/scsi/3w-xxxx.c tw_dev->srb[request_id]->result = (DID_OK << 16) | (CHECK_CONDITION << 1); srb 2172 drivers/scsi/3w-xxxx.c scsi_dma_unmap(tw_dev->srb[request_id]); srb 2173 drivers/scsi/3w-xxxx.c tw_dev->srb[request_id]->scsi_done(tw_dev->srb[request_id]); srb 400 drivers/scsi/3w-xxxx.h struct scsi_cmnd *srb[TW_Q_LENGTH]; srb 617 drivers/scsi/a100u2w.c if (host_scb->status && escb->srb == cmd) srb 648 drivers/scsi/a100u2w.c escb->srb = NULL; srb 649 drivers/scsi/a100u2w.c escb->srb = cmd; srb 779 drivers/scsi/a100u2w.c if (scb->status && escb->srb == cmd) { srb 785 drivers/scsi/a100u2w.c escb->srb = NULL; srb 851 drivers/scsi/a100u2w.c escb->srb = cmd; srb 997 drivers/scsi/a100u2w.c if ((cmd = (struct scsi_cmnd *) escb->srb) == NULL) { srb 1002 drivers/scsi/a100u2w.c escb->srb = NULL; srb 138 drivers/scsi/a100u2w.h struct scsi_cmnd *srb; /*50 SRB Pointer */ srb 1660 drivers/scsi/aacraid/aachba.c struct aac_srb *srb; srb 1689 drivers/scsi/aacraid/aachba.c srb = fib_data(fibptr); srb 1690 drivers/scsi/aacraid/aachba.c memcpy(srb, &srbu->srb, sizeof(struct aac_srb)); srb 1698 drivers/scsi/aacraid/aachba.c srb->channel = cpu_to_le32(vbus); srb 1699 drivers/scsi/aacraid/aachba.c srb->id = cpu_to_le32(vid); srb 1700 drivers/scsi/aacraid/aachba.c srb->lun = 0; srb 1701 drivers/scsi/aacraid/aachba.c srb->function = cpu_to_le32(SRBF_ExecuteScsi); srb 1702 drivers/scsi/aacraid/aachba.c srb->timeout = 0; srb 1703 drivers/scsi/aacraid/aachba.c srb->retry_limit = 0; srb 1704 drivers/scsi/aacraid/aachba.c srb->cdb_size = cpu_to_le32(16); srb 1705 drivers/scsi/aacraid/aachba.c srb->count = cpu_to_le32(xfer_len); srb 1707 drivers/scsi/aacraid/aachba.c sg64 = (struct sgmap64 *)&srb->sg; srb 1716 drivers/scsi/aacraid/aachba.c memcpy(&srbu->srb, srb, sizeof(struct aac_srb)); srb 1777 drivers/scsi/aacraid/aachba.c srbcmd = &srbu.srb; srb 1825 drivers/scsi/aacraid/aachba.c srbcmd = &srbu.srb; srb 2027 drivers/scsi/aacraid/aacraid.h struct aac_srb srb; srb 335 drivers/scsi/dc395x.c struct ScsiReqBlk srb; srb 344 drivers/scsi/dc395x.c static void data_out_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 346 drivers/scsi/dc395x.c static void data_in_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 348 drivers/scsi/dc395x.c static void command_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 350 drivers/scsi/dc395x.c static void status_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 352 drivers/scsi/dc395x.c static void msgout_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 354 drivers/scsi/dc395x.c static void msgin_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 356 drivers/scsi/dc395x.c static void data_out_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 358 drivers/scsi/dc395x.c static void data_in_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 360 drivers/scsi/dc395x.c static void command_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 362 drivers/scsi/dc395x.c static void status_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 364 drivers/scsi/dc395x.c static void msgout_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 366 drivers/scsi/dc395x.c static void msgin_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 368 drivers/scsi/dc395x.c static void nop0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 370 drivers/scsi/dc395x.c static void nop1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 374 drivers/scsi/dc395x.c struct ScsiReqBlk *srb); srb 377 drivers/scsi/dc395x.c struct ScsiReqBlk *srb, u16 io_dir); srb 381 drivers/scsi/dc395x.c struct ScsiReqBlk *srb); srb 383 drivers/scsi/dc395x.c struct ScsiReqBlk *srb); srb 385 drivers/scsi/dc395x.c struct ScsiReqBlk *srb); srb 389 drivers/scsi/dc395x.c static void pci_unmap_srb(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb); srb 391 drivers/scsi/dc395x.c struct ScsiReqBlk *srb); srb 393 drivers/scsi/dc395x.c struct ScsiReqBlk *srb); srb 395 drivers/scsi/dc395x.c struct ScsiReqBlk *srb); srb 736 drivers/scsi/dc395x.c static void free_tag(struct DeviceCtlBlk *dcb, struct ScsiReqBlk *srb) srb 738 drivers/scsi/dc395x.c if (srb->tag_number < 255) { srb 739 drivers/scsi/dc395x.c dcb->tag_mask &= ~(1 << srb->tag_number); /* free tag mask */ srb 740 drivers/scsi/dc395x.c srb->tag_number = 255; srb 776 drivers/scsi/dc395x.c struct ScsiReqBlk *srb; srb 822 drivers/scsi/dc395x.c srb = list_entry(waiting_list_head->next, srb 826 drivers/scsi/dc395x.c if (!start_scsi(acb, pos, srb)) srb 827 drivers/scsi/dc395x.c list_move(&srb->list, &pos->srb_going_list); srb 857 drivers/scsi/dc395x.c static void send_srb(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb) srb 859 drivers/scsi/dc395x.c struct DeviceCtlBlk *dcb = srb->dcb; srb 864 drivers/scsi/dc395x.c list_add_tail(&srb->list, &dcb->srb_waiting_list); srb 869 drivers/scsi/dc395x.c if (!start_scsi(acb, dcb, srb)) { srb 870 drivers/scsi/dc395x.c list_add_tail(&srb->list, &dcb->srb_going_list); srb 872 drivers/scsi/dc395x.c list_add(&srb->list, &dcb->srb_waiting_list); srb 879 drivers/scsi/dc395x.c struct ScsiReqBlk *srb) srb 886 drivers/scsi/dc395x.c srb->dcb = dcb; srb 887 drivers/scsi/dc395x.c srb->cmd = cmd; srb 888 drivers/scsi/dc395x.c srb->sg_count = 0; srb 889 drivers/scsi/dc395x.c srb->total_xfer_length = 0; srb 890 drivers/scsi/dc395x.c srb->sg_bus_addr = 0; srb 891 drivers/scsi/dc395x.c srb->sg_index = 0; srb 892 drivers/scsi/dc395x.c srb->adapter_status = 0; srb 893 drivers/scsi/dc395x.c srb->target_status = 0; srb 894 drivers/scsi/dc395x.c srb->msg_count = 0; srb 895 drivers/scsi/dc395x.c srb->status = 0; srb 896 drivers/scsi/dc395x.c srb->flag = 0; srb 897 drivers/scsi/dc395x.c srb->state = 0; srb 898 drivers/scsi/dc395x.c srb->retry_count = 0; srb 899 drivers/scsi/dc395x.c srb->tag_number = TAG_NONE; srb 900 drivers/scsi/dc395x.c srb->scsi_phase = PH_BUS_FREE; /* initial phase */ srb 901 drivers/scsi/dc395x.c srb->end_message = 0; srb 910 drivers/scsi/dc395x.c srb->segment_x[0].address); srb 915 drivers/scsi/dc395x.c struct SGentry *sgp = srb->segment_x; srb 917 drivers/scsi/dc395x.c srb->sg_count = nseg; srb 922 drivers/scsi/dc395x.c srb->sg_count); srb 924 drivers/scsi/dc395x.c scsi_for_each_sg(cmd, sg, srb->sg_count, i) { srb 929 drivers/scsi/dc395x.c srb->total_xfer_length += seglen; srb 931 drivers/scsi/dc395x.c sgp += srb->sg_count - 1; srb 937 drivers/scsi/dc395x.c if (srb->total_xfer_length > reqlen) { srb 938 drivers/scsi/dc395x.c sgp->length -= (srb->total_xfer_length - reqlen); srb 939 drivers/scsi/dc395x.c srb->total_xfer_length = reqlen; srb 944 drivers/scsi/dc395x.c srb->total_xfer_length % 2) { srb 945 drivers/scsi/dc395x.c srb->total_xfer_length++; srb 949 drivers/scsi/dc395x.c srb->sg_bus_addr = dma_map_single(&dcb->acb->dev->dev, srb 950 drivers/scsi/dc395x.c srb->segment_x, SEGMENTX_LEN, DMA_TO_DEVICE); srb 953 drivers/scsi/dc395x.c srb->segment_x, srb->sg_bus_addr, SEGMENTX_LEN); srb 956 drivers/scsi/dc395x.c srb->request_length = srb->total_xfer_length; srb 982 drivers/scsi/dc395x.c struct ScsiReqBlk *srb; srb 1018 drivers/scsi/dc395x.c srb = list_first_entry_or_null(&acb->srb_free_list, srb 1020 drivers/scsi/dc395x.c if (!srb) { srb 1028 drivers/scsi/dc395x.c list_del(&srb->list); srb 1030 drivers/scsi/dc395x.c build_srb(cmd, dcb, srb); srb 1034 drivers/scsi/dc395x.c list_add_tail(&srb->list, &dcb->srb_waiting_list); srb 1038 drivers/scsi/dc395x.c send_srb(acb, srb); srb 1089 drivers/scsi/dc395x.c struct DeviceCtlBlk *dcb, struct ScsiReqBlk *srb) srb 1096 drivers/scsi/dc395x.c if (!srb && dcb) srb 1097 drivers/scsi/dc395x.c srb = dcb->active_srb; srb 1098 drivers/scsi/dc395x.c if (srb) { srb 1099 drivers/scsi/dc395x.c if (!srb->cmd) srb 1101 drivers/scsi/dc395x.c srb, srb->cmd); srb 1105 drivers/scsi/dc395x.c srb, srb->cmd, srb 1106 drivers/scsi/dc395x.c srb->cmd->cmnd[0], srb->cmd->device->id, srb 1107 drivers/scsi/dc395x.c (u8)srb->cmd->device->lun); srb 1109 drivers/scsi/dc395x.c srb->segment_x, srb->sg_count, srb->sg_index, srb 1110 drivers/scsi/dc395x.c srb->total_xfer_length); srb 1112 drivers/scsi/dc395x.c srb->state, srb->status, srb->scsi_phase, srb 1267 drivers/scsi/dc395x.c struct ScsiReqBlk *srb; srb 1277 drivers/scsi/dc395x.c srb = find_cmd(cmd, &dcb->srb_waiting_list); srb 1278 drivers/scsi/dc395x.c if (srb) { srb 1279 drivers/scsi/dc395x.c list_del(&srb->list); srb 1280 drivers/scsi/dc395x.c pci_unmap_srb_sense(acb, srb); srb 1281 drivers/scsi/dc395x.c pci_unmap_srb(acb, srb); srb 1282 drivers/scsi/dc395x.c free_tag(dcb, srb); srb 1283 drivers/scsi/dc395x.c list_add_tail(&srb->list, &acb->srb_free_list); srb 1288 drivers/scsi/dc395x.c srb = find_cmd(cmd, &dcb->srb_going_list); srb 1289 drivers/scsi/dc395x.c if (srb) { srb 1301 drivers/scsi/dc395x.c struct ScsiReqBlk *srb) srb 1303 drivers/scsi/dc395x.c u8 *ptr = srb->msgout_buf + srb->msg_count; srb 1304 drivers/scsi/dc395x.c if (srb->msg_count > 1) { srb 1307 drivers/scsi/dc395x.c srb->msg_count, srb->msgout_buf[0], srb 1308 drivers/scsi/dc395x.c srb->msgout_buf[1]); srb 1322 drivers/scsi/dc395x.c srb->msg_count += 5; srb 1323 drivers/scsi/dc395x.c srb->state |= SRB_DO_SYNC_NEGO; srb 1329 drivers/scsi/dc395x.c struct ScsiReqBlk *srb) srb 1333 drivers/scsi/dc395x.c u8 *ptr = srb->msgout_buf + srb->msg_count; srb 1334 drivers/scsi/dc395x.c if (srb->msg_count > 1) { srb 1337 drivers/scsi/dc395x.c srb->msg_count, srb->msgout_buf[0], srb 1338 drivers/scsi/dc395x.c srb->msgout_buf[1]); srb 1345 drivers/scsi/dc395x.c srb->msg_count += 4; srb 1346 drivers/scsi/dc395x.c srb->state |= SRB_DO_WIDE_NEGO; srb 1375 drivers/scsi/dc395x.c struct ScsiReqBlk *srb; srb 1382 drivers/scsi/dc395x.c srb = acb->active_dcb->active_srb; srb 1390 drivers/scsi/dc395x.c struct ScsiReqBlk* srb) srb 1396 drivers/scsi/dc395x.c dcb->target_id, dcb->target_lun, srb); srb 1398 drivers/scsi/dc395x.c srb->tag_number = TAG_NONE; /* acb->tag_max_num: had error read in eeprom */ srb 1424 drivers/scsi/dc395x.c srb->cmd, srb 1430 drivers/scsi/dc395x.c dprintkdbg(DBG_KG, "start_scsi: (0x%p) Failed (busy)\n", srb->cmd); srb 1446 drivers/scsi/dc395x.c srb->scsi_phase = PH_BUS_FREE; /* initial phase */ srb 1451 drivers/scsi/dc395x.c if (srb->flag & AUTO_REQSENSE) srb 1454 drivers/scsi/dc395x.c if (((srb->cmd->cmnd[0] == INQUIRY) srb 1455 drivers/scsi/dc395x.c || (srb->cmd->cmnd[0] == REQUEST_SENSE) srb 1456 drivers/scsi/dc395x.c || (srb->flag & AUTO_REQSENSE)) srb 1462 drivers/scsi/dc395x.c srb->msgout_buf[0] = identify_message; srb 1463 drivers/scsi/dc395x.c srb->msg_count = 1; srb 1465 drivers/scsi/dc395x.c srb->state = SRB_MSGOUT; srb 1469 drivers/scsi/dc395x.c build_wdtr(acb, dcb, srb); srb 1475 drivers/scsi/dc395x.c build_sdtr(acb, dcb, srb); srb 1480 drivers/scsi/dc395x.c build_wdtr(acb, dcb, srb); srb 1483 drivers/scsi/dc395x.c srb->msg_count = 0; srb 1489 drivers/scsi/dc395x.c srb->state = SRB_START_; srb 1504 drivers/scsi/dc395x.c srb->cmd, srb->cmd->device->id, srb 1505 drivers/scsi/dc395x.c (u8)srb->cmd->device->lun); srb 1506 drivers/scsi/dc395x.c srb->state = SRB_READY; srb 1515 drivers/scsi/dc395x.c srb->tag_number = tag_number; srb 1517 drivers/scsi/dc395x.c srb->state = SRB_START_; srb 1523 drivers/scsi/dc395x.c srb->cmd, srb->cmd->device->id, (u8)srb->cmd->device->lun, srb 1524 drivers/scsi/dc395x.c srb->cmd->cmnd[0], srb->tag_number); srb 1525 drivers/scsi/dc395x.c if (srb->flag & AUTO_REQSENSE) { srb 1533 drivers/scsi/dc395x.c ptr = (u8 *)srb->cmd->cmnd; srb 1534 drivers/scsi/dc395x.c for (i = 0; i < srb->cmd->cmd_len; i++) srb 1547 drivers/scsi/dc395x.c srb->cmd, dcb->target_id, dcb->target_lun); srb 1548 drivers/scsi/dc395x.c srb->state = SRB_READY; srb 1549 drivers/scsi/dc395x.c free_tag(dcb, srb); srb 1550 drivers/scsi/dc395x.c srb->msg_count = 0; srb 1558 drivers/scsi/dc395x.c srb->scsi_phase = PH_BUS_FREE; /* initial phase */ srb 1559 drivers/scsi/dc395x.c dcb->active_srb = srb; srb 1574 drivers/scsi/dc395x.c srb->state |= SRB_MSGOUT srb 1579 drivers/scsi/dc395x.c struct ScsiReqBlk *srb) srb 1581 drivers/scsi/dc395x.c srb->msgout_buf[0] = ABORT; srb 1582 drivers/scsi/dc395x.c srb->msg_count = 1; srb 1584 drivers/scsi/dc395x.c srb->state &= ~SRB_MSGIN; srb 1585 drivers/scsi/dc395x.c srb->state |= SRB_MSGOUT; srb 1600 drivers/scsi/dc395x.c struct ScsiReqBlk *srb; srb 1647 drivers/scsi/dc395x.c srb = dcb->active_srb; srb 1650 drivers/scsi/dc395x.c enable_msgout_abort(acb, srb); srb 1654 drivers/scsi/dc395x.c phase = (u16)srb->scsi_phase; srb 1670 drivers/scsi/dc395x.c dc395x_statev(acb, srb, &scsi_status); srb 1677 drivers/scsi/dc395x.c srb->scsi_phase = scsi_status & PHASEMASK; srb 1693 drivers/scsi/dc395x.c dc395x_statev(acb, srb, &scsi_status); srb 1739 drivers/scsi/dc395x.c static void msgout_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 1742 drivers/scsi/dc395x.c dprintkdbg(DBG_0, "msgout_phase0: (0x%p)\n", srb->cmd); srb 1743 drivers/scsi/dc395x.c if (srb->state & (SRB_UNEXPECT_RESEL + SRB_ABORT_SENT)) srb 1747 drivers/scsi/dc395x.c srb->state &= ~SRB_MSGOUT; srb 1751 drivers/scsi/dc395x.c static void msgout_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 1756 drivers/scsi/dc395x.c dprintkdbg(DBG_0, "msgout_phase1: (0x%p)\n", srb->cmd); srb 1759 drivers/scsi/dc395x.c if (!(srb->state & SRB_MSGOUT)) { srb 1760 drivers/scsi/dc395x.c srb->state |= SRB_MSGOUT; srb 1763 drivers/scsi/dc395x.c srb->cmd); /* So what ? */ srb 1765 drivers/scsi/dc395x.c if (!srb->msg_count) { srb 1767 drivers/scsi/dc395x.c srb->cmd); srb 1773 drivers/scsi/dc395x.c ptr = (u8 *)srb->msgout_buf; srb 1774 drivers/scsi/dc395x.c for (i = 0; i < srb->msg_count; i++) srb 1776 drivers/scsi/dc395x.c srb->msg_count = 0; srb 1777 drivers/scsi/dc395x.c if (srb->msgout_buf[0] == MSG_ABORT) srb 1778 drivers/scsi/dc395x.c srb->state = SRB_ABORT_SENT; srb 1784 drivers/scsi/dc395x.c static void command_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 1787 drivers/scsi/dc395x.c dprintkdbg(DBG_0, "command_phase0: (0x%p)\n", srb->cmd); srb 1792 drivers/scsi/dc395x.c static void command_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 1798 drivers/scsi/dc395x.c dprintkdbg(DBG_0, "command_phase1: (0x%p)\n", srb->cmd); srb 1802 drivers/scsi/dc395x.c if (!(srb->flag & AUTO_REQSENSE)) { srb 1803 drivers/scsi/dc395x.c ptr = (u8 *)srb->cmd->cmnd; srb 1804 drivers/scsi/dc395x.c for (i = 0; i < srb->cmd->cmd_len; i++) { srb 1818 drivers/scsi/dc395x.c srb->state |= SRB_COMMAND; srb 1830 drivers/scsi/dc395x.c static void sg_verify_length(struct ScsiReqBlk *srb) srb 1834 drivers/scsi/dc395x.c unsigned idx = srb->sg_index; srb 1835 drivers/scsi/dc395x.c struct SGentry *psge = srb->segment_x + idx; srb 1836 drivers/scsi/dc395x.c for (; idx < srb->sg_count; psge++, idx++) srb 1838 drivers/scsi/dc395x.c if (len != srb->total_xfer_length) srb 1841 drivers/scsi/dc395x.c srb->total_xfer_length, len); srb 1850 drivers/scsi/dc395x.c static void sg_update_list(struct ScsiReqBlk *srb, u32 left) srb 1853 drivers/scsi/dc395x.c u32 xferred = srb->total_xfer_length - left; /* bytes transferred */ srb 1854 drivers/scsi/dc395x.c struct SGentry *psge = srb->segment_x + srb->sg_index; srb 1858 drivers/scsi/dc395x.c xferred, srb->total_xfer_length, left); srb 1864 drivers/scsi/dc395x.c sg_verify_length(srb); srb 1865 drivers/scsi/dc395x.c srb->total_xfer_length = left; /* update remaining count */ srb 1866 drivers/scsi/dc395x.c for (idx = srb->sg_index; idx < srb->sg_count; idx++) { srb 1872 drivers/scsi/dc395x.c dma_sync_single_for_cpu(&srb->dcb->acb->dev->dev, srb 1873 drivers/scsi/dc395x.c srb->sg_bus_addr, SEGMENTX_LEN, srb 1877 drivers/scsi/dc395x.c srb->sg_index = idx; srb 1878 drivers/scsi/dc395x.c dma_sync_single_for_device(&srb->dcb->acb->dev->dev, srb 1879 drivers/scsi/dc395x.c srb->sg_bus_addr, SEGMENTX_LEN, srb 1885 drivers/scsi/dc395x.c sg_verify_length(srb); srb 1895 drivers/scsi/dc395x.c static void sg_subtract_one(struct ScsiReqBlk *srb) srb 1897 drivers/scsi/dc395x.c sg_update_list(srb, srb->total_xfer_length - 1); srb 1910 drivers/scsi/dc395x.c struct ScsiReqBlk *srb) srb 1935 drivers/scsi/dc395x.c static void data_out_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 1938 drivers/scsi/dc395x.c struct DeviceCtlBlk *dcb = srb->dcb; srb 1942 drivers/scsi/dc395x.c srb->cmd, srb->cmd->device->id, (u8)srb->cmd->device->lun); srb 1963 drivers/scsi/dc395x.c srb->total_xfer_length); srb 1966 drivers/scsi/dc395x.c if (!(srb->state & SRB_XFERPAD)) { srb 1968 drivers/scsi/dc395x.c srb->status |= PARITY_ERROR; srb 2007 drivers/scsi/dc395x.c if (srb->total_xfer_length > DC395x_LASTPIO) srb 2015 drivers/scsi/dc395x.c && scsi_bufflen(srb->cmd) % 2) { srb 2032 drivers/scsi/dc395x.c srb->total_xfer_length = 0; srb 2040 drivers/scsi/dc395x.c srb->total_xfer_length - d_left_counter; srb 2043 drivers/scsi/dc395x.c sg_update_list(srb, d_left_counter); srb 2045 drivers/scsi/dc395x.c if ((srb->segment_x[srb->sg_index].length == srb 2046 drivers/scsi/dc395x.c diff && scsi_sg_count(srb->cmd)) srb 2053 drivers/scsi/dc395x.c srb->total_xfer_length - diff; srb 2054 drivers/scsi/dc395x.c sg_update_list(srb, d_left_counter); srb 2063 drivers/scsi/dc395x.c cleanup_after_transfer(acb, srb); srb 2068 drivers/scsi/dc395x.c static void data_out_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 2072 drivers/scsi/dc395x.c srb->cmd, srb->cmd->device->id, (u8)srb->cmd->device->lun); srb 2075 drivers/scsi/dc395x.c data_io_transfer(acb, srb, XFERDATAOUT); srb 2078 drivers/scsi/dc395x.c static void data_in_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 2084 drivers/scsi/dc395x.c srb->cmd, srb->cmd->device->id, (u8)srb->cmd->device->lun); srb 2099 drivers/scsi/dc395x.c if (!(srb->state & SRB_XFERPAD)) { srb 2105 drivers/scsi/dc395x.c "Parity Error\n", srb->cmd); srb 2106 drivers/scsi/dc395x.c srb->status |= PARITY_ERROR; srb 2142 drivers/scsi/dc395x.c << ((srb->dcb->sync_period & WIDE_SYNC) ? 1 : srb 2149 drivers/scsi/dc395x.c (srb->dcb->sync_period & WIDE_SYNC) ? "words" : "bytes", srb 2154 drivers/scsi/dc395x.c srb->total_xfer_length, d_left_counter); srb 2158 drivers/scsi/dc395x.c && srb->total_xfer_length <= DC395x_LASTPIO) { srb 2159 drivers/scsi/dc395x.c size_t left_io = srb->total_xfer_length; srb 2166 drivers/scsi/dc395x.c (srb->dcb->sync_period & WIDE_SYNC) ? srb 2168 drivers/scsi/dc395x.c srb->total_xfer_length); srb 2169 drivers/scsi/dc395x.c if (srb->dcb->sync_period & WIDE_SYNC) srb 2176 drivers/scsi/dc395x.c size_t offset = srb->request_length - left_io; srb 2181 drivers/scsi/dc395x.c base = scsi_kmap_atomic_sg(scsi_sglist(srb->cmd), srb 2182 drivers/scsi/dc395x.c srb->sg_count, &offset, &len); srb 2196 drivers/scsi/dc395x.c sg_subtract_one(srb); srb 2210 drivers/scsi/dc395x.c if (fc == 0x40 && (srb->dcb->sync_period & WIDE_SYNC)) { srb 2212 drivers/scsi/dc395x.c if (srb->total_xfer_length > 0) { srb 2216 drivers/scsi/dc395x.c srb->total_xfer_length--; srb 2247 drivers/scsi/dc395x.c if (srb->dcb->sync_period & WIDE_SYNC) srb 2269 drivers/scsi/dc395x.c srb->total_xfer_length = 0; srb 2271 drivers/scsi/dc395x.c srb->total_xfer_length = d_left_counter; srb 2281 drivers/scsi/dc395x.c sg_update_list(srb, d_left_counter); srb 2286 drivers/scsi/dc395x.c cleanup_after_transfer(acb, srb); srb 2291 drivers/scsi/dc395x.c static void data_in_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 2295 drivers/scsi/dc395x.c srb->cmd, srb->cmd->device->id, (u8)srb->cmd->device->lun); srb 2296 drivers/scsi/dc395x.c data_io_transfer(acb, srb, XFERDATAIN); srb 2301 drivers/scsi/dc395x.c struct ScsiReqBlk *srb, u16 io_dir) srb 2303 drivers/scsi/dc395x.c struct DeviceCtlBlk *dcb = srb->dcb; srb 2307 drivers/scsi/dc395x.c srb->cmd, srb->cmd->device->id, (u8)srb->cmd->device->lun, srb 2309 drivers/scsi/dc395x.c srb->total_xfer_length, srb->sg_index, srb->sg_count); srb 2310 drivers/scsi/dc395x.c if (srb == acb->tmp_srb) srb 2312 drivers/scsi/dc395x.c if (srb->sg_index >= srb->sg_count) { srb 2317 drivers/scsi/dc395x.c if (srb->total_xfer_length > DC395x_LASTPIO) { srb 2326 drivers/scsi/dc395x.c dump_register_info(acb, dcb, srb); srb 2334 drivers/scsi/dc395x.c srb->state |= SRB_DATA_XFER; srb 2336 drivers/scsi/dc395x.c if (scsi_sg_count(srb->cmd)) { /* with S/G */ srb 2339 drivers/scsi/dc395x.c srb->sg_bus_addr + srb 2341 drivers/scsi/dc395x.c srb->sg_index); srb 2344 drivers/scsi/dc395x.c ((u32)(srb->sg_count - srb 2345 drivers/scsi/dc395x.c srb->sg_index) << 3)); srb 2349 drivers/scsi/dc395x.c srb->segment_x[0].address); srb 2351 drivers/scsi/dc395x.c srb->segment_x[0].length); srb 2355 drivers/scsi/dc395x.c srb->total_xfer_length); srb 2369 drivers/scsi/dc395x.c else if (srb->total_xfer_length > 0) { /* The last four bytes: Do PIO */ srb 2374 drivers/scsi/dc395x.c srb->state |= SRB_DATA_XFER; srb 2377 drivers/scsi/dc395x.c srb->total_xfer_length); srb 2383 drivers/scsi/dc395x.c int ln = srb->total_xfer_length; srb 2384 drivers/scsi/dc395x.c size_t left_io = srb->total_xfer_length; srb 2386 drivers/scsi/dc395x.c if (srb->dcb->sync_period & WIDE_SYNC) srb 2394 drivers/scsi/dc395x.c size_t offset = srb->request_length - left_io; srb 2398 drivers/scsi/dc395x.c base = scsi_kmap_atomic_sg(scsi_sglist(srb->cmd), srb 2399 drivers/scsi/dc395x.c srb->sg_count, &offset, &len); srb 2410 drivers/scsi/dc395x.c sg_subtract_one(srb); srb 2416 drivers/scsi/dc395x.c if (srb->dcb->sync_period & WIDE_SYNC) { srb 2434 drivers/scsi/dc395x.c if (srb->sg_count) { srb 2435 drivers/scsi/dc395x.c srb->adapter_status = H_OVER_UNDER_RUN; srb 2436 drivers/scsi/dc395x.c srb->status |= OVER_RUN; srb 2467 drivers/scsi/dc395x.c srb->state |= SRB_XFERPAD; srb 2476 drivers/scsi/dc395x.c static void status_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 2480 drivers/scsi/dc395x.c srb->cmd, srb->cmd->device->id, (u8)srb->cmd->device->lun); srb 2481 drivers/scsi/dc395x.c srb->target_status = DC395x_read8(acb, TRM_S1040_SCSI_FIFO); srb 2482 drivers/scsi/dc395x.c srb->end_message = DC395x_read8(acb, TRM_S1040_SCSI_FIFO); /* get message */ srb 2483 drivers/scsi/dc395x.c srb->state = SRB_COMPLETED; srb 2490 drivers/scsi/dc395x.c static void status_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 2494 drivers/scsi/dc395x.c srb->cmd, srb->cmd->device->id, (u8)srb->cmd->device->lun); srb 2495 drivers/scsi/dc395x.c srb->state = SRB_STATUS; srb 2517 drivers/scsi/dc395x.c struct ScsiReqBlk *srb) srb 2519 drivers/scsi/dc395x.c srb->msgout_buf[0] = MESSAGE_REJECT; srb 2520 drivers/scsi/dc395x.c srb->msg_count = 1; srb 2522 drivers/scsi/dc395x.c srb->state &= ~SRB_MSGIN; srb 2523 drivers/scsi/dc395x.c srb->state |= SRB_MSGOUT; srb 2525 drivers/scsi/dc395x.c srb->msgin_buf[0], srb 2526 drivers/scsi/dc395x.c srb->dcb->target_id, srb->dcb->target_lun); srb 2533 drivers/scsi/dc395x.c struct ScsiReqBlk *srb = NULL; srb 2536 drivers/scsi/dc395x.c srb->cmd, tag, srb); srb 2547 drivers/scsi/dc395x.c srb = i; srb 2551 drivers/scsi/dc395x.c if (!srb) srb 2555 drivers/scsi/dc395x.c srb->cmd, srb->dcb->target_id, srb->dcb->target_lun); srb 2558 drivers/scsi/dc395x.c enable_msgout_abort(acb, srb); srb 2561 drivers/scsi/dc395x.c if (!(srb->state & SRB_DISCONNECT)) srb 2564 drivers/scsi/dc395x.c memcpy(srb->msgin_buf, dcb->active_srb->msgin_buf, acb->msg_len); srb 2565 drivers/scsi/dc395x.c srb->state |= dcb->active_srb->state; srb 2566 drivers/scsi/dc395x.c srb->state |= SRB_DATA_XFER; srb 2567 drivers/scsi/dc395x.c dcb->active_srb = srb; srb 2569 drivers/scsi/dc395x.c return srb; srb 2572 drivers/scsi/dc395x.c srb = acb->tmp_srb; srb 2573 drivers/scsi/dc395x.c srb->state = SRB_UNEXPECT_RESEL; srb 2574 drivers/scsi/dc395x.c dcb->active_srb = srb; srb 2575 drivers/scsi/dc395x.c srb->msgout_buf[0] = MSG_ABORT_TAG; srb 2576 drivers/scsi/dc395x.c srb->msg_count = 1; srb 2579 drivers/scsi/dc395x.c return srb; srb 2594 drivers/scsi/dc395x.c static void msgin_set_async(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb) srb 2596 drivers/scsi/dc395x.c struct DeviceCtlBlk *dcb = srb->dcb; srb 2605 drivers/scsi/dc395x.c srb->state &= ~SRB_DO_SYNC_NEGO; srb 2609 drivers/scsi/dc395x.c build_wdtr(acb, dcb, srb); srb 2617 drivers/scsi/dc395x.c static void msgin_set_sync(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb) srb 2619 drivers/scsi/dc395x.c struct DeviceCtlBlk *dcb = srb->dcb; srb 2624 drivers/scsi/dc395x.c dcb->target_id, srb->msgin_buf[3] << 2, srb 2625 drivers/scsi/dc395x.c (250 / srb->msgin_buf[3]), srb 2626 drivers/scsi/dc395x.c ((250 % srb->msgin_buf[3]) * 10) / srb->msgin_buf[3], srb 2627 drivers/scsi/dc395x.c srb->msgin_buf[4]); srb 2629 drivers/scsi/dc395x.c if (srb->msgin_buf[4] > 15) srb 2630 drivers/scsi/dc395x.c srb->msgin_buf[4] = 15; srb 2634 drivers/scsi/dc395x.c dcb->sync_offset = srb->msgin_buf[4]; srb 2635 drivers/scsi/dc395x.c if (srb->msgin_buf[4] > dcb->sync_offset) srb 2636 drivers/scsi/dc395x.c srb->msgin_buf[4] = dcb->sync_offset; srb 2638 drivers/scsi/dc395x.c dcb->sync_offset = srb->msgin_buf[4]; srb 2640 drivers/scsi/dc395x.c while (bval < 7 && (srb->msgin_buf[3] > clock_period[bval] srb 2644 drivers/scsi/dc395x.c if (srb->msgin_buf[3] < clock_period[bval]) srb 2648 drivers/scsi/dc395x.c srb->msgin_buf[3] = clock_period[bval]; srb 2651 drivers/scsi/dc395x.c dcb->min_nego_period = srb->msgin_buf[3]; srb 2666 drivers/scsi/dc395x.c if (!(srb->state & SRB_DO_SYNC_NEGO)) { srb 2669 drivers/scsi/dc395x.c srb->msgin_buf[3] << 2, srb->msgin_buf[4]); srb 2671 drivers/scsi/dc395x.c memcpy(srb->msgout_buf, srb->msgin_buf, 5); srb 2672 drivers/scsi/dc395x.c srb->msg_count = 5; srb 2678 drivers/scsi/dc395x.c build_wdtr(acb, dcb, srb); srb 2683 drivers/scsi/dc395x.c srb->state &= ~SRB_DO_SYNC_NEGO; srb 2691 drivers/scsi/dc395x.c struct ScsiReqBlk *srb) srb 2693 drivers/scsi/dc395x.c struct DeviceCtlBlk *dcb = srb->dcb; srb 2699 drivers/scsi/dc395x.c srb->state &= ~SRB_DO_WIDE_NEGO; srb 2703 drivers/scsi/dc395x.c build_sdtr(acb, dcb, srb); srb 2709 drivers/scsi/dc395x.c static void msgin_set_wide(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb) srb 2711 drivers/scsi/dc395x.c struct DeviceCtlBlk *dcb = srb->dcb; srb 2716 drivers/scsi/dc395x.c if (srb->msgin_buf[3] > wide) srb 2717 drivers/scsi/dc395x.c srb->msgin_buf[3] = wide; srb 2719 drivers/scsi/dc395x.c if (!(srb->state & SRB_DO_WIDE_NEGO)) { srb 2723 drivers/scsi/dc395x.c memcpy(srb->msgout_buf, srb->msgin_buf, 4); srb 2724 drivers/scsi/dc395x.c srb->msg_count = 4; srb 2725 drivers/scsi/dc395x.c srb->state |= SRB_DO_WIDE_NEGO; srb 2730 drivers/scsi/dc395x.c if (srb->msgin_buf[3] > 0) srb 2734 drivers/scsi/dc395x.c srb->state &= ~SRB_DO_WIDE_NEGO; srb 2738 drivers/scsi/dc395x.c (8 << srb->msgin_buf[3]), dcb->target_id); srb 2742 drivers/scsi/dc395x.c build_sdtr(acb, dcb, srb); srb 2761 drivers/scsi/dc395x.c static void msgin_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 2765 drivers/scsi/dc395x.c dprintkdbg(DBG_0, "msgin_phase0: (0x%p)\n", srb->cmd); srb 2767 drivers/scsi/dc395x.c srb->msgin_buf[acb->msg_len++] = DC395x_read8(acb, TRM_S1040_SCSI_FIFO); srb 2768 drivers/scsi/dc395x.c if (msgin_completed(srb->msgin_buf, acb->msg_len)) { srb 2770 drivers/scsi/dc395x.c switch (srb->msgin_buf[0]) { srb 2772 drivers/scsi/dc395x.c srb->state = SRB_DISCONNECT; srb 2778 drivers/scsi/dc395x.c srb = srb 2780 drivers/scsi/dc395x.c srb->msgin_buf[1]); srb 2787 drivers/scsi/dc395x.c if (srb->state & SRB_DO_SYNC_NEGO) { srb 2788 drivers/scsi/dc395x.c msgin_set_async(acb, srb); srb 2792 drivers/scsi/dc395x.c if (srb->state & SRB_DO_WIDE_NEGO) { srb 2793 drivers/scsi/dc395x.c msgin_set_nowide(acb, srb); srb 2796 drivers/scsi/dc395x.c enable_msgout_abort(acb, srb); srb 2802 drivers/scsi/dc395x.c if (srb->msgin_buf[1] == 3 srb 2803 drivers/scsi/dc395x.c && srb->msgin_buf[2] == EXTENDED_SDTR) { srb 2804 drivers/scsi/dc395x.c msgin_set_sync(acb, srb); srb 2808 drivers/scsi/dc395x.c if (srb->msgin_buf[1] == 2 srb 2809 drivers/scsi/dc395x.c && srb->msgin_buf[2] == EXTENDED_WDTR srb 2810 drivers/scsi/dc395x.c && srb->msgin_buf[3] <= 2) { /* sanity check ... */ srb 2811 drivers/scsi/dc395x.c msgin_set_wide(acb, srb); srb 2814 drivers/scsi/dc395x.c msgin_reject(acb, srb); srb 2833 drivers/scsi/dc395x.c srb->cmd, srb->total_xfer_length); srb 2843 drivers/scsi/dc395x.c srb->cmd, dcb->target_id, srb 2846 drivers/scsi/dc395x.c enable_msgout_abort(acb, srb); srb 2851 drivers/scsi/dc395x.c if (srb->msgin_buf[0] & IDENTIFY_BASE) { srb 2853 drivers/scsi/dc395x.c srb->msg_count = 1; srb 2854 drivers/scsi/dc395x.c srb->msgout_buf[0] = dcb->identify_msg; srb 2856 drivers/scsi/dc395x.c srb->state |= SRB_MSGOUT; srb 2859 drivers/scsi/dc395x.c msgin_reject(acb, srb); srb 2863 drivers/scsi/dc395x.c srb->state &= ~SRB_MSGIN; srb 2872 drivers/scsi/dc395x.c static void msgin_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 2875 drivers/scsi/dc395x.c dprintkdbg(DBG_0, "msgin_phase1: (0x%p)\n", srb->cmd); srb 2878 drivers/scsi/dc395x.c if (!(srb->state & SRB_MSGIN)) { srb 2879 drivers/scsi/dc395x.c srb->state &= ~SRB_DISCONNECT; srb 2880 drivers/scsi/dc395x.c srb->state |= SRB_MSGIN; srb 2888 drivers/scsi/dc395x.c static void nop0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 2894 drivers/scsi/dc395x.c static void nop1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, srb 2926 drivers/scsi/dc395x.c struct ScsiReqBlk *srb; srb 2939 drivers/scsi/dc395x.c srb = dcb->active_srb; srb 2941 drivers/scsi/dc395x.c dprintkdbg(DBG_0, "disconnect: (0x%p)\n", srb->cmd); srb 2943 drivers/scsi/dc395x.c srb->scsi_phase = PH_BUS_FREE; /* initial phase */ srb 2946 drivers/scsi/dc395x.c if (srb->state & SRB_UNEXPECT_RESEL) { srb 2950 drivers/scsi/dc395x.c srb->state = 0; srb 2952 drivers/scsi/dc395x.c } else if (srb->state & SRB_ABORT_SENT) { srb 2956 drivers/scsi/dc395x.c doing_srb_done(acb, DID_ABORT, srb->cmd, 1); srb 2959 drivers/scsi/dc395x.c if ((srb->state & (SRB_START_ + SRB_MSGOUT)) srb 2960 drivers/scsi/dc395x.c || !(srb-> srb 2967 drivers/scsi/dc395x.c if (srb->state != SRB_START_ srb 2968 drivers/scsi/dc395x.c && srb->state != SRB_MSGOUT) { srb 2969 drivers/scsi/dc395x.c srb->state = SRB_READY; srb 2972 drivers/scsi/dc395x.c srb->cmd); srb 2973 drivers/scsi/dc395x.c srb->target_status = SCSI_STAT_SEL_TIMEOUT; srb 2978 drivers/scsi/dc395x.c "<%02i-%i> SelTO\n", srb->cmd, srb 2980 drivers/scsi/dc395x.c if (srb->retry_count++ > DC395x_MAX_RETRIES srb 2982 drivers/scsi/dc395x.c srb->target_status = srb 2986 drivers/scsi/dc395x.c free_tag(dcb, srb); srb 2987 drivers/scsi/dc395x.c list_move(&srb->list, &dcb->srb_waiting_list); srb 2990 drivers/scsi/dc395x.c srb->cmd); srb 2993 drivers/scsi/dc395x.c } else if (srb->state & SRB_DISCONNECT) { srb 3005 drivers/scsi/dc395x.c } else if (srb->state & SRB_COMPLETED) { srb 3010 drivers/scsi/dc395x.c free_tag(dcb, srb); srb 3012 drivers/scsi/dc395x.c srb->state = SRB_FREE; srb 3013 drivers/scsi/dc395x.c srb_done(acb, dcb, srb); srb 3022 drivers/scsi/dc395x.c struct ScsiReqBlk *srb = NULL; srb 3033 drivers/scsi/dc395x.c srb = dcb->active_srb; srb 3034 drivers/scsi/dc395x.c if (!srb) { srb 3044 drivers/scsi/dc395x.c srb->cmd, dcb->target_id, srb 3050 drivers/scsi/dc395x.c srb->state = SRB_READY; srb 3051 drivers/scsi/dc395x.c free_tag(dcb, srb); srb 3052 drivers/scsi/dc395x.c list_move(&srb->list, &dcb->srb_waiting_list); srb 3079 drivers/scsi/dc395x.c srb = acb->tmp_srb; srb 3080 drivers/scsi/dc395x.c dcb->active_srb = srb; srb 3083 drivers/scsi/dc395x.c srb = dcb->active_srb; srb 3084 drivers/scsi/dc395x.c if (!srb || !(srb->state & SRB_DISCONNECT)) { srb 3091 drivers/scsi/dc395x.c srb = acb->tmp_srb; srb 3092 drivers/scsi/dc395x.c srb->state = SRB_UNEXPECT_RESEL; srb 3093 drivers/scsi/dc395x.c dcb->active_srb = srb; srb 3094 drivers/scsi/dc395x.c enable_msgout_abort(acb, srb); srb 3098 drivers/scsi/dc395x.c enable_msgout_abort(acb, srb); srb 3100 drivers/scsi/dc395x.c srb->state = SRB_DATA_XFER; srb 3104 drivers/scsi/dc395x.c srb->scsi_phase = PH_BUS_FREE; /* initial phase */ srb 3166 drivers/scsi/dc395x.c static void pci_unmap_srb(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb) srb 3168 drivers/scsi/dc395x.c struct scsi_cmnd *cmd = srb->cmd; srb 3174 drivers/scsi/dc395x.c srb->sg_bus_addr, SEGMENTX_LEN); srb 3175 drivers/scsi/dc395x.c dma_unmap_single(&acb->dev->dev, srb->sg_bus_addr, SEGMENTX_LEN, srb 3187 drivers/scsi/dc395x.c struct ScsiReqBlk *srb) srb 3189 drivers/scsi/dc395x.c if (!(srb->flag & AUTO_REQSENSE)) srb 3193 drivers/scsi/dc395x.c srb->segment_x[0].address); srb 3194 drivers/scsi/dc395x.c dma_unmap_single(&acb->dev->dev, srb->segment_x[0].address, srb 3195 drivers/scsi/dc395x.c srb->segment_x[0].length, DMA_FROM_DEVICE); srb 3197 drivers/scsi/dc395x.c srb->total_xfer_length = srb->xferred; srb 3198 drivers/scsi/dc395x.c srb->segment_x[0].address = srb 3199 drivers/scsi/dc395x.c srb->segment_x[DC395x_MAX_SG_LISTENTRY - 1].address; srb 3200 drivers/scsi/dc395x.c srb->segment_x[0].length = srb 3201 drivers/scsi/dc395x.c srb->segment_x[DC395x_MAX_SG_LISTENTRY - 1].length; srb 3210 drivers/scsi/dc395x.c struct ScsiReqBlk *srb) srb 3213 drivers/scsi/dc395x.c struct scsi_cmnd *cmd = srb->cmd; srb 3217 drivers/scsi/dc395x.c dprintkdbg(DBG_1, "srb_done: (0x%p) <%02i-%i>\n", srb->cmd, srb 3218 drivers/scsi/dc395x.c srb->cmd->device->id, (u8)srb->cmd->device->lun); srb 3220 drivers/scsi/dc395x.c srb, scsi_sg_count(cmd), srb->sg_index, srb->sg_count, srb 3222 drivers/scsi/dc395x.c status = srb->target_status; srb 3223 drivers/scsi/dc395x.c if (srb->flag & AUTO_REQSENSE) { srb 3225 drivers/scsi/dc395x.c pci_unmap_srb_sense(acb, srb); srb 3229 drivers/scsi/dc395x.c srb->flag &= ~AUTO_REQSENSE; srb 3230 drivers/scsi/dc395x.c srb->adapter_status = 0; srb 3231 drivers/scsi/dc395x.c srb->target_status = CHECK_CONDITION << 1; srb 3284 drivers/scsi/dc395x.c if (srb->total_xfer_length srb 3285 drivers/scsi/dc395x.c && srb->total_xfer_length >= cmd->underflow) srb 3288 drivers/scsi/dc395x.c srb->end_message, CHECK_CONDITION); srb 3293 drivers/scsi/dc395x.c srb->end_message, CHECK_CONDITION); srb 3304 drivers/scsi/dc395x.c request_sense(acb, dcb, srb); srb 3313 drivers/scsi/dc395x.c free_tag(dcb, srb); srb 3314 drivers/scsi/dc395x.c list_move(&srb->list, &dcb->srb_waiting_list); srb 3316 drivers/scsi/dc395x.c srb->adapter_status = 0; srb 3317 drivers/scsi/dc395x.c srb->target_status = 0; srb 3320 drivers/scsi/dc395x.c srb->adapter_status = H_SEL_TIMEOUT; srb 3321 drivers/scsi/dc395x.c srb->target_status = 0; srb 3324 drivers/scsi/dc395x.c srb->adapter_status = 0; srb 3326 drivers/scsi/dc395x.c SET_RES_MSG(cmd->result, srb->end_message); srb 3334 drivers/scsi/dc395x.c status = srb->adapter_status; srb 3336 drivers/scsi/dc395x.c srb->target_status = 0; srb 3338 drivers/scsi/dc395x.c SET_RES_MSG(cmd->result, srb->end_message); srb 3339 drivers/scsi/dc395x.c } else if (srb->status & PARITY_ERROR) { srb 3341 drivers/scsi/dc395x.c SET_RES_MSG(cmd->result, srb->end_message); srb 3344 drivers/scsi/dc395x.c srb->adapter_status = 0; srb 3345 drivers/scsi/dc395x.c srb->target_status = 0; srb 3354 drivers/scsi/dc395x.c pci_unmap_srb(acb, srb); srb 3387 drivers/scsi/dc395x.c scsi_set_resid(cmd, srb->total_xfer_length); srb 3389 drivers/scsi/dc395x.c cmd->SCp.this_residual = srb->total_xfer_length; srb 3392 drivers/scsi/dc395x.c if (srb->total_xfer_length) srb 3396 drivers/scsi/dc395x.c cmd->cmnd[0], srb->total_xfer_length); srb 3399 drivers/scsi/dc395x.c if (srb != acb->tmp_srb) { srb 3403 drivers/scsi/dc395x.c list_move_tail(&srb->list, &acb->srb_free_list); srb 3421 drivers/scsi/dc395x.c struct ScsiReqBlk *srb; srb 3425 drivers/scsi/dc395x.c list_for_each_entry_safe(srb, tmp, &dcb->srb_going_list, list) { srb 3429 drivers/scsi/dc395x.c p = srb->cmd; srb 3434 drivers/scsi/dc395x.c list_del(&srb->list); srb 3435 drivers/scsi/dc395x.c free_tag(dcb, srb); srb 3436 drivers/scsi/dc395x.c list_add_tail(&srb->list, &acb->srb_free_list); srb 3438 drivers/scsi/dc395x.c pci_unmap_srb_sense(acb, srb); srb 3439 drivers/scsi/dc395x.c pci_unmap_srb(acb, srb); srb 3457 drivers/scsi/dc395x.c list_for_each_entry_safe(srb, tmp, &dcb->srb_waiting_list, list) { srb 3459 drivers/scsi/dc395x.c p = srb->cmd; srb 3464 drivers/scsi/dc395x.c list_move_tail(&srb->list, &acb->srb_free_list); srb 3466 drivers/scsi/dc395x.c pci_unmap_srb_sense(acb, srb); srb 3467 drivers/scsi/dc395x.c pci_unmap_srb(acb, srb); srb 3567 drivers/scsi/dc395x.c struct ScsiReqBlk *srb) srb 3569 drivers/scsi/dc395x.c struct scsi_cmnd *cmd = srb->cmd; srb 3573 drivers/scsi/dc395x.c srb->flag |= AUTO_REQSENSE; srb 3574 drivers/scsi/dc395x.c srb->adapter_status = 0; srb 3575 drivers/scsi/dc395x.c srb->target_status = 0; srb 3581 drivers/scsi/dc395x.c srb->segment_x[DC395x_MAX_SG_LISTENTRY - 1].address = srb 3582 drivers/scsi/dc395x.c srb->segment_x[0].address; srb 3583 drivers/scsi/dc395x.c srb->segment_x[DC395x_MAX_SG_LISTENTRY - 1].length = srb 3584 drivers/scsi/dc395x.c srb->segment_x[0].length; srb 3585 drivers/scsi/dc395x.c srb->xferred = srb->total_xfer_length; srb 3587 drivers/scsi/dc395x.c srb->total_xfer_length = SCSI_SENSE_BUFFERSIZE; srb 3588 drivers/scsi/dc395x.c srb->segment_x[0].length = SCSI_SENSE_BUFFERSIZE; srb 3590 drivers/scsi/dc395x.c srb->segment_x[0].address = dma_map_single(&acb->dev->dev, srb 3594 drivers/scsi/dc395x.c cmd->sense_buffer, srb->segment_x[0].address, srb 3596 drivers/scsi/dc395x.c srb->sg_count = 1; srb 3597 drivers/scsi/dc395x.c srb->sg_index = 0; srb 3599 drivers/scsi/dc395x.c if (start_scsi(acb, dcb, srb)) { /* Should only happen, if sb. else grabs the bus */ srb 3602 drivers/scsi/dc395x.c srb->cmd, dcb->target_id, dcb->target_lun); srb 3603 drivers/scsi/dc395x.c list_move(&srb->list, &dcb->srb_waiting_list); srb 4182 drivers/scsi/dc395x.c acb->srb.segment_x = srb 4259 drivers/scsi/dc395x.c acb->tmp_srb = &acb->srb; srb 4589 drivers/scsi/dc395x.c struct ScsiReqBlk *srb; srb 4594 drivers/scsi/dc395x.c list_for_each_entry(srb, &dcb->srb_waiting_list, list) srb 4595 drivers/scsi/dc395x.c seq_printf(m, " %p", srb->cmd); srb 4600 drivers/scsi/dc395x.c list_for_each_entry(srb, &dcb->srb_going_list, list) srb 4601 drivers/scsi/dc395x.c seq_printf(m, " %p", srb->cmd); srb 691 drivers/scsi/initio.c cmnd->srb = NULL; srb 942 drivers/scsi/initio.c if (tmp->srb == srbp) { srb 967 drivers/scsi/initio.c if (tmp->srb == srbp) { srb 1222 drivers/scsi/initio.c if (initio_abort_srb(host, scb->srb) != 0) { srb 2542 drivers/scsi/initio.c cblk->srb = cmnd; srb 2746 drivers/scsi/initio.c if ((cmnd = cblk->srb) == NULL) { srb 385 drivers/scsi/initio.h struct scsi_cmnd *srb; /*50 SRB Pointer */ srb 406 drivers/scsi/qla1280.c static int qla1280_abort_command(struct scsi_qla_host *, struct srb *, int); srb 409 drivers/scsi/qla1280.c static int qla1280_64bit_start_scsi(struct scsi_qla_host *, struct srb *); srb 411 drivers/scsi/qla1280.c static int qla1280_32bit_start_scsi(struct scsi_qla_host *, struct srb *); srb 698 drivers/scsi/qla1280.c struct srb *sp = (struct srb *)CMD_SP(cmd); srb 747 drivers/scsi/qla1280.c _qla1280_wait_for_single_command(struct scsi_qla_host *ha, struct srb *sp, srb 765 drivers/scsi/qla1280.c qla1280_wait_for_single_command(struct scsi_qla_host *ha, struct srb *sp) srb 778 drivers/scsi/qla1280.c struct srb *sp; srb 824 drivers/scsi/qla1280.c struct srb *sp; srb 834 drivers/scsi/qla1280.c sp = (struct srb *)CMD_SP(cmd); srb 1242 drivers/scsi/qla1280.c struct srb *sp; srb 1252 drivers/scsi/qla1280.c sp = list_entry(done_q->next, struct srb, list); srb 1887 drivers/scsi/qla1280.c sizeof(struct srb *) * MAX_OUTSTANDING_COMMANDS); srb 2636 drivers/scsi/qla1280.c qla1280_abort_command(struct scsi_qla_host *ha, struct srb * sp, int handle) srb 2738 drivers/scsi/qla1280.c qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) srb 2992 drivers/scsi/qla1280.c qla1280_32bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) srb 3343 drivers/scsi/qla1280.c struct srb *sp = NULL; srb 3601 drivers/scsi/qla1280.c struct srb *sp; srb 3697 drivers/scsi/qla1280.c struct srb *sp; srb 3761 drivers/scsi/qla1280.c struct srb *sp; srb 3959 drivers/scsi/qla1280.c struct srb *sp; srb 3965 drivers/scsi/qla1280.c sp = (struct srb *)CMD_SP(cmd); srb 3999 drivers/scsi/qla1280.c struct srb *sp; srb 4357 drivers/scsi/qla1280.c if (sizeof(struct srb) > sizeof(struct scsi_pointer)) { srb 1027 drivers/scsi/qla1280.h struct srb *outstanding_cmds[MAX_OUTSTANDING_COMMANDS]; srb 610 drivers/scsi/qla2xxx/qla_def.h struct srb *cmd_sp; srb 627 drivers/scsi/qla2xxx/qla_def.h void (*done)(struct srb *sp, int res); srb 629 drivers/scsi/qla2xxx/qla_def.h void (*free)(struct srb *sp); srb 3762 drivers/scsi/qla2xxx/qla_gs.c struct srb *sp) srb 3947 drivers/scsi/qla2xxx/qla_gs.c static int qla24xx_async_gnnft(scsi_qla_host_t *vha, struct srb *sp, srb 1409 drivers/scsi/qla2xxx/qla_init.c struct srb *sp = ea->sp; srb 125 drivers/scsi/qla2xxx/qla_nvme.c struct srb *sp = container_of(kref, struct srb, cmd_kref); srb 156 drivers/scsi/qla2xxx/qla_nvme.c struct srb *sp = container_of(kref, struct srb, cmd_kref); srb 28 drivers/scsi/qla2xxx/qla_nvme.h struct srb; srb 31 drivers/scsi/qla2xxx/qla_nvme.h struct srb *sp; srb 146 drivers/scsi/qla2xxx/qla_nvme.h void qla24xx_async_gffid_sp_done(struct srb *sp, int); srb 5197 drivers/scsi/qla2xxx/qla_os.c struct srb *sp = e->u.iosb.sp; srb 721 drivers/scsi/qla4xxx/ql4_def.h struct srb *status_srb; srb 15 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_send_command_to_isp(struct scsi_qla_host *ha, struct srb *srb); srb 24 drivers/scsi/qla4xxx/ql4_glbl.h int qla4xxx_abort_task(struct scsi_qla_host *ha, struct srb *srb); srb 73 drivers/scsi/qla4xxx/ql4_glbl.h struct srb *qla4xxx_del_from_active_array(struct scsi_qla_host *ha, srb 148 drivers/scsi/qla4xxx/ql4_iocb.c static void qla4xxx_build_scsi_iocbs(struct srb *srb, srb 159 drivers/scsi/qla4xxx/ql4_iocb.c cmd = srb->cmd; srb 160 drivers/scsi/qla4xxx/ql4_iocb.c ha = srb->ha; srb 273 drivers/scsi/qla4xxx/ql4_iocb.c int qla4xxx_send_command_to_isp(struct scsi_qla_host *ha, struct srb * srb) srb 275 drivers/scsi/qla4xxx/ql4_iocb.c struct scsi_cmnd *cmd = srb->cmd; srb 285 drivers/scsi/qla4xxx/ql4_iocb.c ddb_entry = srb->ddb; srb 356 drivers/scsi/qla4xxx/ql4_iocb.c qla4xxx_build_scsi_iocbs(srb, cmd_entry, tot_dsds); srb 359 drivers/scsi/qla4xxx/ql4_iocb.c srb->cmd->host_scribble = (unsigned char *)(unsigned long)index; srb 362 drivers/scsi/qla4xxx/ql4_iocb.c srb->state = SRB_ACTIVE_STATE; srb 363 drivers/scsi/qla4xxx/ql4_iocb.c srb->flags |= SRB_DMA_VALID; srb 367 drivers/scsi/qla4xxx/ql4_iocb.c srb->iocb_cnt = req_cnt; srb 21 drivers/scsi/qla4xxx/ql4_isr.c struct srb *srb) srb 23 drivers/scsi/qla4xxx/ql4_isr.c struct scsi_cmnd *cmd = srb->cmd; srb 39 drivers/scsi/qla4xxx/ql4_isr.c srb->req_sense_ptr = cmd->sense_buffer; srb 40 drivers/scsi/qla4xxx/ql4_isr.c srb->req_sense_len = sense_len; srb 56 drivers/scsi/qla4xxx/ql4_isr.c srb->flags |= SRB_GOT_SENSE; srb 59 drivers/scsi/qla4xxx/ql4_isr.c srb->req_sense_ptr += sense_len; srb 60 drivers/scsi/qla4xxx/ql4_isr.c srb->req_sense_len -= sense_len; srb 61 drivers/scsi/qla4xxx/ql4_isr.c if (srb->req_sense_len != 0) srb 62 drivers/scsi/qla4xxx/ql4_isr.c ha->status_srb = srb; srb 78 drivers/scsi/qla4xxx/ql4_isr.c struct srb *srb = ha->status_srb; srb 82 drivers/scsi/qla4xxx/ql4_isr.c if (srb == NULL) srb 85 drivers/scsi/qla4xxx/ql4_isr.c cmd = srb->cmd; srb 89 drivers/scsi/qla4xxx/ql4_isr.c __func__, srb, srb->state)); srb 95 drivers/scsi/qla4xxx/ql4_isr.c sense_len = min_t(uint16_t, srb->req_sense_len, srb 97 drivers/scsi/qla4xxx/ql4_isr.c memcpy(srb->req_sense_ptr, sts_cont->ext_sense_data, sense_len); srb 98 drivers/scsi/qla4xxx/ql4_isr.c DEBUG5(qla4xxx_dump_buffer(srb->req_sense_ptr, sense_len)); srb 100 drivers/scsi/qla4xxx/ql4_isr.c srb->req_sense_ptr += sense_len; srb 101 drivers/scsi/qla4xxx/ql4_isr.c srb->req_sense_len -= sense_len; srb 104 drivers/scsi/qla4xxx/ql4_isr.c if (srb->req_sense_len == 0) { srb 105 drivers/scsi/qla4xxx/ql4_isr.c kref_put(&srb->srb_ref, qla4xxx_srb_compl); srb 120 drivers/scsi/qla4xxx/ql4_isr.c struct srb *srb; srb 124 drivers/scsi/qla4xxx/ql4_isr.c srb = qla4xxx_del_from_active_array(ha, le32_to_cpu(sts_entry->handle)); srb 125 drivers/scsi/qla4xxx/ql4_isr.c if (!srb) { srb 128 drivers/scsi/qla4xxx/ql4_isr.c sts_entry->handle, srb); srb 136 drivers/scsi/qla4xxx/ql4_isr.c cmd = srb->cmd; srb 141 drivers/scsi/qla4xxx/ql4_isr.c srb, srb->state)); srb 143 drivers/scsi/qla4xxx/ql4_isr.c " already returned to OS (srb=%p)\n", srb); srb 147 drivers/scsi/qla4xxx/ql4_isr.c ddb_entry = srb->ddb; srb 190 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_copy_sense(ha, sts_entry, srb); srb 310 drivers/scsi/qla4xxx/ql4_isr.c qla4xxx_copy_sense(ha, sts_entry, srb); srb 354 drivers/scsi/qla4xxx/ql4_isr.c srb->cc_stat = sts_entry->completionStatus; srb 356 drivers/scsi/qla4xxx/ql4_isr.c kref_put(&srb->srb_ref, qla4xxx_srb_compl); srb 477 drivers/scsi/qla4xxx/ql4_isr.c struct srb *srb = NULL; srb 522 drivers/scsi/qla4xxx/ql4_isr.c srb = qla4xxx_del_from_active_array(ha, srb 525 drivers/scsi/qla4xxx/ql4_isr.c if (srb == NULL) srb 529 drivers/scsi/qla4xxx/ql4_isr.c "srb %p\n", ha->host_no, __func__, srb)); srb 533 drivers/scsi/qla4xxx/ql4_isr.c srb->cmd->result = DID_BUS_BUSY << 16; srb 534 drivers/scsi/qla4xxx/ql4_isr.c kref_put(&srb->srb_ref, qla4xxx_srb_compl); srb 574 drivers/scsi/qla4xxx/ql4_isr.c ha->host_no, __func__, srb, sts_entry->hdr.entryType, srb 1168 drivers/scsi/qla4xxx/ql4_mbx.c int qla4xxx_abort_task(struct scsi_qla_host *ha, struct srb *srb) srb 1172 drivers/scsi/qla4xxx/ql4_mbx.c struct scsi_cmnd *cmd = srb->cmd; srb 1193 drivers/scsi/qla4xxx/ql4_mbx.c mbox_cmd[1] = srb->ddb->fw_ddb_index; srb 4016 drivers/scsi/qla4xxx/ql4_os.c static struct srb* qla4xxx_get_new_srb(struct scsi_qla_host *ha, srb 4020 drivers/scsi/qla4xxx/ql4_os.c struct srb *srb; srb 4022 drivers/scsi/qla4xxx/ql4_os.c srb = mempool_alloc(ha->srb_mempool, GFP_ATOMIC); srb 4023 drivers/scsi/qla4xxx/ql4_os.c if (!srb) srb 4024 drivers/scsi/qla4xxx/ql4_os.c return srb; srb 4026 drivers/scsi/qla4xxx/ql4_os.c kref_init(&srb->srb_ref); srb 4027 drivers/scsi/qla4xxx/ql4_os.c srb->ha = ha; srb 4028 drivers/scsi/qla4xxx/ql4_os.c srb->ddb = ddb_entry; srb 4029 drivers/scsi/qla4xxx/ql4_os.c srb->cmd = cmd; srb 4030 drivers/scsi/qla4xxx/ql4_os.c srb->flags = 0; srb 4031 drivers/scsi/qla4xxx/ql4_os.c CMD_SP(cmd) = (void *)srb; srb 4033 drivers/scsi/qla4xxx/ql4_os.c return srb; srb 4036 drivers/scsi/qla4xxx/ql4_os.c static void qla4xxx_srb_free_dma(struct scsi_qla_host *ha, struct srb *srb) srb 4038 drivers/scsi/qla4xxx/ql4_os.c struct scsi_cmnd *cmd = srb->cmd; srb 4040 drivers/scsi/qla4xxx/ql4_os.c if (srb->flags & SRB_DMA_VALID) { srb 4042 drivers/scsi/qla4xxx/ql4_os.c srb->flags &= ~SRB_DMA_VALID; srb 4049 drivers/scsi/qla4xxx/ql4_os.c struct srb *srb = container_of(ref, struct srb, srb_ref); srb 4050 drivers/scsi/qla4xxx/ql4_os.c struct scsi_cmnd *cmd = srb->cmd; srb 4051 drivers/scsi/qla4xxx/ql4_os.c struct scsi_qla_host *ha = srb->ha; srb 4053 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_srb_free_dma(ha, srb); srb 4055 drivers/scsi/qla4xxx/ql4_os.c mempool_free(srb, ha->srb_mempool); srb 4078 drivers/scsi/qla4xxx/ql4_os.c struct srb *srb; srb 4113 drivers/scsi/qla4xxx/ql4_os.c srb = qla4xxx_get_new_srb(ha, ddb_entry, cmd); srb 4114 drivers/scsi/qla4xxx/ql4_os.c if (!srb) srb 4117 drivers/scsi/qla4xxx/ql4_os.c rval = qla4xxx_send_command_to_isp(ha, srb); srb 4124 drivers/scsi/qla4xxx/ql4_os.c qla4xxx_srb_free_dma(ha, srb); srb 4125 drivers/scsi/qla4xxx/ql4_os.c mempool_free(srb, ha->srb_mempool); srb 4774 drivers/scsi/qla4xxx/ql4_os.c struct srb *srb; srb 4780 drivers/scsi/qla4xxx/ql4_os.c srb = qla4xxx_del_from_active_array(ha, i); srb 4781 drivers/scsi/qla4xxx/ql4_os.c if (srb != NULL) { srb 4782 drivers/scsi/qla4xxx/ql4_os.c srb->cmd->result = res; srb 4783 drivers/scsi/qla4xxx/ql4_os.c kref_put(&srb->srb_ref, qla4xxx_srb_compl); srb 9060 drivers/scsi/qla4xxx/ql4_os.c struct srb *qla4xxx_del_from_active_array(struct scsi_qla_host *ha, srb 9063 drivers/scsi/qla4xxx/ql4_os.c struct srb *srb = NULL; srb 9068 drivers/scsi/qla4xxx/ql4_os.c return srb; srb 9070 drivers/scsi/qla4xxx/ql4_os.c srb = (struct srb *)CMD_SP(cmd); srb 9071 drivers/scsi/qla4xxx/ql4_os.c if (!srb) srb 9072 drivers/scsi/qla4xxx/ql4_os.c return srb; srb 9075 drivers/scsi/qla4xxx/ql4_os.c if (srb->flags & SRB_DMA_VALID) { srb 9076 drivers/scsi/qla4xxx/ql4_os.c ha->iocb_cnt -= srb->iocb_cnt; srb 9077 drivers/scsi/qla4xxx/ql4_os.c if (srb->cmd) srb 9078 drivers/scsi/qla4xxx/ql4_os.c srb->cmd->host_scribble = srb 9081 drivers/scsi/qla4xxx/ql4_os.c return srb; srb 9096 drivers/scsi/qla4xxx/ql4_os.c struct srb *rp; srb 9112 drivers/scsi/qla4xxx/ql4_os.c rp = (struct srb *) CMD_SP(cmd); srb 9191 drivers/scsi/qla4xxx/ql4_os.c struct srb *srb = NULL; srb 9206 drivers/scsi/qla4xxx/ql4_os.c srb = (struct srb *) CMD_SP(cmd); srb 9207 drivers/scsi/qla4xxx/ql4_os.c if (!srb) { srb 9213 drivers/scsi/qla4xxx/ql4_os.c kref_get(&srb->srb_ref); srb 9216 drivers/scsi/qla4xxx/ql4_os.c if (qla4xxx_abort_task(ha, srb) != QLA_SUCCESS) { srb 9226 drivers/scsi/qla4xxx/ql4_os.c kref_put(&srb->srb_ref, qla4xxx_srb_compl); srb 9883 drivers/scsi/qla4xxx/ql4_os.c srb_cachep = kmem_cache_create("qla4xxx_srbs", sizeof(struct srb), 0, srb 2609 drivers/staging/rts5208/ms.c static int mspro_rw_multi_sector(struct scsi_cmnd *srb, srb 2625 drivers/staging/rts5208/ms.c if (srb->sc_data_direction == DMA_FROM_DEVICE) { srb 2633 drivers/staging/rts5208/ms.c if (srb->sc_data_direction == DMA_FROM_DEVICE) { srb 2643 drivers/staging/rts5208/ms.c if (srb->sc_data_direction == DMA_FROM_DEVICE) { srb 2656 drivers/staging/rts5208/ms.c if (srb->sc_data_direction == DMA_FROM_DEVICE) srb 2666 drivers/staging/rts5208/ms.c if ((ms_card->pre_dir != srb->sc_data_direction) || srb 2711 drivers/staging/rts5208/ms.c WAIT_INT, mode_2k, scsi_sg_count(srb), srb 2712 drivers/staging/rts5208/ms.c scsi_sglist(srb), scsi_bufflen(srb)); srb 2740 drivers/staging/rts5208/ms.c ms_card->pre_dir = srb->sc_data_direction; srb 2878 drivers/staging/rts5208/ms.c int mspro_format(struct scsi_cmnd *srb, struct rtsx_chip *chip, srb 2947 drivers/staging/rts5208/ms.c set_sense_type(chip, SCSI_LUN(srb), SENSE_TYPE_NO_SENSE); srb 3092 drivers/staging/rts5208/ms.c scsi_sg_count(chip->srb), srb 3116 drivers/staging/rts5208/ms.c if (scsi_sg_count(chip->srb) == 0) srb 3261 drivers/staging/rts5208/ms.c scsi_sg_count(chip->srb), srb 3308 drivers/staging/rts5208/ms.c if (scsi_sg_count(chip->srb) == 0) srb 3383 drivers/staging/rts5208/ms.c static inline void ms_rw_fail(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 3385 drivers/staging/rts5208/ms.c if (srb->sc_data_direction == DMA_FROM_DEVICE) srb 3386 drivers/staging/rts5208/ms.c set_sense_type(chip, SCSI_LUN(srb), srb 3389 drivers/staging/rts5208/ms.c set_sense_type(chip, SCSI_LUN(srb), SENSE_TYPE_MEDIA_WRITE_ERR); srb 3392 drivers/staging/rts5208/ms.c static int ms_rw_multi_sector(struct scsi_cmnd *srb, struct rtsx_chip *chip, srb 3396 drivers/staging/rts5208/ms.c unsigned int lun = SCSI_LUN(srb); srb 3410 drivers/staging/rts5208/ms.c ptr = (u8 *)scsi_sglist(srb); srb 3414 drivers/staging/rts5208/ms.c ms_rw_fail(srb, chip); srb 3435 drivers/staging/rts5208/ms.c if (srb->sc_data_direction == DMA_TO_DEVICE) { srb 3531 drivers/staging/rts5208/ms.c if (srb->sc_data_direction == DMA_FROM_DEVICE) { srb 3550 drivers/staging/rts5208/ms.c ms_rw_fail(srb, chip); srb 3554 drivers/staging/rts5208/ms.c if (srb->sc_data_direction == DMA_TO_DEVICE) { srb 3567 drivers/staging/rts5208/ms.c if (scsi_sg_count(srb) == 0) srb 3594 drivers/staging/rts5208/ms.c ms_rw_fail(srb, chip); srb 3598 drivers/staging/rts5208/ms.c if (srb->sc_data_direction == DMA_TO_DEVICE) { srb 3601 drivers/staging/rts5208/ms.c ms_rw_fail(srb, chip); srb 3612 drivers/staging/rts5208/ms.c if (srb->sc_data_direction == DMA_TO_DEVICE) { srb 3632 drivers/staging/rts5208/ms.c ms_rw_fail(srb, chip); srb 3639 drivers/staging/rts5208/ms.c scsi_set_resid(srb, 0); srb 3644 drivers/staging/rts5208/ms.c int ms_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip, srb 3651 drivers/staging/rts5208/ms.c retval = mspro_rw_multi_sector(srb, chip, start_sector, srb 3654 drivers/staging/rts5208/ms.c retval = ms_rw_multi_sector(srb, chip, start_sector, srb 3799 drivers/staging/rts5208/ms.c int mg_set_leaf_id(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 3803 drivers/staging/rts5208/ms.c unsigned int lun = SCSI_LUN(srb); srb 3806 drivers/staging/rts5208/ms.c if (scsi_bufflen(srb) < 12) { srb 3824 drivers/staging/rts5208/ms.c rtsx_stor_get_xfer_buf(buf2, min_t(int, 12, scsi_bufflen(srb)), srb); srb 3843 drivers/staging/rts5208/ms.c int mg_get_local_EKB(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 3847 drivers/staging/rts5208/ms.c unsigned int lun = SCSI_LUN(srb); srb 3885 drivers/staging/rts5208/ms.c bufflen = min_t(int, 1052, scsi_bufflen(srb)); srb 3886 drivers/staging/rts5208/ms.c rtsx_stor_set_xfer_buf(buf, bufflen, srb); srb 3893 drivers/staging/rts5208/ms.c int mg_chg(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 3899 drivers/staging/rts5208/ms.c unsigned int lun = SCSI_LUN(srb); srb 3942 drivers/staging/rts5208/ms.c bufflen = min_t(int, 12, scsi_bufflen(srb)); srb 3943 drivers/staging/rts5208/ms.c rtsx_stor_get_xfer_buf(buf, bufflen, srb); srb 3968 drivers/staging/rts5208/ms.c int mg_get_rsp_chg(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 3973 drivers/staging/rts5208/ms.c unsigned int lun = SCSI_LUN(srb); srb 4008 drivers/staging/rts5208/ms.c bufflen = min_t(int, 36, scsi_bufflen(srb)); srb 4009 drivers/staging/rts5208/ms.c rtsx_stor_set_xfer_buf(buf2, bufflen, srb); srb 4022 drivers/staging/rts5208/ms.c int mg_rsp(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 4028 drivers/staging/rts5208/ms.c unsigned int lun = SCSI_LUN(srb); srb 4043 drivers/staging/rts5208/ms.c bufflen = min_t(int, 12, scsi_bufflen(srb)); srb 4044 drivers/staging/rts5208/ms.c rtsx_stor_get_xfer_buf(buf, bufflen, srb); srb 4069 drivers/staging/rts5208/ms.c int mg_get_ICV(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 4074 drivers/staging/rts5208/ms.c unsigned int lun = SCSI_LUN(srb); srb 4112 drivers/staging/rts5208/ms.c bufflen = min_t(int, 1028, scsi_bufflen(srb)); srb 4113 drivers/staging/rts5208/ms.c rtsx_stor_set_xfer_buf(buf, bufflen, srb); srb 4120 drivers/staging/rts5208/ms.c int mg_set_ICV(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 4128 drivers/staging/rts5208/ms.c unsigned int lun = SCSI_LUN(srb); srb 4141 drivers/staging/rts5208/ms.c bufflen = min_t(int, 1028, scsi_bufflen(srb)); srb 4142 drivers/staging/rts5208/ms.c rtsx_stor_get_xfer_buf(buf, bufflen, srb); srb 192 drivers/staging/rts5208/ms.h int ms_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip, srb 194 drivers/staging/rts5208/ms.h int mspro_format(struct scsi_cmnd *srb, struct rtsx_chip *chip, srb 205 drivers/staging/rts5208/ms.h int mg_set_leaf_id(struct scsi_cmnd *srb, struct rtsx_chip *chip); srb 206 drivers/staging/rts5208/ms.h int mg_get_local_EKB(struct scsi_cmnd *srb, struct rtsx_chip *chip); srb 207 drivers/staging/rts5208/ms.h int mg_chg(struct scsi_cmnd *srb, struct rtsx_chip *chip); srb 208 drivers/staging/rts5208/ms.h int mg_get_rsp_chg(struct scsi_cmnd *srb, struct rtsx_chip *chip); srb 209 drivers/staging/rts5208/ms.h int mg_rsp(struct scsi_cmnd *srb, struct rtsx_chip *chip); srb 210 drivers/staging/rts5208/ms.h int mg_get_ICV(struct scsi_cmnd *srb, struct rtsx_chip *chip); srb 211 drivers/staging/rts5208/ms.h int mg_set_ICV(struct scsi_cmnd *srb, struct rtsx_chip *chip); srb 121 drivers/staging/rts5208/rtsx.c static int queuecommand_lck(struct scsi_cmnd *srb, srb 124 drivers/staging/rts5208/rtsx.c struct rtsx_dev *dev = host_to_rtsx(srb->device->host); srb 128 drivers/staging/rts5208/rtsx.c if (chip->srb) { srb 130 drivers/staging/rts5208/rtsx.c chip->srb); srb 137 drivers/staging/rts5208/rtsx.c srb->result = DID_NO_CONNECT << 16; srb 138 drivers/staging/rts5208/rtsx.c done(srb); srb 143 drivers/staging/rts5208/rtsx.c srb->scsi_done = done; srb 144 drivers/staging/rts5208/rtsx.c chip->srb = srb; srb 157 drivers/staging/rts5208/rtsx.c static int command_abort(struct scsi_cmnd *srb) srb 159 drivers/staging/rts5208/rtsx.c struct Scsi_Host *host = srb->device->host; srb 168 drivers/staging/rts5208/rtsx.c if (chip->srb != srb) { srb 188 drivers/staging/rts5208/rtsx.c static int device_reset(struct scsi_cmnd *srb) srb 190 drivers/staging/rts5208/rtsx.c struct rtsx_dev *dev = host_to_rtsx(srb->device->host); srb 393 drivers/staging/rts5208/rtsx.c chip->srb->result = DID_ABORT << 16; srb 402 drivers/staging/rts5208/rtsx.c if (chip->srb->sc_data_direction == DMA_BIDIRECTIONAL) { srb 404 drivers/staging/rts5208/rtsx.c chip->srb->result = DID_ERROR << 16; srb 410 drivers/staging/rts5208/rtsx.c else if (chip->srb->device->id) { srb 412 drivers/staging/rts5208/rtsx.c chip->srb->device->id, srb 413 drivers/staging/rts5208/rtsx.c (u8)chip->srb->device->lun); srb 414 drivers/staging/rts5208/rtsx.c chip->srb->result = DID_BAD_TARGET << 16; srb 417 drivers/staging/rts5208/rtsx.c else if (chip->srb->device->lun > chip->max_lun) { srb 419 drivers/staging/rts5208/rtsx.c chip->srb->device->id, srb 420 drivers/staging/rts5208/rtsx.c (u8)chip->srb->device->lun); srb 421 drivers/staging/rts5208/rtsx.c chip->srb->result = DID_BAD_TARGET << 16; srb 427 drivers/staging/rts5208/rtsx.c rtsx_invoke_transport(chip->srb, chip); srb 434 drivers/staging/rts5208/rtsx.c if (!chip->srb) srb 438 drivers/staging/rts5208/rtsx.c else if (chip->srb->result != DID_ABORT << 16) { srb 439 drivers/staging/rts5208/rtsx.c chip->srb->scsi_done(chip->srb); srb 452 drivers/staging/rts5208/rtsx.c chip->srb = NULL; srb 648 drivers/staging/rts5208/rtsx.c if (chip->srb) { srb 649 drivers/staging/rts5208/rtsx.c chip->srb->result = DID_NO_CONNECT << 16; srb 651 drivers/staging/rts5208/rtsx.c chip->srb->scsi_done(dev->chip->srb); srb 652 drivers/staging/rts5208/rtsx.c chip->srb = NULL; srb 77 drivers/staging/rts5208/rtsx.h #define SCSI_LUN(srb) ((srb)->device->lun) srb 938 drivers/staging/rts5208/rtsx_card.c int card_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip, srb 942 drivers/staging/rts5208/rtsx_card.c unsigned int lun = SCSI_LUN(srb); srb 951 drivers/staging/rts5208/rtsx_card.c retval = chip->rw_card[lun](srb, chip, sec_addr, sec_cnt); srb 1001 drivers/staging/rts5208/rtsx_card.h int card_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip, srb 340 drivers/staging/rts5208/rtsx_chip.h typedef int (*card_rw_func)(struct scsi_cmnd *srb, struct rtsx_chip *chip, srb 708 drivers/staging/rts5208/rtsx_chip.h struct scsi_cmnd *srb; /* current srb */ srb 24 drivers/staging/rts5208/rtsx_scsi.c struct scsi_cmnd *srb = chip->srb; srb 29 drivers/staging/rts5208/rtsx_scsi.c switch (srb->cmnd[0]) { srb 303 drivers/staging/rts5208/rtsx_scsi.c if (srb->cmnd[0] != TEST_UNIT_READY) srb 305 drivers/staging/rts5208/rtsx_scsi.c what, srb->cmd_len); srb 308 drivers/staging/rts5208/rtsx_scsi.c len = min_t(unsigned short, srb->cmd_len, 16); srb 309 drivers/staging/rts5208/rtsx_scsi.c dev_dbg(rtsx_dev(chip), "%*ph\n", len, srb->cmnd); srb 411 drivers/staging/rts5208/rtsx_scsi.c static int test_unit_ready(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 413 drivers/staging/rts5208/rtsx_scsi.c unsigned int lun = SCSI_LUN(srb); srb 427 drivers/staging/rts5208/rtsx_scsi.c if (get_lun_card(chip, SCSI_LUN(srb)) == SD_CARD) { srb 463 drivers/staging/rts5208/rtsx_scsi.c static int inquiry(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 465 drivers/staging/rts5208/rtsx_scsi.c unsigned int lun = SCSI_LUN(srb); srb 498 drivers/staging/rts5208/rtsx_scsi.c buf = vmalloc(scsi_bufflen(srb)); srb 512 drivers/staging/rts5208/rtsx_scsi.c if (scsi_bufflen(srb) < 56) srb 513 drivers/staging/rts5208/rtsx_scsi.c sendbytes = (unsigned char)(scsi_bufflen(srb)); srb 518 drivers/staging/rts5208/rtsx_scsi.c if (scsi_bufflen(srb) < 36) srb 519 drivers/staging/rts5208/rtsx_scsi.c sendbytes = (unsigned char)(scsi_bufflen(srb)); srb 540 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, 0); srb 542 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_set_xfer_buf(buf, scsi_bufflen(srb), srb); srb 548 drivers/staging/rts5208/rtsx_scsi.c static int start_stop_unit(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 550 drivers/staging/rts5208/rtsx_scsi.c unsigned int lun = SCSI_LUN(srb); srb 552 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, scsi_bufflen(srb)); srb 554 drivers/staging/rts5208/rtsx_scsi.c if (srb->cmnd[1] == 1) srb 557 drivers/staging/rts5208/rtsx_scsi.c switch (srb->cmnd[0x4]) { srb 581 drivers/staging/rts5208/rtsx_scsi.c static int allow_medium_removal(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 585 drivers/staging/rts5208/rtsx_scsi.c prevent = srb->cmnd[4] & 0x1; srb 587 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, 0); srb 590 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 598 drivers/staging/rts5208/rtsx_scsi.c static int request_sense(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 601 drivers/staging/rts5208/rtsx_scsi.c unsigned int lun = SCSI_LUN(srb); srb 627 drivers/staging/rts5208/rtsx_scsi.c buf = vmalloc(scsi_bufflen(srb)); srb 632 drivers/staging/rts5208/rtsx_scsi.c memcpy(buf, tmp, scsi_bufflen(srb)); srb 634 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_set_xfer_buf(buf, scsi_bufflen(srb), srb); srb 637 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, 0); srb 736 drivers/staging/rts5208/rtsx_scsi.c static int mode_sense(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 738 drivers/staging/rts5208/rtsx_scsi.c unsigned int lun = SCSI_LUN(srb); srb 748 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, scsi_bufflen(srb)); srb 776 drivers/staging/rts5208/rtsx_scsi.c page_code = srb->cmnd[2] & 0x3f; srb 781 drivers/staging/rts5208/rtsx_scsi.c if (srb->cmnd[0] == MODE_SENSE) { srb 783 drivers/staging/rts5208/rtsx_scsi.c ms_mode_sense(chip, srb->cmnd[0], srb 798 drivers/staging/rts5208/rtsx_scsi.c ms_mode_sense(chip, srb->cmnd[0], srb 818 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, scsi_bufflen(srb)); srb 823 drivers/staging/rts5208/rtsx_scsi.c unsigned int len = min_t(unsigned int, scsi_bufflen(srb), srb 825 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_set_xfer_buf(buf, len, srb); srb 826 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, scsi_bufflen(srb) - len); srb 833 drivers/staging/rts5208/rtsx_scsi.c static int read_write(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 838 drivers/staging/rts5208/rtsx_scsi.c unsigned int lun = SCSI_LUN(srb); srb 882 drivers/staging/rts5208/rtsx_scsi.c if ((srb->cmnd[0] == READ_10) || (srb->cmnd[0] == WRITE_10)) { srb 883 drivers/staging/rts5208/rtsx_scsi.c start_sec = ((u32)srb->cmnd[2] << 24) | srb 884 drivers/staging/rts5208/rtsx_scsi.c ((u32)srb->cmnd[3] << 16) | srb 885 drivers/staging/rts5208/rtsx_scsi.c ((u32)srb->cmnd[4] << 8) | ((u32)srb->cmnd[5]); srb 886 drivers/staging/rts5208/rtsx_scsi.c sec_cnt = ((u16)(srb->cmnd[7]) << 8) | srb->cmnd[8]; srb 887 drivers/staging/rts5208/rtsx_scsi.c } else if ((srb->cmnd[0] == READ_6) || (srb->cmnd[0] == WRITE_6)) { srb 888 drivers/staging/rts5208/rtsx_scsi.c start_sec = ((u32)(srb->cmnd[1] & 0x1F) << 16) | srb 889 drivers/staging/rts5208/rtsx_scsi.c ((u32)srb->cmnd[2] << 8) | ((u32)srb->cmnd[3]); srb 890 drivers/staging/rts5208/rtsx_scsi.c sec_cnt = srb->cmnd[4]; srb 893 drivers/staging/rts5208/rtsx_scsi.c } else if ((srb->cmnd[0] == VENDOR_CMND) && srb 894 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[1] == SCSI_APP_CMD) && srb 895 drivers/staging/rts5208/rtsx_scsi.c ((srb->cmnd[2] == PP_READ10) || (srb->cmnd[2] == PP_WRITE10))) { srb 896 drivers/staging/rts5208/rtsx_scsi.c start_sec = ((u32)srb->cmnd[4] << 24) | srb 897 drivers/staging/rts5208/rtsx_scsi.c ((u32)srb->cmnd[5] << 16) | srb 898 drivers/staging/rts5208/rtsx_scsi.c ((u32)srb->cmnd[6] << 8) | ((u32)srb->cmnd[7]); srb 899 drivers/staging/rts5208/rtsx_scsi.c sec_cnt = ((u16)(srb->cmnd[9]) << 8) | srb->cmnd[10]; srb 916 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, 0); srb 922 drivers/staging/rts5208/rtsx_scsi.c if (srb->sc_data_direction == DMA_FROM_DEVICE) srb 931 drivers/staging/rts5208/rtsx_scsi.c if (srb->sc_data_direction == DMA_TO_DEVICE) { srb 940 drivers/staging/rts5208/rtsx_scsi.c retval = card_rw(srb, chip, start_sec, sec_cnt); srb 947 drivers/staging/rts5208/rtsx_scsi.c if (srb->sc_data_direction == DMA_FROM_DEVICE) srb 962 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, 0); srb 968 drivers/staging/rts5208/rtsx_scsi.c static int read_format_capacity(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 971 drivers/staging/rts5208/rtsx_scsi.c unsigned int lun = SCSI_LUN(srb); srb 985 drivers/staging/rts5208/rtsx_scsi.c buf_len = (scsi_bufflen(srb) > 12) ? 0x14 : 12; srb 1037 drivers/staging/rts5208/rtsx_scsi.c buf_len = min_t(unsigned int, scsi_bufflen(srb), buf_len); srb 1038 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_set_xfer_buf(buf, buf_len, srb); srb 1041 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, scsi_bufflen(srb) - buf_len); srb 1046 drivers/staging/rts5208/rtsx_scsi.c static int read_capacity(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 1049 drivers/staging/rts5208/rtsx_scsi.c unsigned int lun = SCSI_LUN(srb); srb 1078 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_set_xfer_buf(buf, scsi_bufflen(srb), srb); srb 1081 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, 0); srb 1086 drivers/staging/rts5208/rtsx_scsi.c static int read_eeprom(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 1100 drivers/staging/rts5208/rtsx_scsi.c len = ((u16)srb->cmnd[4] << 8) | srb->cmnd[5]; srb 1109 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 1118 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 1124 drivers/staging/rts5208/rtsx_scsi.c len = (unsigned short)min_t(unsigned int, scsi_bufflen(srb), len); srb 1125 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_set_xfer_buf(buf, len, srb); srb 1126 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, scsi_bufflen(srb) - len); srb 1133 drivers/staging/rts5208/rtsx_scsi.c static int write_eeprom(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 1147 drivers/staging/rts5208/rtsx_scsi.c len = ((u16)srb->cmnd[4] << 8) | srb->cmnd[5]; srb 1151 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), SENSE_TYPE_MEDIA_WRITE_ERR); srb 1158 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 1163 drivers/staging/rts5208/rtsx_scsi.c len = (unsigned short)min_t(unsigned int, scsi_bufflen(srb), srb 1169 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_get_xfer_buf(buf, len, srb); srb 1170 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, scsi_bufflen(srb) - len); srb 1176 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 1188 drivers/staging/rts5208/rtsx_scsi.c static int read_mem(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 1202 drivers/staging/rts5208/rtsx_scsi.c addr = ((u16)srb->cmnd[2] << 8) | srb->cmnd[3]; srb 1203 drivers/staging/rts5208/rtsx_scsi.c len = ((u16)srb->cmnd[4] << 8) | srb->cmnd[5]; srb 1206 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 1218 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), SENSE_TYPE_MEDIA_WRITE_ERR); srb 1226 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 1232 drivers/staging/rts5208/rtsx_scsi.c len = (unsigned short)min_t(unsigned int, scsi_bufflen(srb), len); srb 1233 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_set_xfer_buf(buf, len, srb); srb 1234 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, scsi_bufflen(srb) - len); srb 1241 drivers/staging/rts5208/rtsx_scsi.c static int write_mem(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 1255 drivers/staging/rts5208/rtsx_scsi.c addr = ((u16)srb->cmnd[2] << 8) | srb->cmnd[3]; srb 1256 drivers/staging/rts5208/rtsx_scsi.c len = ((u16)srb->cmnd[4] << 8) | srb->cmnd[5]; srb 1259 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 1264 drivers/staging/rts5208/rtsx_scsi.c len = (unsigned short)min_t(unsigned int, scsi_bufflen(srb), len); srb 1269 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_get_xfer_buf(buf, len, srb); srb 1270 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, scsi_bufflen(srb) - len); srb 1275 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), SENSE_TYPE_MEDIA_WRITE_ERR); srb 1283 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 1294 drivers/staging/rts5208/rtsx_scsi.c static int get_sd_csd(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 1297 drivers/staging/rts5208/rtsx_scsi.c unsigned int lun = SCSI_LUN(srb); srb 1309 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, 0); srb 1310 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_set_xfer_buf(sd_card->raw_csd, scsi_bufflen(srb), srb); srb 1315 drivers/staging/rts5208/rtsx_scsi.c static int toggle_gpio_cmd(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 1317 drivers/staging/rts5208/rtsx_scsi.c u8 gpio = srb->cmnd[2]; srb 1334 drivers/staging/rts5208/rtsx_scsi.c static int read_host_reg(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 1348 drivers/staging/rts5208/rtsx_scsi.c addr = srb->cmnd[4]; srb 1358 drivers/staging/rts5208/rtsx_scsi.c len = min_t(unsigned int, scsi_bufflen(srb), 4); srb 1359 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_set_xfer_buf(buf, len, srb); srb 1360 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, scsi_bufflen(srb) - len); srb 1365 drivers/staging/rts5208/rtsx_scsi.c static int write_host_reg(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 1379 drivers/staging/rts5208/rtsx_scsi.c addr = srb->cmnd[4]; srb 1381 drivers/staging/rts5208/rtsx_scsi.c len = min_t(unsigned int, scsi_bufflen(srb), 4); srb 1382 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_get_xfer_buf(buf, len, srb); srb 1383 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, scsi_bufflen(srb) - len); srb 1393 drivers/staging/rts5208/rtsx_scsi.c static int set_variable(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 1395 drivers/staging/rts5208/rtsx_scsi.c unsigned int lun = SCSI_LUN(srb); srb 1397 drivers/staging/rts5208/rtsx_scsi.c if (srb->cmnd[3] == 1) { srb 1403 drivers/staging/rts5208/rtsx_scsi.c switch (srb->cmnd[4]) { srb 1405 drivers/staging/rts5208/rtsx_scsi.c xd_card->xd_clock = srb->cmnd[5]; srb 1409 drivers/staging/rts5208/rtsx_scsi.c sd_card->sd_clock = srb->cmnd[5]; srb 1413 drivers/staging/rts5208/rtsx_scsi.c ms_card->ms_clock = srb->cmnd[5]; srb 1421 drivers/staging/rts5208/rtsx_scsi.c } else if (srb->cmnd[3] == 2) { srb 1422 drivers/staging/rts5208/rtsx_scsi.c if (srb->cmnd[4]) { srb 1440 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 1455 drivers/staging/rts5208/rtsx_scsi.c static int get_variable(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 1457 drivers/staging/rts5208/rtsx_scsi.c unsigned int lun = SCSI_LUN(srb); srb 1459 drivers/staging/rts5208/rtsx_scsi.c if (srb->cmnd[3] == 1) { srb 1465 drivers/staging/rts5208/rtsx_scsi.c switch (srb->cmnd[4]) { srb 1484 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_set_xfer_buf(&tmp, 1, srb); srb 1485 drivers/staging/rts5208/rtsx_scsi.c } else if (srb->cmnd[3] == 2) { srb 1488 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_set_xfer_buf(&tmp, 1, srb); srb 1497 drivers/staging/rts5208/rtsx_scsi.c static int dma_access_ring_buffer(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 1500 drivers/staging/rts5208/rtsx_scsi.c unsigned int lun = SCSI_LUN(srb); srb 1511 drivers/staging/rts5208/rtsx_scsi.c len = ((u16)(srb->cmnd[4]) << 8) | srb->cmnd[5]; srb 1512 drivers/staging/rts5208/rtsx_scsi.c len = min_t(u16, len, scsi_bufflen(srb)); srb 1514 drivers/staging/rts5208/rtsx_scsi.c if (srb->sc_data_direction == DMA_FROM_DEVICE) srb 1519 drivers/staging/rts5208/rtsx_scsi.c retval = rtsx_transfer_data(chip, 0, scsi_sglist(srb), len, srb 1520 drivers/staging/rts5208/rtsx_scsi.c scsi_sg_count(srb), srb->sc_data_direction, srb 1523 drivers/staging/rts5208/rtsx_scsi.c if (srb->sc_data_direction == DMA_FROM_DEVICE) srb 1532 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, 0); srb 1537 drivers/staging/rts5208/rtsx_scsi.c static int get_dev_status(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 1542 drivers/staging/rts5208/rtsx_scsi.c unsigned int lun = SCSI_LUN(srb); srb 1661 drivers/staging/rts5208/rtsx_scsi.c buf_len = min_t(unsigned int, scsi_bufflen(srb), sizeof(status)); srb 1662 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_set_xfer_buf(status, buf_len, srb); srb 1663 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, scsi_bufflen(srb) - buf_len); srb 1668 drivers/staging/rts5208/rtsx_scsi.c static int set_chip_mode(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 1675 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 1680 drivers/staging/rts5208/rtsx_scsi.c phy_debug_mode = (int)(srb->cmnd[3]); srb 1719 drivers/staging/rts5208/rtsx_scsi.c static int rw_mem_cmd_buf(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 1722 drivers/staging/rts5208/rtsx_scsi.c unsigned int lun = SCSI_LUN(srb); srb 1734 drivers/staging/rts5208/rtsx_scsi.c switch (srb->cmnd[3]) { srb 1740 drivers/staging/rts5208/rtsx_scsi.c cmd_type = srb->cmnd[4]; srb 1746 drivers/staging/rts5208/rtsx_scsi.c addr = (srb->cmnd[5] << 8) | srb->cmnd[6]; srb 1747 drivers/staging/rts5208/rtsx_scsi.c mask = srb->cmnd[7]; srb 1748 drivers/staging/rts5208/rtsx_scsi.c value = srb->cmnd[8]; srb 1757 drivers/staging/rts5208/rtsx_scsi.c idx = srb->cmnd[4]; srb 1759 drivers/staging/rts5208/rtsx_scsi.c if (scsi_bufflen(srb) < 1) { srb 1764 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_set_xfer_buf(&value, 1, srb); srb 1765 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, 0); srb 1781 drivers/staging/rts5208/rtsx_scsi.c static int suit_cmd(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 1783 drivers/staging/rts5208/rtsx_scsi.c switch (srb->cmnd[3]) { srb 1788 drivers/staging/rts5208/rtsx_scsi.c return rw_mem_cmd_buf(srb, chip); srb 1794 drivers/staging/rts5208/rtsx_scsi.c static int read_phy_register(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 1809 drivers/staging/rts5208/rtsx_scsi.c addr = ((u16)srb->cmnd[4] << 8) | srb->cmnd[5]; srb 1810 drivers/staging/rts5208/rtsx_scsi.c len = ((u16)srb->cmnd[6] << 8) | srb->cmnd[7]; srb 1823 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 1833 drivers/staging/rts5208/rtsx_scsi.c (chip, SCSI_LUN(srb), srb 1842 drivers/staging/rts5208/rtsx_scsi.c len = (unsigned short)min_t(unsigned int, scsi_bufflen(srb), srb 1844 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_set_xfer_buf(buf, len, srb); srb 1845 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, scsi_bufflen(srb) - len); srb 1853 drivers/staging/rts5208/rtsx_scsi.c static int write_phy_register(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 1868 drivers/staging/rts5208/rtsx_scsi.c addr = ((u16)srb->cmnd[4] << 8) | srb->cmnd[5]; srb 1869 drivers/staging/rts5208/rtsx_scsi.c len = ((u16)srb->cmnd[6] << 8) | srb->cmnd[7]; srb 1875 drivers/staging/rts5208/rtsx_scsi.c len = (unsigned short)min_t(unsigned int, scsi_bufflen(srb), srb 1882 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_get_xfer_buf(buf, len, srb); srb 1883 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, scsi_bufflen(srb) - len); srb 1888 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 1898 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 1910 drivers/staging/rts5208/rtsx_scsi.c static int erase_eeprom2(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 1926 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), SENSE_TYPE_MEDIA_WRITE_ERR); srb 1930 drivers/staging/rts5208/rtsx_scsi.c mode = srb->cmnd[3]; srb 1931 drivers/staging/rts5208/rtsx_scsi.c addr = ((u16)srb->cmnd[4] << 8) | srb->cmnd[5]; srb 1936 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 1943 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 1948 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 1956 drivers/staging/rts5208/rtsx_scsi.c static int read_eeprom2(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 1970 drivers/staging/rts5208/rtsx_scsi.c addr = ((u16)srb->cmnd[4] << 8) | srb->cmnd[5]; srb 1971 drivers/staging/rts5208/rtsx_scsi.c len = ((u16)srb->cmnd[6] << 8) | srb->cmnd[7]; srb 1980 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 1989 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 1995 drivers/staging/rts5208/rtsx_scsi.c len = (unsigned short)min_t(unsigned int, scsi_bufflen(srb), len); srb 1996 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_set_xfer_buf(buf, len, srb); srb 1997 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, scsi_bufflen(srb) - len); srb 2004 drivers/staging/rts5208/rtsx_scsi.c static int write_eeprom2(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 2018 drivers/staging/rts5208/rtsx_scsi.c addr = ((u16)srb->cmnd[4] << 8) | srb->cmnd[5]; srb 2019 drivers/staging/rts5208/rtsx_scsi.c len = ((u16)srb->cmnd[6] << 8) | srb->cmnd[7]; srb 2021 drivers/staging/rts5208/rtsx_scsi.c len = (unsigned short)min_t(unsigned int, scsi_bufflen(srb), len); srb 2026 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_get_xfer_buf(buf, len, srb); srb 2027 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, scsi_bufflen(srb) - len); srb 2032 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), SENSE_TYPE_MEDIA_WRITE_ERR); srb 2040 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 2051 drivers/staging/rts5208/rtsx_scsi.c static int read_efuse(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 2065 drivers/staging/rts5208/rtsx_scsi.c addr = srb->cmnd[4]; srb 2066 drivers/staging/rts5208/rtsx_scsi.c len = srb->cmnd[5]; srb 2075 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 2084 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 2090 drivers/staging/rts5208/rtsx_scsi.c len = (u8)min_t(unsigned int, scsi_bufflen(srb), len); srb 2091 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_set_xfer_buf(buf, len, srb); srb 2092 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, scsi_bufflen(srb) - len); srb 2099 drivers/staging/rts5208/rtsx_scsi.c static int write_efuse(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 2114 drivers/staging/rts5208/rtsx_scsi.c addr = srb->cmnd[4]; srb 2115 drivers/staging/rts5208/rtsx_scsi.c len = srb->cmnd[5]; srb 2117 drivers/staging/rts5208/rtsx_scsi.c len = (u8)min_t(unsigned int, scsi_bufflen(srb), len); srb 2122 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_get_xfer_buf(buf, len, srb); srb 2123 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, scsi_bufflen(srb) - len); srb 2175 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 2210 drivers/staging/rts5208/rtsx_scsi.c static int read_cfg_byte(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 2226 drivers/staging/rts5208/rtsx_scsi.c func = srb->cmnd[3]; srb 2227 drivers/staging/rts5208/rtsx_scsi.c addr = ((u16)(srb->cmnd[4]) << 8) | srb->cmnd[5]; srb 2228 drivers/staging/rts5208/rtsx_scsi.c len = ((u16)(srb->cmnd[6]) << 8) | srb->cmnd[7]; srb 2239 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 2250 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 2256 drivers/staging/rts5208/rtsx_scsi.c len = (u16)min_t(unsigned int, scsi_bufflen(srb), len); srb 2257 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_set_xfer_buf(buf, len, srb); srb 2258 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, scsi_bufflen(srb) - len); srb 2265 drivers/staging/rts5208/rtsx_scsi.c static int write_cfg_byte(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 2281 drivers/staging/rts5208/rtsx_scsi.c func = srb->cmnd[3]; srb 2282 drivers/staging/rts5208/rtsx_scsi.c addr = ((u16)(srb->cmnd[4]) << 8) | srb->cmnd[5]; srb 2283 drivers/staging/rts5208/rtsx_scsi.c len = ((u16)(srb->cmnd[6]) << 8) | srb->cmnd[7]; srb 2294 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 2299 drivers/staging/rts5208/rtsx_scsi.c len = (unsigned short)min_t(unsigned int, scsi_bufflen(srb), len); srb 2304 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_get_xfer_buf(buf, len, srb); srb 2305 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, scsi_bufflen(srb) - len); srb 2309 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), SENSE_TYPE_MEDIA_WRITE_ERR); srb 2319 drivers/staging/rts5208/rtsx_scsi.c static int app_cmd(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 2323 drivers/staging/rts5208/rtsx_scsi.c switch (srb->cmnd[2]) { srb 2326 drivers/staging/rts5208/rtsx_scsi.c result = read_write(srb, chip); srb 2330 drivers/staging/rts5208/rtsx_scsi.c result = read_host_reg(srb, chip); srb 2334 drivers/staging/rts5208/rtsx_scsi.c result = write_host_reg(srb, chip); srb 2338 drivers/staging/rts5208/rtsx_scsi.c result = get_variable(srb, chip); srb 2342 drivers/staging/rts5208/rtsx_scsi.c result = set_variable(srb, chip); srb 2347 drivers/staging/rts5208/rtsx_scsi.c result = dma_access_ring_buffer(srb, chip); srb 2351 drivers/staging/rts5208/rtsx_scsi.c result = read_phy_register(srb, chip); srb 2355 drivers/staging/rts5208/rtsx_scsi.c result = write_phy_register(srb, chip); srb 2359 drivers/staging/rts5208/rtsx_scsi.c result = erase_eeprom2(srb, chip); srb 2363 drivers/staging/rts5208/rtsx_scsi.c result = read_eeprom2(srb, chip); srb 2367 drivers/staging/rts5208/rtsx_scsi.c result = write_eeprom2(srb, chip); srb 2371 drivers/staging/rts5208/rtsx_scsi.c result = read_efuse(srb, chip); srb 2375 drivers/staging/rts5208/rtsx_scsi.c result = write_efuse(srb, chip); srb 2379 drivers/staging/rts5208/rtsx_scsi.c result = read_cfg_byte(srb, chip); srb 2383 drivers/staging/rts5208/rtsx_scsi.c result = write_cfg_byte(srb, chip); srb 2387 drivers/staging/rts5208/rtsx_scsi.c result = set_chip_mode(srb, chip); srb 2391 drivers/staging/rts5208/rtsx_scsi.c result = suit_cmd(srb, chip); srb 2395 drivers/staging/rts5208/rtsx_scsi.c result = get_dev_status(srb, chip); srb 2399 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 2407 drivers/staging/rts5208/rtsx_scsi.c static int read_status(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 2411 drivers/staging/rts5208/rtsx_scsi.c unsigned int lun = SCSI_LUN(srb); srb 2529 drivers/staging/rts5208/rtsx_scsi.c buf_len = min_t(unsigned int, scsi_bufflen(srb), sizeof(rtsx_status)); srb 2530 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_set_xfer_buf(rtsx_status, buf_len, srb); srb 2531 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, scsi_bufflen(srb) - buf_len); srb 2536 drivers/staging/rts5208/rtsx_scsi.c static int get_card_bus_width(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 2538 drivers/staging/rts5208/rtsx_scsi.c unsigned int lun = SCSI_LUN(srb); srb 2554 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, 0); srb 2555 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_set_xfer_buf(&bus_width, scsi_bufflen(srb), srb); srb 2560 drivers/staging/rts5208/rtsx_scsi.c static int spi_vendor_cmd(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 2563 drivers/staging/rts5208/rtsx_scsi.c unsigned int lun = SCSI_LUN(srb); srb 2584 drivers/staging/rts5208/rtsx_scsi.c switch (srb->cmnd[2]) { srb 2586 drivers/staging/rts5208/rtsx_scsi.c result = spi_get_status(srb, chip); srb 2590 drivers/staging/rts5208/rtsx_scsi.c result = spi_set_parameter(srb, chip); srb 2594 drivers/staging/rts5208/rtsx_scsi.c result = spi_read_flash_id(srb, chip); srb 2598 drivers/staging/rts5208/rtsx_scsi.c result = spi_read_flash(srb, chip); srb 2602 drivers/staging/rts5208/rtsx_scsi.c result = spi_write_flash(srb, chip); srb 2606 drivers/staging/rts5208/rtsx_scsi.c result = spi_write_flash_status(srb, chip); srb 2610 drivers/staging/rts5208/rtsx_scsi.c result = spi_erase_flash(srb, chip); srb 2628 drivers/staging/rts5208/rtsx_scsi.c static int vendor_cmnd(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 2632 drivers/staging/rts5208/rtsx_scsi.c switch (srb->cmnd[1]) { srb 2634 drivers/staging/rts5208/rtsx_scsi.c result = read_status(srb, chip); srb 2638 drivers/staging/rts5208/rtsx_scsi.c result = read_mem(srb, chip); srb 2642 drivers/staging/rts5208/rtsx_scsi.c result = write_mem(srb, chip); srb 2646 drivers/staging/rts5208/rtsx_scsi.c result = read_eeprom(srb, chip); srb 2650 drivers/staging/rts5208/rtsx_scsi.c result = write_eeprom(srb, chip); srb 2654 drivers/staging/rts5208/rtsx_scsi.c result = toggle_gpio_cmd(srb, chip); srb 2658 drivers/staging/rts5208/rtsx_scsi.c result = get_sd_csd(srb, chip); srb 2662 drivers/staging/rts5208/rtsx_scsi.c result = get_card_bus_width(srb, chip); srb 2666 drivers/staging/rts5208/rtsx_scsi.c result = app_cmd(srb, chip); srb 2670 drivers/staging/rts5208/rtsx_scsi.c result = spi_vendor_cmd(srb, chip); srb 2674 drivers/staging/rts5208/rtsx_scsi.c set_sense_type(chip, SCSI_LUN(srb), srb 2683 drivers/staging/rts5208/rtsx_scsi.c void led_shine(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 2685 drivers/staging/rts5208/rtsx_scsi.c unsigned int lun = SCSI_LUN(srb); srb 2688 drivers/staging/rts5208/rtsx_scsi.c if ((srb->cmnd[0] == READ_10) || (srb->cmnd[0] == WRITE_10)) { srb 2689 drivers/staging/rts5208/rtsx_scsi.c sec_cnt = ((u16)(srb->cmnd[7]) << 8) | srb->cmnd[8]; srb 2690 drivers/staging/rts5208/rtsx_scsi.c } else if ((srb->cmnd[0] == READ_6) || (srb->cmnd[0] == WRITE_6)) { srb 2691 drivers/staging/rts5208/rtsx_scsi.c sec_cnt = srb->cmnd[4]; srb 2707 drivers/staging/rts5208/rtsx_scsi.c static int ms_format_cmnd(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 2710 drivers/staging/rts5208/rtsx_scsi.c unsigned int lun = SCSI_LUN(srb); srb 2719 drivers/staging/rts5208/rtsx_scsi.c if ((srb->cmnd[3] != 0x4D) || (srb->cmnd[4] != 0x47) || srb 2720 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[5] != 0x66) || (srb->cmnd[6] != 0x6D) || srb 2721 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[7] != 0x74)) { srb 2740 drivers/staging/rts5208/rtsx_scsi.c if (srb->cmnd[8] & 0x01) srb 2760 drivers/staging/rts5208/rtsx_scsi.c retval = mspro_format(srb, chip, MS_SHORT_DATA_LEN, quick_format); srb 2766 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, 0); srb 2771 drivers/staging/rts5208/rtsx_scsi.c static int get_ms_information(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 2774 drivers/staging/rts5208/rtsx_scsi.c unsigned int lun = SCSI_LUN(srb); srb 2789 drivers/staging/rts5208/rtsx_scsi.c if ((srb->cmnd[2] != 0xB0) || (srb->cmnd[4] != 0x4D) || srb 2790 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[5] != 0x53) || (srb->cmnd[6] != 0x49) || srb 2791 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[7] != 0x44)) { srb 2796 drivers/staging/rts5208/rtsx_scsi.c dev_info_id = srb->cmnd[3]; srb 2857 drivers/staging/rts5208/rtsx_scsi.c rtsx_stor_set_xfer_buf(buf, buf_len, srb); srb 2860 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, scsi_bufflen(srb) - 0x3C); srb 2862 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, scsi_bufflen(srb) - 0x6C); srb 2869 drivers/staging/rts5208/rtsx_scsi.c static int ms_sp_cmnd(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 2873 drivers/staging/rts5208/rtsx_scsi.c if (srb->cmnd[2] == MS_FORMAT) srb 2874 drivers/staging/rts5208/rtsx_scsi.c retval = ms_format_cmnd(srb, chip); srb 2876 drivers/staging/rts5208/rtsx_scsi.c else if (srb->cmnd[2] == GET_MS_INFORMATION) srb 2877 drivers/staging/rts5208/rtsx_scsi.c retval = get_ms_information(srb, chip); srb 2884 drivers/staging/rts5208/rtsx_scsi.c static int sd_extension_cmnd(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 2886 drivers/staging/rts5208/rtsx_scsi.c unsigned int lun = SCSI_LUN(srb); srb 2908 drivers/staging/rts5208/rtsx_scsi.c switch (srb->cmnd[0]) { srb 2910 drivers/staging/rts5208/rtsx_scsi.c result = sd_pass_thru_mode(srb, chip); srb 2914 drivers/staging/rts5208/rtsx_scsi.c result = sd_execute_no_data(srb, chip); srb 2918 drivers/staging/rts5208/rtsx_scsi.c result = sd_execute_read_data(srb, chip); srb 2922 drivers/staging/rts5208/rtsx_scsi.c result = sd_execute_write_data(srb, chip); srb 2926 drivers/staging/rts5208/rtsx_scsi.c result = sd_get_cmd_rsp(srb, chip); srb 2930 drivers/staging/rts5208/rtsx_scsi.c result = sd_hw_rst(srb, chip); srb 2943 drivers/staging/rts5208/rtsx_scsi.c static int mg_report_key(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 2946 drivers/staging/rts5208/rtsx_scsi.c unsigned int lun = SCSI_LUN(srb); srb 2969 drivers/staging/rts5208/rtsx_scsi.c if (srb->cmnd[7] != KC_MG_R_PRO) { srb 2979 drivers/staging/rts5208/rtsx_scsi.c key_format = srb->cmnd[10] & 0x3F; srb 2984 drivers/staging/rts5208/rtsx_scsi.c if ((scsi_bufflen(srb) == 0x41C) && srb 2985 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[8] == 0x04) && srb 2986 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[9] == 0x1C)) { srb 2987 drivers/staging/rts5208/rtsx_scsi.c retval = mg_get_local_EKB(srb, chip); srb 2999 drivers/staging/rts5208/rtsx_scsi.c if ((scsi_bufflen(srb) == 0x24) && srb 3000 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[8] == 0x00) && srb 3001 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[9] == 0x24)) { srb 3002 drivers/staging/rts5208/rtsx_scsi.c retval = mg_get_rsp_chg(srb, chip); srb 3014 drivers/staging/rts5208/rtsx_scsi.c ms_card->mg_entry_num = srb->cmnd[5]; srb 3015 drivers/staging/rts5208/rtsx_scsi.c if ((scsi_bufflen(srb) == 0x404) && srb 3016 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[8] == 0x04) && srb 3017 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[9] == 0x04) && srb 3018 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[2] == 0x00) && srb 3019 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[3] == 0x00) && srb 3020 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[4] == 0x00) && srb 3021 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[5] < 32)) { srb 3022 drivers/staging/rts5208/rtsx_scsi.c retval = mg_get_ICV(srb, chip); srb 3038 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, 0); srb 3042 drivers/staging/rts5208/rtsx_scsi.c static int mg_send_key(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 3045 drivers/staging/rts5208/rtsx_scsi.c unsigned int lun = SCSI_LUN(srb); srb 3072 drivers/staging/rts5208/rtsx_scsi.c if (srb->cmnd[7] != KC_MG_R_PRO) { srb 3082 drivers/staging/rts5208/rtsx_scsi.c key_format = srb->cmnd[10] & 0x3F; srb 3087 drivers/staging/rts5208/rtsx_scsi.c if ((scsi_bufflen(srb) == 0x0C) && srb 3088 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[8] == 0x00) && srb 3089 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[9] == 0x0C)) { srb 3090 drivers/staging/rts5208/rtsx_scsi.c retval = mg_set_leaf_id(srb, chip); srb 3102 drivers/staging/rts5208/rtsx_scsi.c if ((scsi_bufflen(srb) == 0x0C) && srb 3103 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[8] == 0x00) && srb 3104 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[9] == 0x0C)) { srb 3105 drivers/staging/rts5208/rtsx_scsi.c retval = mg_chg(srb, chip); srb 3117 drivers/staging/rts5208/rtsx_scsi.c if ((scsi_bufflen(srb) == 0x0C) && srb 3118 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[8] == 0x00) && srb 3119 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[9] == 0x0C)) { srb 3120 drivers/staging/rts5208/rtsx_scsi.c retval = mg_rsp(srb, chip); srb 3132 drivers/staging/rts5208/rtsx_scsi.c ms_card->mg_entry_num = srb->cmnd[5]; srb 3133 drivers/staging/rts5208/rtsx_scsi.c if ((scsi_bufflen(srb) == 0x404) && srb 3134 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[8] == 0x04) && srb 3135 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[9] == 0x04) && srb 3136 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[2] == 0x00) && srb 3137 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[3] == 0x00) && srb 3138 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[4] == 0x00) && srb 3139 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[5] < 32)) { srb 3140 drivers/staging/rts5208/rtsx_scsi.c retval = mg_set_ICV(srb, chip); srb 3156 drivers/staging/rts5208/rtsx_scsi.c scsi_set_resid(srb, 0); srb 3161 drivers/staging/rts5208/rtsx_scsi.c int rtsx_scsi_handler(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 3167 drivers/staging/rts5208/rtsx_scsi.c unsigned int lun = SCSI_LUN(srb); srb 3175 drivers/staging/rts5208/rtsx_scsi.c if (!((srb->cmnd[0] == VENDOR_CMND) && srb 3176 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[1] == SCSI_APP_CMD) && srb 3177 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[2] == GET_DEV_STATUS)) && srb 3178 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[0] != REQUEST_SENSE)) { srb 3189 drivers/staging/rts5208/rtsx_scsi.c if ((srb->cmnd[0] != REQUEST_SENSE) && srb 3190 drivers/staging/rts5208/rtsx_scsi.c (srb->cmnd[0] != INQUIRY)) { srb 3198 drivers/staging/rts5208/rtsx_scsi.c switch (srb->cmnd[0]) { srb 3203 drivers/staging/rts5208/rtsx_scsi.c result = read_write(srb, chip); srb 3205 drivers/staging/rts5208/rtsx_scsi.c led_shine(srb, chip); srb 3210 drivers/staging/rts5208/rtsx_scsi.c result = test_unit_ready(srb, chip); srb 3214 drivers/staging/rts5208/rtsx_scsi.c result = inquiry(srb, chip); srb 3218 drivers/staging/rts5208/rtsx_scsi.c result = read_capacity(srb, chip); srb 3222 drivers/staging/rts5208/rtsx_scsi.c result = start_stop_unit(srb, chip); srb 3226 drivers/staging/rts5208/rtsx_scsi.c result = allow_medium_removal(srb, chip); srb 3230 drivers/staging/rts5208/rtsx_scsi.c result = request_sense(srb, chip); srb 3235 drivers/staging/rts5208/rtsx_scsi.c result = mode_sense(srb, chip); srb 3239 drivers/staging/rts5208/rtsx_scsi.c result = read_format_capacity(srb, chip); srb 3243 drivers/staging/rts5208/rtsx_scsi.c result = vendor_cmnd(srb, chip); srb 3247 drivers/staging/rts5208/rtsx_scsi.c result = ms_sp_cmnd(srb, chip); srb 3257 drivers/staging/rts5208/rtsx_scsi.c result = sd_extension_cmnd(srb, chip); srb 3263 drivers/staging/rts5208/rtsx_scsi.c result = mg_report_key(srb, chip); srb 3267 drivers/staging/rts5208/rtsx_scsi.c result = mg_send_key(srb, chip); srb 129 drivers/staging/rts5208/rtsx_scsi.h int rtsx_scsi_handler(struct scsi_cmnd *srb, struct rtsx_chip *chip); srb 34 drivers/staging/rts5208/rtsx_transport.c struct scsi_cmnd *srb, srb 42 drivers/staging/rts5208/rtsx_transport.c if (scsi_sg_count(srb) == 0) { srb 45 drivers/staging/rts5208/rtsx_transport.c if (*offset >= scsi_bufflen(srb)) srb 47 drivers/staging/rts5208/rtsx_transport.c cnt = min(buflen, scsi_bufflen(srb) - *offset); srb 49 drivers/staging/rts5208/rtsx_transport.c sgbuffer = (unsigned char *)scsi_sglist(srb) + *offset; srb 64 drivers/staging/rts5208/rtsx_transport.c (struct scatterlist *)scsi_sglist(srb) srb 74 drivers/staging/rts5208/rtsx_transport.c while (cnt < buflen && *index < scsi_sg_count(srb)) { srb 121 drivers/staging/rts5208/rtsx_transport.c unsigned int buflen, struct scsi_cmnd *srb) srb 125 drivers/staging/rts5208/rtsx_transport.c rtsx_stor_access_xfer_buf(buffer, buflen, srb, &index, &offset, srb 127 drivers/staging/rts5208/rtsx_transport.c if (buflen < scsi_bufflen(srb)) srb 128 drivers/staging/rts5208/rtsx_transport.c scsi_set_resid(srb, scsi_bufflen(srb) - buflen); srb 132 drivers/staging/rts5208/rtsx_transport.c unsigned int buflen, struct scsi_cmnd *srb) srb 136 drivers/staging/rts5208/rtsx_transport.c rtsx_stor_access_xfer_buf(buffer, buflen, srb, &index, &offset, srb 138 drivers/staging/rts5208/rtsx_transport.c if (buflen < scsi_bufflen(srb)) srb 139 drivers/staging/rts5208/rtsx_transport.c scsi_set_resid(srb, scsi_bufflen(srb) - buflen); srb 151 drivers/staging/rts5208/rtsx_transport.c void rtsx_invoke_transport(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 155 drivers/staging/rts5208/rtsx_transport.c result = rtsx_scsi_handler(srb, chip); srb 163 drivers/staging/rts5208/rtsx_transport.c srb->result = DID_ABORT << 16; srb 170 drivers/staging/rts5208/rtsx_transport.c srb->result = DID_ERROR << 16; srb 174 drivers/staging/rts5208/rtsx_transport.c srb->result = SAM_STAT_GOOD; srb 183 drivers/staging/rts5208/rtsx_transport.c srb->result = SAM_STAT_CHECK_CONDITION; srb 184 drivers/staging/rts5208/rtsx_transport.c memcpy(srb->sense_buffer, srb 185 drivers/staging/rts5208/rtsx_transport.c (unsigned char *)&chip->sense_buffer[SCSI_LUN(srb)], srb 22 drivers/staging/rts5208/rtsx_transport.h struct scsi_cmnd *srb, srb 27 drivers/staging/rts5208/rtsx_transport.h struct scsi_cmnd *srb); srb 29 drivers/staging/rts5208/rtsx_transport.h struct scsi_cmnd *srb); srb 30 drivers/staging/rts5208/rtsx_transport.h void rtsx_invoke_transport(struct scsi_cmnd *srb, struct rtsx_chip *chip); srb 3286 drivers/staging/rts5208/sd.c int sd_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip, u32 start_sector, srb 3294 drivers/staging/rts5208/sd.c if (srb->sc_data_direction == DMA_FROM_DEVICE) { srb 3336 drivers/staging/rts5208/sd.c ((sd_card->pre_dir != srb->sc_data_direction) || srb 3400 drivers/staging/rts5208/sd.c trans_dma_enable(srb->sc_data_direction, chip, sector_cnt * 512, srb 3403 drivers/staging/rts5208/sd.c if (srb->sc_data_direction == DMA_FROM_DEVICE) { srb 3416 drivers/staging/rts5208/sd.c if (srb->sc_data_direction == DMA_FROM_DEVICE) { srb 3436 drivers/staging/rts5208/sd.c trans_dma_enable(srb->sc_data_direction, chip, srb 3478 drivers/staging/rts5208/sd.c trans_dma_enable(srb->sc_data_direction, chip, srb 3492 drivers/staging/rts5208/sd.c retval = rtsx_transfer_data(chip, SD_CARD, scsi_sglist(srb), srb 3493 drivers/staging/rts5208/sd.c scsi_bufflen(srb), scsi_sg_count(srb), srb 3494 drivers/staging/rts5208/sd.c srb->sc_data_direction, chip->sd_timeout); srb 3540 drivers/staging/rts5208/sd.c sd_card->pre_dir = srb->sc_data_direction; srb 3741 drivers/staging/rts5208/sd.c int sd_pass_thru_mode(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 3744 drivers/staging/rts5208/sd.c unsigned int lun = SCSI_LUN(srb); srb 3775 drivers/staging/rts5208/sd.c if ((srb->cmnd[2] != 0x53) || (srb->cmnd[3] != 0x44) || srb 3776 drivers/staging/rts5208/sd.c (srb->cmnd[4] != 0x20) || (srb->cmnd[5] != 0x43) || srb 3777 drivers/staging/rts5208/sd.c (srb->cmnd[6] != 0x61) || (srb->cmnd[7] != 0x72) || srb 3778 drivers/staging/rts5208/sd.c (srb->cmnd[8] != 0x64)) { srb 3783 drivers/staging/rts5208/sd.c switch (srb->cmnd[1] & 0x0F) { srb 3806 drivers/staging/rts5208/sd.c len = min_t(int, 18, scsi_bufflen(srb)); srb 3807 drivers/staging/rts5208/sd.c rtsx_stor_set_xfer_buf(buf, len, srb); srb 3812 drivers/staging/rts5208/sd.c static inline int get_rsp_type(struct scsi_cmnd *srb, u8 *rsp_type, srb 3818 drivers/staging/rts5208/sd.c switch (srb->cmnd[10]) { srb 3851 drivers/staging/rts5208/sd.c int sd_execute_no_data(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 3854 drivers/staging/rts5208/sd.c unsigned int lun = SCSI_LUN(srb); srb 3875 drivers/staging/rts5208/sd.c cmd_idx = srb->cmnd[2] & 0x3F; srb 3876 drivers/staging/rts5208/sd.c if (srb->cmnd[1] & 0x02) srb 3879 drivers/staging/rts5208/sd.c if (srb->cmnd[1] & 0x01) srb 3882 drivers/staging/rts5208/sd.c arg = ((u32)srb->cmnd[3] << 24) | ((u32)srb->cmnd[4] << 16) | srb 3883 drivers/staging/rts5208/sd.c ((u32)srb->cmnd[5] << 8) | srb->cmnd[6]; srb 3885 drivers/staging/rts5208/sd.c retval = get_rsp_type(srb, &rsp_type, &rsp_len); srb 3949 drivers/staging/rts5208/sd.c scsi_set_resid(srb, 0); srb 3963 drivers/staging/rts5208/sd.c int sd_execute_read_data(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 3966 drivers/staging/rts5208/sd.c unsigned int lun = SCSI_LUN(srb); srb 3988 drivers/staging/rts5208/sd.c cmd_idx = srb->cmnd[2] & 0x3F; srb 3989 drivers/staging/rts5208/sd.c if (srb->cmnd[1] & 0x04) srb 3992 drivers/staging/rts5208/sd.c if (srb->cmnd[1] & 0x02) srb 3995 drivers/staging/rts5208/sd.c if (srb->cmnd[1] & 0x01) srb 3998 drivers/staging/rts5208/sd.c data_len = ((u32)srb->cmnd[7] << 16) | ((u32)srb->cmnd[8] srb 3999 drivers/staging/rts5208/sd.c << 8) | srb->cmnd[9]; srb 4001 drivers/staging/rts5208/sd.c retval = get_rsp_type(srb, &rsp_type, &rsp_len); srb 4057 drivers/staging/rts5208/sd.c byte_cnt = ((u16)(srb->cmnd[8] & 0x03) << 8) | srb->cmnd[9]; srb 4061 drivers/staging/rts5208/sd.c cmd[1] = srb->cmnd[3]; srb 4062 drivers/staging/rts5208/sd.c cmd[2] = srb->cmnd[4]; srb 4063 drivers/staging/rts5208/sd.c cmd[3] = srb->cmnd[5]; srb 4064 drivers/staging/rts5208/sd.c cmd[4] = srb->cmnd[6]; srb 4079 drivers/staging/rts5208/sd.c min_len = min(data_len, scsi_bufflen(srb)); srb 4080 drivers/staging/rts5208/sd.c rtsx_stor_set_xfer_buf(buf, min_len, srb); srb 4093 drivers/staging/rts5208/sd.c 0xFF, (srb->cmnd[7] & 0xFE) >> 1); srb 4100 drivers/staging/rts5208/sd.c srb->cmnd[3]); srb 4102 drivers/staging/rts5208/sd.c srb->cmnd[4]); srb 4104 drivers/staging/rts5208/sd.c srb->cmnd[5]); srb 4106 drivers/staging/rts5208/sd.c srb->cmnd[6]); srb 4118 drivers/staging/rts5208/sd.c retval = rtsx_transfer_data(chip, SD_CARD, scsi_sglist(srb), srb 4119 drivers/staging/rts5208/sd.c scsi_bufflen(srb), srb 4120 drivers/staging/rts5208/sd.c scsi_sg_count(srb), srb 4166 drivers/staging/rts5208/sd.c if ((srb->cmnd[1] & 0x02) || (srb->cmnd[1] & 0x04)) srb 4180 drivers/staging/rts5208/sd.c scsi_set_resid(srb, 0); srb 4197 drivers/staging/rts5208/sd.c int sd_execute_write_data(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 4200 drivers/staging/rts5208/sd.c unsigned int lun = SCSI_LUN(srb); srb 4227 drivers/staging/rts5208/sd.c cmd_idx = srb->cmnd[2] & 0x3F; srb 4228 drivers/staging/rts5208/sd.c if (srb->cmnd[1] & 0x04) srb 4231 drivers/staging/rts5208/sd.c if (srb->cmnd[1] & 0x02) srb 4234 drivers/staging/rts5208/sd.c if (srb->cmnd[1] & 0x01) srb 4237 drivers/staging/rts5208/sd.c data_len = ((u32)srb->cmnd[7] << 16) | ((u32)srb->cmnd[8] srb 4238 drivers/staging/rts5208/sd.c << 8) | srb->cmnd[9]; srb 4239 drivers/staging/rts5208/sd.c arg = ((u32)srb->cmnd[3] << 24) | ((u32)srb->cmnd[4] << 16) | srb 4240 drivers/staging/rts5208/sd.c ((u32)srb->cmnd[5] << 8) | srb->cmnd[6]; srb 4249 drivers/staging/rts5208/sd.c retval = get_rsp_type(srb, &rsp_type, &rsp_len); srb 4317 drivers/staging/rts5208/sd.c rtsx_stor_get_xfer_buf(buf, data_len, srb); srb 4364 drivers/staging/rts5208/sd.c srb->cmnd[8] & 0x03); srb 4366 drivers/staging/rts5208/sd.c srb->cmnd[9]); srb 4390 drivers/staging/rts5208/sd.c 0xFF, (srb->cmnd[7] & 0xFE) >> 1); srb 4401 drivers/staging/rts5208/sd.c retval = rtsx_transfer_data(chip, SD_CARD, scsi_sglist(srb), srb 4402 drivers/staging/rts5208/sd.c scsi_bufflen(srb), srb 4403 drivers/staging/rts5208/sd.c scsi_sg_count(srb), srb 4420 drivers/staging/rts5208/sd.c scsi_set_resid(srb, 0); srb 4472 drivers/staging/rts5208/sd.c if ((srb->cmnd[1] & 0x02) || (srb->cmnd[1] & 0x04)) srb 4520 drivers/staging/rts5208/sd.c scsi_set_resid(srb, 0); srb 4526 drivers/staging/rts5208/sd.c scsi_set_resid(srb, 0); srb 4543 drivers/staging/rts5208/sd.c int sd_get_cmd_rsp(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 4546 drivers/staging/rts5208/sd.c unsigned int lun = SCSI_LUN(srb); srb 4561 drivers/staging/rts5208/sd.c data_len = ((u16)srb->cmnd[7] << 8) | srb->cmnd[8]; srb 4571 drivers/staging/rts5208/sd.c rtsx_stor_set_xfer_buf(sd_card->rsp, count, srb); srb 4578 drivers/staging/rts5208/sd.c scsi_set_resid(srb, 0); srb 4582 drivers/staging/rts5208/sd.c int sd_hw_rst(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 4585 drivers/staging/rts5208/sd.c unsigned int lun = SCSI_LUN(srb); srb 4599 drivers/staging/rts5208/sd.c if ((srb->cmnd[2] != 0x53) || (srb->cmnd[3] != 0x44) || srb 4600 drivers/staging/rts5208/sd.c (srb->cmnd[4] != 0x20) || (srb->cmnd[5] != 0x43) || srb 4601 drivers/staging/rts5208/sd.c (srb->cmnd[6] != 0x61) || (srb->cmnd[7] != 0x72) || srb 4602 drivers/staging/rts5208/sd.c (srb->cmnd[8] != 0x64)) { srb 4607 drivers/staging/rts5208/sd.c switch (srb->cmnd[1] & 0x0F) { srb 4610 drivers/staging/rts5208/sd.c if (srb->cmnd[9] == 0x64) srb 4641 drivers/staging/rts5208/sd.c scsi_set_resid(srb, 0); srb 270 drivers/staging/rts5208/sd.h int sd_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip, srb 281 drivers/staging/rts5208/sd.h int sd_pass_thru_mode(struct scsi_cmnd *srb, struct rtsx_chip *chip); srb 282 drivers/staging/rts5208/sd.h int sd_execute_no_data(struct scsi_cmnd *srb, struct rtsx_chip *chip); srb 283 drivers/staging/rts5208/sd.h int sd_execute_read_data(struct scsi_cmnd *srb, struct rtsx_chip *chip); srb 284 drivers/staging/rts5208/sd.h int sd_execute_write_data(struct scsi_cmnd *srb, struct rtsx_chip *chip); srb 285 drivers/staging/rts5208/sd.h int sd_get_cmd_rsp(struct scsi_cmnd *srb, struct rtsx_chip *chip); srb 286 drivers/staging/rts5208/sd.h int sd_hw_rst(struct scsi_cmnd *srb, struct rtsx_chip *chip); srb 436 drivers/staging/rts5208/spi.c int spi_get_status(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 443 drivers/staging/rts5208/spi.c min_t(int, scsi_bufflen(srb), 1), srb); srb 444 drivers/staging/rts5208/spi.c scsi_set_resid(srb, scsi_bufflen(srb) - 1); srb 449 drivers/staging/rts5208/spi.c int spi_set_parameter(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 456 drivers/staging/rts5208/spi.c spi->spi_clock = ((u16)(srb->cmnd[8]) << 8) | srb->cmnd[9]; srb 458 drivers/staging/rts5208/spi.c spi->spi_clock = srb->cmnd[3]; srb 460 drivers/staging/rts5208/spi.c spi->clk_div = ((u16)(srb->cmnd[4]) << 8) | srb->cmnd[5]; srb 461 drivers/staging/rts5208/spi.c spi->write_en = srb->cmnd[6]; srb 471 drivers/staging/rts5208/spi.c int spi_read_flash_id(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 479 drivers/staging/rts5208/spi.c len = ((u16)(srb->cmnd[7]) << 8) | srb->cmnd[8]; srb 496 drivers/staging/rts5208/spi.c rtsx_add_cmd(chip, WRITE_REG_CMD, SPI_COMMAND, 0xFF, srb->cmnd[3]); srb 497 drivers/staging/rts5208/spi.c rtsx_add_cmd(chip, WRITE_REG_CMD, SPI_ADDR2, 0xFF, srb->cmnd[4]); srb 498 drivers/staging/rts5208/spi.c rtsx_add_cmd(chip, WRITE_REG_CMD, SPI_ADDR1, 0xFF, srb->cmnd[5]); srb 499 drivers/staging/rts5208/spi.c rtsx_add_cmd(chip, WRITE_REG_CMD, SPI_ADDR0, 0xFF, srb->cmnd[6]); srb 502 drivers/staging/rts5208/spi.c rtsx_add_cmd(chip, WRITE_REG_CMD, SPI_LENGTH1, 0xFF, srb->cmnd[7]); srb 503 drivers/staging/rts5208/spi.c rtsx_add_cmd(chip, WRITE_REG_CMD, SPI_LENGTH0, 0xFF, srb->cmnd[8]); srb 506 drivers/staging/rts5208/spi.c if (srb->cmnd[9]) { srb 514 drivers/staging/rts5208/spi.c if (srb->cmnd[9]) { srb 545 drivers/staging/rts5208/spi.c rtsx_stor_set_xfer_buf(buf, scsi_bufflen(srb), srb); srb 546 drivers/staging/rts5208/spi.c scsi_set_resid(srb, 0); srb 554 drivers/staging/rts5208/spi.c int spi_read_flash(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 565 drivers/staging/rts5208/spi.c ins = srb->cmnd[3]; srb 566 drivers/staging/rts5208/spi.c addr = ((u32)(srb->cmnd[4]) << 16) | ((u32)(srb->cmnd[5]) srb 567 drivers/staging/rts5208/spi.c << 8) | srb->cmnd[6]; srb 568 drivers/staging/rts5208/spi.c len = ((u16)(srb->cmnd[7]) << 8) | srb->cmnd[8]; srb 569 drivers/staging/rts5208/spi.c slow_read = srb->cmnd[9]; srb 634 drivers/staging/rts5208/spi.c rtsx_stor_access_xfer_buf(buf, pagelen, srb, &index, &offset, srb 641 drivers/staging/rts5208/spi.c scsi_set_resid(srb, 0); srb 647 drivers/staging/rts5208/spi.c int spi_write_flash(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 658 drivers/staging/rts5208/spi.c ins = srb->cmnd[3]; srb 659 drivers/staging/rts5208/spi.c addr = ((u32)(srb->cmnd[4]) << 16) | ((u32)(srb->cmnd[5]) srb 660 drivers/staging/rts5208/spi.c << 8) | srb->cmnd[6]; srb 661 drivers/staging/rts5208/spi.c len = ((u16)(srb->cmnd[7]) << 8) | srb->cmnd[8]; srb 662 drivers/staging/rts5208/spi.c program_mode = srb->cmnd[9]; srb 682 drivers/staging/rts5208/spi.c rtsx_stor_access_xfer_buf(buf, 1, srb, &index, &offset, srb 725 drivers/staging/rts5208/spi.c rtsx_stor_access_xfer_buf(buf, 1, srb, &index, &offset, srb 791 drivers/staging/rts5208/spi.c rtsx_stor_access_xfer_buf(buf, pagelen, srb, &index, srb 822 drivers/staging/rts5208/spi.c int spi_erase_flash(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 830 drivers/staging/rts5208/spi.c ins = srb->cmnd[3]; srb 831 drivers/staging/rts5208/spi.c addr = ((u32)(srb->cmnd[4]) << 16) | ((u32)(srb->cmnd[5]) srb 832 drivers/staging/rts5208/spi.c << 8) | srb->cmnd[6]; srb 833 drivers/staging/rts5208/spi.c erase_mode = srb->cmnd[9]; srb 865 drivers/staging/rts5208/spi.c int spi_write_flash_status(struct scsi_cmnd *srb, struct rtsx_chip *chip) srb 870 drivers/staging/rts5208/spi.c ins = srb->cmnd[3]; srb 871 drivers/staging/rts5208/spi.c status = srb->cmnd[4]; srb 872 drivers/staging/rts5208/spi.c ewsr = srb->cmnd[5]; srb 44 drivers/staging/rts5208/spi.h int spi_get_status(struct scsi_cmnd *srb, struct rtsx_chip *chip); srb 45 drivers/staging/rts5208/spi.h int spi_set_parameter(struct scsi_cmnd *srb, struct rtsx_chip *chip); srb 46 drivers/staging/rts5208/spi.h int spi_read_flash_id(struct scsi_cmnd *srb, struct rtsx_chip *chip); srb 47 drivers/staging/rts5208/spi.h int spi_read_flash(struct scsi_cmnd *srb, struct rtsx_chip *chip); srb 48 drivers/staging/rts5208/spi.h int spi_write_flash(struct scsi_cmnd *srb, struct rtsx_chip *chip); srb 49 drivers/staging/rts5208/spi.h int spi_erase_flash(struct scsi_cmnd *srb, struct rtsx_chip *chip); srb 50 drivers/staging/rts5208/spi.h int spi_write_flash_status(struct scsi_cmnd *srb, struct rtsx_chip *chip); srb 1542 drivers/staging/rts5208/xd.c trans_dma_enable(chip->srb->sc_data_direction, chip, srb 1554 drivers/staging/rts5208/xd.c scsi_sg_count(chip->srb), srb 1742 drivers/staging/rts5208/xd.c trans_dma_enable(chip->srb->sc_data_direction, chip, srb 1753 drivers/staging/rts5208/xd.c scsi_sg_count(chip->srb), srb 1828 drivers/staging/rts5208/xd.c int xd_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip, srb 1832 drivers/staging/rts5208/xd.c unsigned int lun = SCSI_LUN(srb); srb 1848 drivers/staging/rts5208/xd.c scsi_sg_count(srb)); srb 1850 drivers/staging/rts5208/xd.c ptr = (u8 *)scsi_sglist(srb); srb 1876 drivers/staging/rts5208/xd.c if (srb->sc_data_direction == DMA_TO_DEVICE) { srb 1973 drivers/staging/rts5208/xd.c if (srb->sc_data_direction == DMA_FROM_DEVICE) { srb 1995 drivers/staging/rts5208/xd.c if (scsi_sg_count(srb) == 0) srb 2017 drivers/staging/rts5208/xd.c if (srb->sc_data_direction == DMA_FROM_DEVICE) srb 2027 drivers/staging/rts5208/xd.c if (srb->sc_data_direction == DMA_TO_DEVICE) { srb 2039 drivers/staging/rts5208/xd.c if ((srb->sc_data_direction == DMA_TO_DEVICE) && srb 2068 drivers/staging/rts5208/xd.c scsi_set_resid(srb, 0); srb 169 drivers/staging/rts5208/xd.h int xd_rw(struct scsi_cmnd *srb, struct rtsx_chip *chip, srb 222 drivers/usb/image/microtek.c static inline void mts_show_command(struct scsi_cmnd *srb) srb 226 drivers/usb/image/microtek.c switch (srb->cmnd[0]) { srb 296 drivers/usb/image/microtek.c MTS_DEBUG( "Command %s (%d bytes)\n", what, srb->cmd_len); srb 299 drivers/usb/image/microtek.c MTS_DEBUG( " %10ph\n", srb->cmnd); srb 333 drivers/usb/image/microtek.c static int mts_scsi_abort(struct scsi_cmnd *srb) srb 335 drivers/usb/image/microtek.c struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]); srb 344 drivers/usb/image/microtek.c static int mts_scsi_host_reset(struct scsi_cmnd *srb) srb 346 drivers/usb/image/microtek.c struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]); srb 361 drivers/usb/image/microtek.c mts_scsi_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *srb); srb 392 drivers/usb/image/microtek.c context->srb->result = DID_ERROR << 16; srb 404 drivers/usb/image/microtek.c context->final_callback(context->srb); srb 411 drivers/usb/image/microtek.c context->srb->result &= MTS_SCSI_ERR_MASK; srb 412 drivers/usb/image/microtek.c context->srb->result |= (unsigned)(*context->scsi_status)<<1; srb 438 drivers/usb/image/microtek.c scsi_set_resid(context->srb, context->data_length - srb 441 drivers/usb/image/microtek.c context->srb->result = (status == -ENOENT ? DID_ABORT : DID_ERROR)<<16; srb 458 drivers/usb/image/microtek.c context->srb->result = DID_ABORT<<16; srb 463 drivers/usb/image/microtek.c context->srb->result = DID_ERROR<<16; srb 470 drivers/usb/image/microtek.c if (context->srb->cmnd[0] == REQUEST_SENSE) { srb 473 drivers/usb/image/microtek.c context->srb->sense_buffer, srb 481 drivers/usb/image/microtek.c scsi_sg_count(context->srb) > 1 ? srb 495 drivers/usb/image/microtek.c scsi_sg_count(context->srb)); srb 498 drivers/usb/image/microtek.c context->srb->result = (status == -ENOENT ? DID_ABORT : DID_ERROR)<<16; srb 524 drivers/usb/image/microtek.c mts_build_transfer_context(struct scsi_cmnd *srb, struct mts_desc* desc) srb 531 drivers/usb/image/microtek.c desc->context.srb = srb; srb 533 drivers/usb/image/microtek.c if (!scsi_bufflen(srb)) { srb 538 drivers/usb/image/microtek.c desc->context.curr_sg = scsi_sglist(srb); srb 548 drivers/usb/image/microtek.c if ( !memcmp( srb->cmnd, mts_read_image_sig, mts_read_image_sig_len ) srb 552 drivers/usb/image/microtek.c } else if ( MTS_DIRECTION_IS_IN(srb->cmnd[0]) ) { srb 566 drivers/usb/image/microtek.c mts_scsi_queuecommand_lck(struct scsi_cmnd *srb, mts_scsi_cmnd_callback callback) srb 568 drivers/usb/image/microtek.c struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]); srb 573 drivers/usb/image/microtek.c mts_show_command(srb); srb 576 drivers/usb/image/microtek.c if ( srb->device->lun || srb->device->id || srb->device->channel ) { srb 578 drivers/usb/image/microtek.c MTS_DEBUG("Command to LUN=%d ID=%d CHANNEL=%d from SCSI layer\n",(int)srb->device->lun,(int)srb->device->id, (int)srb->device->channel ); srb 582 drivers/usb/image/microtek.c srb->result = DID_BAD_TARGET << 16; srb 585 drivers/usb/image/microtek.c callback(srb); srb 594 drivers/usb/image/microtek.c srb->cmnd, srb 595 drivers/usb/image/microtek.c srb->cmd_len, srb 601 drivers/usb/image/microtek.c mts_build_transfer_context( srb, desc ); srb 609 drivers/usb/image/microtek.c srb->result = DID_ERROR << 16; srb 612 drivers/usb/image/microtek.c callback(srb); srb 19 drivers/usb/image/microtek.h struct scsi_cmnd *srb; srb 114 drivers/usb/storage/alauda.c #define MEDIA_PORT(us) us->srb->device->lun srb 986 drivers/usb/storage/alauda.c usb_stor_access_xfer_buf(buffer, len, us->srb, srb 1058 drivers/usb/storage/alauda.c usb_stor_access_xfer_buf(buffer, len, us->srb, srb 1120 drivers/usb/storage/alauda.c static int alauda_transport(struct scsi_cmnd *srb, struct us_data *us) srb 1129 drivers/usb/storage/alauda.c if (srb->cmnd[0] == INQUIRY) { srb 1136 drivers/usb/storage/alauda.c if (srb->cmnd[0] == TEST_UNIT_READY) { srb 1141 drivers/usb/storage/alauda.c if (srb->cmnd[0] == READ_CAPACITY) { srb 1159 drivers/usb/storage/alauda.c usb_stor_set_xfer_buf(ptr, 8, srb); srb 1163 drivers/usb/storage/alauda.c if (srb->cmnd[0] == READ_10) { srb 1170 drivers/usb/storage/alauda.c page = short_pack(srb->cmnd[3], srb->cmnd[2]); srb 1172 drivers/usb/storage/alauda.c page |= short_pack(srb->cmnd[5], srb->cmnd[4]); srb 1173 drivers/usb/storage/alauda.c pages = short_pack(srb->cmnd[8], srb->cmnd[7]); srb 1180 drivers/usb/storage/alauda.c if (srb->cmnd[0] == WRITE_10) { srb 1187 drivers/usb/storage/alauda.c page = short_pack(srb->cmnd[3], srb->cmnd[2]); srb 1189 drivers/usb/storage/alauda.c page |= short_pack(srb->cmnd[5], srb->cmnd[4]); srb 1190 drivers/usb/storage/alauda.c pages = short_pack(srb->cmnd[8], srb->cmnd[7]); srb 1197 drivers/usb/storage/alauda.c if (srb->cmnd[0] == REQUEST_SENSE) { srb 1206 drivers/usb/storage/alauda.c usb_stor_set_xfer_buf(ptr, 18, srb); srb 1211 drivers/usb/storage/alauda.c if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) { srb 1220 drivers/usb/storage/alauda.c srb->cmnd[0], srb->cmnd[0]); srb 73 drivers/usb/storage/cypress_atacb.c static void cypress_atacb_passthrough(struct scsi_cmnd *srb, struct us_data *us) srb 77 drivers/usb/storage/cypress_atacb.c if (likely(srb->cmnd[0] != ATA_16 && srb->cmnd[0] != ATA_12)) { srb 78 drivers/usb/storage/cypress_atacb.c usb_stor_transparent_scsi_command(srb, us); srb 82 drivers/usb/storage/cypress_atacb.c memcpy(save_cmnd, srb->cmnd, sizeof(save_cmnd)); srb 83 drivers/usb/storage/cypress_atacb.c memset(srb->cmnd, 0, MAX_COMMAND_SIZE); srb 99 drivers/usb/storage/cypress_atacb.c srb->cmd_len = 16; srb 101 drivers/usb/storage/cypress_atacb.c srb->cmnd[0] = 0x24; /* srb 106 drivers/usb/storage/cypress_atacb.c srb->cmnd[1] = 0x24; /* bVSCBSubCommand : 0x24 for ATACB */ srb 108 drivers/usb/storage/cypress_atacb.c srb->cmnd[3] = 0xff - 1; /* srb 112 drivers/usb/storage/cypress_atacb.c srb->cmnd[4] = 1; /* TransferBlockCount : 512 */ srb 115 drivers/usb/storage/cypress_atacb.c srb->cmnd[ 6] = save_cmnd[ 4]; /* features */ srb 116 drivers/usb/storage/cypress_atacb.c srb->cmnd[ 7] = save_cmnd[ 6]; /* sector count */ srb 117 drivers/usb/storage/cypress_atacb.c srb->cmnd[ 8] = save_cmnd[ 8]; /* lba low */ srb 118 drivers/usb/storage/cypress_atacb.c srb->cmnd[ 9] = save_cmnd[10]; /* lba med */ srb 119 drivers/usb/storage/cypress_atacb.c srb->cmnd[10] = save_cmnd[12]; /* lba high */ srb 120 drivers/usb/storage/cypress_atacb.c srb->cmnd[11] = save_cmnd[13]; /* device */ srb 121 drivers/usb/storage/cypress_atacb.c srb->cmnd[12] = save_cmnd[14]; /* command */ srb 130 drivers/usb/storage/cypress_atacb.c srb->cmnd[ 6] = save_cmnd[3]; /* features */ srb 131 drivers/usb/storage/cypress_atacb.c srb->cmnd[ 7] = save_cmnd[4]; /* sector count */ srb 132 drivers/usb/storage/cypress_atacb.c srb->cmnd[ 8] = save_cmnd[5]; /* lba low */ srb 133 drivers/usb/storage/cypress_atacb.c srb->cmnd[ 9] = save_cmnd[6]; /* lba med */ srb 134 drivers/usb/storage/cypress_atacb.c srb->cmnd[10] = save_cmnd[7]; /* lba high */ srb 135 drivers/usb/storage/cypress_atacb.c srb->cmnd[11] = save_cmnd[8]; /* device */ srb 136 drivers/usb/storage/cypress_atacb.c srb->cmnd[12] = save_cmnd[9]; /* command */ srb 140 drivers/usb/storage/cypress_atacb.c if ((srb->cmnd[12] == ATA_CMD_SET_FEATURES) srb 141 drivers/usb/storage/cypress_atacb.c && (srb->cmnd[6] == SETFEATURES_XFER)) srb 144 drivers/usb/storage/cypress_atacb.c if (srb->cmnd[12] == ATA_CMD_ID_ATA || srb->cmnd[12] == ATA_CMD_ID_ATAPI) srb 145 drivers/usb/storage/cypress_atacb.c srb->cmnd[2] |= (1<<7); /* set IdentifyPacketDevice for these cmds */ srb 148 drivers/usb/storage/cypress_atacb.c usb_stor_transparent_scsi_command(srb, us); srb 151 drivers/usb/storage/cypress_atacb.c if (srb->result == SAM_STAT_CHECK_CONDITION && srb 152 drivers/usb/storage/cypress_atacb.c memcmp(srb->sense_buffer, usb_stor_sense_invalidCDB, srb 162 drivers/usb/storage/cypress_atacb.c if ((srb->result != (DID_ERROR << 16) && srb 163 drivers/usb/storage/cypress_atacb.c srb->result != (DID_ABORT << 16)) && srb 167 drivers/usb/storage/cypress_atacb.c unsigned char *sb = srb->sense_buffer; srb 172 drivers/usb/storage/cypress_atacb.c scsi_eh_prep_cmnd(srb, &ses, NULL, 0, sizeof(regs)); srb 179 drivers/usb/storage/cypress_atacb.c srb->cmd_len = 16; srb 180 drivers/usb/storage/cypress_atacb.c srb->cmnd = ses.cmnd; srb 181 drivers/usb/storage/cypress_atacb.c srb->cmnd[2] = 1; srb 183 drivers/usb/storage/cypress_atacb.c usb_stor_transparent_scsi_command(srb, us); srb 184 drivers/usb/storage/cypress_atacb.c memcpy(regs, srb->sense_buffer, sizeof(regs)); srb 185 drivers/usb/storage/cypress_atacb.c tmp_result = srb->result; srb 186 drivers/usb/storage/cypress_atacb.c scsi_eh_restore_cmnd(srb, &ses); srb 224 drivers/usb/storage/cypress_atacb.c srb->result = (DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION; srb 228 drivers/usb/storage/cypress_atacb.c srb->result = (DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION; srb 230 drivers/usb/storage/cypress_atacb.c memcpy(srb->sense_buffer, srb 234 drivers/usb/storage/cypress_atacb.c memcpy(srb->cmnd, save_cmnd, sizeof(save_cmnd)); srb 235 drivers/usb/storage/cypress_atacb.c if (srb->cmnd[0] == ATA_12) srb 236 drivers/usb/storage/cypress_atacb.c srb->cmd_len = 12; srb 202 drivers/usb/storage/datafab.c usb_stor_access_xfer_buf(buffer, len, us->srb, srb 265 drivers/usb/storage/datafab.c usb_stor_access_xfer_buf(buffer, len, us->srb, srb 438 drivers/usb/storage/datafab.c struct scsi_cmnd * srb, srb 463 drivers/usb/storage/datafab.c pc = srb->cmnd[2] >> 6; srb 464 drivers/usb/storage/datafab.c page_code = srb->cmnd[2] & 0x3F; srb 534 drivers/usb/storage/datafab.c usb_stor_set_xfer_buf(ptr, i, srb); srb 548 drivers/usb/storage/datafab.c static int datafab_transport(struct scsi_cmnd *srb, struct us_data *us) srb 569 drivers/usb/storage/datafab.c if (srb->cmnd[0] == INQUIRY) { srb 576 drivers/usb/storage/datafab.c if (srb->cmnd[0] == READ_CAPACITY) { srb 589 drivers/usb/storage/datafab.c usb_stor_set_xfer_buf(ptr, 8, srb); srb 594 drivers/usb/storage/datafab.c if (srb->cmnd[0] == MODE_SELECT_10) { srb 601 drivers/usb/storage/datafab.c if (srb->cmnd[0] == READ_10) { srb 602 drivers/usb/storage/datafab.c block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) | srb 603 drivers/usb/storage/datafab.c ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5])); srb 605 drivers/usb/storage/datafab.c blocks = ((u32)(srb->cmnd[7]) << 8) | ((u32)(srb->cmnd[8])); srb 612 drivers/usb/storage/datafab.c if (srb->cmnd[0] == READ_12) { srb 615 drivers/usb/storage/datafab.c block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) | srb 616 drivers/usb/storage/datafab.c ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5])); srb 618 drivers/usb/storage/datafab.c blocks = ((u32)(srb->cmnd[6]) << 24) | ((u32)(srb->cmnd[7]) << 16) | srb 619 drivers/usb/storage/datafab.c ((u32)(srb->cmnd[8]) << 8) | ((u32)(srb->cmnd[9])); srb 626 drivers/usb/storage/datafab.c if (srb->cmnd[0] == WRITE_10) { srb 627 drivers/usb/storage/datafab.c block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) | srb 628 drivers/usb/storage/datafab.c ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5])); srb 630 drivers/usb/storage/datafab.c blocks = ((u32)(srb->cmnd[7]) << 8) | ((u32)(srb->cmnd[8])); srb 637 drivers/usb/storage/datafab.c if (srb->cmnd[0] == WRITE_12) { srb 640 drivers/usb/storage/datafab.c block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) | srb 641 drivers/usb/storage/datafab.c ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5])); srb 643 drivers/usb/storage/datafab.c blocks = ((u32)(srb->cmnd[6]) << 24) | ((u32)(srb->cmnd[7]) << 16) | srb 644 drivers/usb/storage/datafab.c ((u32)(srb->cmnd[8]) << 8) | ((u32)(srb->cmnd[9])); srb 651 drivers/usb/storage/datafab.c if (srb->cmnd[0] == TEST_UNIT_READY) { srb 656 drivers/usb/storage/datafab.c if (srb->cmnd[0] == REQUEST_SENSE) { srb 669 drivers/usb/storage/datafab.c usb_stor_set_xfer_buf(ptr, 18, srb); srb 674 drivers/usb/storage/datafab.c if (srb->cmnd[0] == MODE_SENSE) { srb 676 drivers/usb/storage/datafab.c return datafab_handle_mode_sense(us, srb, 1); srb 679 drivers/usb/storage/datafab.c if (srb->cmnd[0] == MODE_SENSE_10) { srb 681 drivers/usb/storage/datafab.c return datafab_handle_mode_sense(us, srb, 0); srb 684 drivers/usb/storage/datafab.c if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) { srb 692 drivers/usb/storage/datafab.c if (srb->cmnd[0] == START_STOP) { srb 705 drivers/usb/storage/datafab.c srb->result = SUCCESS; srb 708 drivers/usb/storage/datafab.c srb->result = SAM_STAT_CHECK_CONDITION; srb 714 drivers/usb/storage/datafab.c srb->cmnd[0], srb->cmnd[0]); srb 42 drivers/usb/storage/debug.c void usb_stor_show_command(const struct us_data *us, struct scsi_cmnd *srb) srb 46 drivers/usb/storage/debug.c switch (srb->cmnd[0]) { srb 139 drivers/usb/storage/debug.c usb_stor_dbg(us, "Command %s (%d bytes)\n", what, srb->cmd_len); srb 140 drivers/usb/storage/debug.c usb_stor_dbg(us, "bytes: %*ph\n", min_t(int, srb->cmd_len, 16), srb 141 drivers/usb/storage/debug.c (const unsigned char *)srb->cmnd); srb 33 drivers/usb/storage/debug.h void usb_stor_show_command(const struct us_data *us, struct scsi_cmnd *srb); srb 522 drivers/usb/storage/ene_ub6250.c result = usb_stor_bulk_srb(us, pipe, us->srb); srb 562 drivers/usb/storage/ene_ub6250.c if (us->srb != NULL) srb 563 drivers/usb/storage/ene_ub6250.c scsi_set_resid(us->srb, max(scsi_get_resid(us->srb), srb 573 drivers/usb/storage/ene_ub6250.c static int do_scsi_request_sense(struct us_data *us, struct scsi_cmnd *srb) srb 585 drivers/usb/storage/ene_ub6250.c usb_stor_set_xfer_buf(buf, sizeof(buf), srb); srb 589 drivers/usb/storage/ene_ub6250.c static int do_scsi_inquiry(struct us_data *us, struct scsi_cmnd *srb) srb 597 drivers/usb/storage/ene_ub6250.c usb_stor_set_xfer_buf(data_ptr, 36, srb); srb 601 drivers/usb/storage/ene_ub6250.c static int sd_scsi_test_unit_ready(struct us_data *us, struct scsi_cmnd *srb) srb 615 drivers/usb/storage/ene_ub6250.c static int sd_scsi_mode_sense(struct us_data *us, struct scsi_cmnd *srb) srb 626 drivers/usb/storage/ene_ub6250.c usb_stor_set_xfer_buf(mediaWP, 12, srb); srb 628 drivers/usb/storage/ene_ub6250.c usb_stor_set_xfer_buf(mediaNoWP, 12, srb); srb 634 drivers/usb/storage/ene_ub6250.c static int sd_scsi_read_capacity(struct us_data *us, struct scsi_cmnd *srb) srb 669 drivers/usb/storage/ene_ub6250.c usb_stor_access_xfer_buf(buf, 8, srb, &sg, &offset, TO_XFER_BUF); srb 674 drivers/usb/storage/ene_ub6250.c static int sd_scsi_read(struct us_data *us, struct scsi_cmnd *srb) srb 677 drivers/usb/storage/ene_ub6250.c unsigned char *cdb = srb->cmnd; srb 710 drivers/usb/storage/ene_ub6250.c result = ene_send_scsi_cmd(us, FDIR_READ, scsi_sglist(srb), 1); srb 714 drivers/usb/storage/ene_ub6250.c static int sd_scsi_write(struct us_data *us, struct scsi_cmnd *srb) srb 717 drivers/usb/storage/ene_ub6250.c unsigned char *cdb = srb->cmnd; srb 750 drivers/usb/storage/ene_ub6250.c result = ene_send_scsi_cmd(us, FDIR_WRITE, scsi_sglist(srb), 1); srb 1453 drivers/usb/storage/ene_ub6250.c static int ms_scsi_test_unit_ready(struct us_data *us, struct scsi_cmnd *srb) srb 1468 drivers/usb/storage/ene_ub6250.c static int ms_scsi_mode_sense(struct us_data *us, struct scsi_cmnd *srb) srb 1479 drivers/usb/storage/ene_ub6250.c usb_stor_set_xfer_buf(mediaWP, 12, srb); srb 1481 drivers/usb/storage/ene_ub6250.c usb_stor_set_xfer_buf(mediaNoWP, 12, srb); srb 1486 drivers/usb/storage/ene_ub6250.c static int ms_scsi_read_capacity(struct us_data *us, struct scsi_cmnd *srb) srb 1516 drivers/usb/storage/ene_ub6250.c usb_stor_access_xfer_buf(buf, 8, srb, &sg, &offset, TO_XFER_BUF); srb 1637 drivers/usb/storage/ene_ub6250.c static int ms_scsi_read(struct us_data *us, struct scsi_cmnd *srb) srb 1640 drivers/usb/storage/ene_ub6250.c unsigned char *cdb = srb->cmnd; srb 1671 drivers/usb/storage/ene_ub6250.c result = ene_send_scsi_cmd(us, FDIR_READ, scsi_sglist(srb), 1); srb 1729 drivers/usb/storage/ene_ub6250.c usb_stor_set_xfer_buf(buf, blenByte, srb); srb 1736 drivers/usb/storage/ene_ub6250.c static int ms_scsi_write(struct us_data *us, struct scsi_cmnd *srb) srb 1740 drivers/usb/storage/ene_ub6250.c unsigned char *cdb = srb->cmnd; srb 1772 drivers/usb/storage/ene_ub6250.c result = ene_send_scsi_cmd(us, FDIR_WRITE, scsi_sglist(srb), 1); srb 1783 drivers/usb/storage/ene_ub6250.c usb_stor_set_xfer_buf(buf, blenByte, srb); srb 1940 drivers/usb/storage/ene_ub6250.c if (us->srb != NULL) srb 1941 drivers/usb/storage/ene_ub6250.c scsi_set_resid(us->srb, 0); srb 2220 drivers/usb/storage/ene_ub6250.c static int sd_scsi_irp(struct us_data *us, struct scsi_cmnd *srb) srb 2225 drivers/usb/storage/ene_ub6250.c switch (srb->cmnd[0]) { srb 2227 drivers/usb/storage/ene_ub6250.c result = sd_scsi_test_unit_ready(us, srb); srb 2230 drivers/usb/storage/ene_ub6250.c result = do_scsi_request_sense(us, srb); srb 2233 drivers/usb/storage/ene_ub6250.c result = do_scsi_inquiry(us, srb); srb 2236 drivers/usb/storage/ene_ub6250.c result = sd_scsi_mode_sense(us, srb); srb 2244 drivers/usb/storage/ene_ub6250.c result = sd_scsi_read_capacity(us, srb); srb 2247 drivers/usb/storage/ene_ub6250.c result = sd_scsi_read(us, srb); srb 2250 drivers/usb/storage/ene_ub6250.c result = sd_scsi_write(us, srb); srb 2265 drivers/usb/storage/ene_ub6250.c static int ms_scsi_irp(struct us_data *us, struct scsi_cmnd *srb) srb 2270 drivers/usb/storage/ene_ub6250.c switch (srb->cmnd[0]) { srb 2272 drivers/usb/storage/ene_ub6250.c result = ms_scsi_test_unit_ready(us, srb); srb 2275 drivers/usb/storage/ene_ub6250.c result = do_scsi_request_sense(us, srb); srb 2278 drivers/usb/storage/ene_ub6250.c result = do_scsi_inquiry(us, srb); srb 2281 drivers/usb/storage/ene_ub6250.c result = ms_scsi_mode_sense(us, srb); srb 2284 drivers/usb/storage/ene_ub6250.c result = ms_scsi_read_capacity(us, srb); srb 2287 drivers/usb/storage/ene_ub6250.c result = ms_scsi_read(us, srb); srb 2290 drivers/usb/storage/ene_ub6250.c result = ms_scsi_write(us, srb); srb 2302 drivers/usb/storage/ene_ub6250.c static int ene_transport(struct scsi_cmnd *srb, struct us_data *us) srb 2308 drivers/usb/storage/ene_ub6250.c scsi_set_resid(srb, 0); srb 2314 drivers/usb/storage/ene_ub6250.c result = sd_scsi_irp(us, srb); srb 2317 drivers/usb/storage/ene_ub6250.c result = ms_scsi_irp(us, srb); srb 152 drivers/usb/storage/freecom.c freecom_readdata (struct scsi_cmnd *srb, struct us_data *us, srb 176 drivers/usb/storage/freecom.c result = usb_stor_bulk_srb(us, ipipe, srb); srb 185 drivers/usb/storage/freecom.c freecom_writedata (struct scsi_cmnd *srb, struct us_data *us, srb 209 drivers/usb/storage/freecom.c result = usb_stor_bulk_srb(us, opipe, srb); srb 221 drivers/usb/storage/freecom.c static int freecom_transport(struct scsi_cmnd *srb, struct us_data *us) srb 242 drivers/usb/storage/freecom.c memcpy (fcb->Atapi, srb->cmnd, 12); srb 245 drivers/usb/storage/freecom.c US_DEBUG(pdump(us, srb->cmnd, 12)); srb 331 drivers/usb/storage/freecom.c usb_stor_dbg(us, "SCSI requested %d\n", scsi_bufflen(srb)); srb 334 drivers/usb/storage/freecom.c switch (srb->cmnd[0]) { srb 342 drivers/usb/storage/freecom.c length = scsi_bufflen(srb); srb 346 drivers/usb/storage/freecom.c if (length > scsi_bufflen(srb)) { srb 347 drivers/usb/storage/freecom.c length = scsi_bufflen(srb); srb 357 drivers/usb/storage/freecom.c switch (us->srb->sc_data_direction) { srb 370 drivers/usb/storage/freecom.c result = freecom_readdata (srb, us, ipipe, opipe, length); srb 401 drivers/usb/storage/freecom.c result = freecom_writedata (srb, us, ipipe, opipe, length); srb 431 drivers/usb/storage/freecom.c us->srb->sc_data_direction); srb 330 drivers/usb/storage/isd200.c struct scsi_cmnd srb; srb 399 drivers/usb/storage/isd200.c static void isd200_build_sense(struct us_data *us, struct scsi_cmnd *srb) srb 402 drivers/usb/storage/isd200.c struct sense_data *buf = (struct sense_data *) &srb->sense_buffer[0]; srb 452 drivers/usb/storage/isd200.c struct scsi_cmnd *srb = &info->srb; srb 457 drivers/usb/storage/isd200.c srb->sc_data_direction = dir; srb 458 drivers/usb/storage/isd200.c srb->sdb.table.sgl = buff ? &info->sg : NULL; srb 459 drivers/usb/storage/isd200.c srb->sdb.length = bufflen; srb 460 drivers/usb/storage/isd200.c srb->sdb.table.nents = buff ? 1 : 0; srb 463 drivers/usb/storage/isd200.c static void isd200_srb_set_bufflen(struct scsi_cmnd *srb, unsigned bufflen) srb 465 drivers/usb/storage/isd200.c srb->sdb.length = bufflen; srb 484 drivers/usb/storage/isd200.c struct scsi_cmnd *srb = &info->srb; srb 488 drivers/usb/storage/isd200.c srb->cmnd = info->cmnd; srb 489 drivers/usb/storage/isd200.c srb->device = &srb_dev; srb 555 drivers/usb/storage/isd200.c memcpy(srb->cmnd, &ata, sizeof(ata.generic)); srb 556 drivers/usb/storage/isd200.c srb->cmd_len = sizeof(ata.generic); srb 557 drivers/usb/storage/isd200.c status = usb_stor_Bulk_transport(srb, us); srb 608 drivers/usb/storage/isd200.c struct scsi_cmnd *srb, srb 616 drivers/usb/storage/isd200.c memcpy(srb->cmnd, ataCdb, sizeof(ataCdb->generic)); srb 617 drivers/usb/storage/isd200.c srb->cmd_len = sizeof(ataCdb->generic); srb 618 drivers/usb/storage/isd200.c transferStatus = usb_stor_Bulk_transport(srb, us); srb 633 drivers/usb/storage/isd200.c srb->result = SAM_STAT_GOOD; srb 638 drivers/usb/storage/isd200.c srb->result = SAM_STAT_CHECK_CONDITION; srb 648 drivers/usb/storage/isd200.c srb->result = DID_ERROR << 16; srb 654 drivers/usb/storage/isd200.c srb->result = DID_ERROR << 16; srb 659 drivers/usb/storage/isd200.c if ((scsi_get_resid(srb) > 0) && srb 660 drivers/usb/storage/isd200.c !((srb->cmnd[0] == REQUEST_SENSE) || srb 661 drivers/usb/storage/isd200.c (srb->cmnd[0] == INQUIRY) || srb 662 drivers/usb/storage/isd200.c (srb->cmnd[0] == MODE_SENSE) || srb 663 drivers/usb/storage/isd200.c (srb->cmnd[0] == LOG_SENSE) || srb 664 drivers/usb/storage/isd200.c (srb->cmnd[0] == MODE_SENSE_10))) { srb 676 drivers/usb/storage/isd200.c isd200_build_sense(us, srb); srb 677 drivers/usb/storage/isd200.c srb->result = SAM_STAT_CHECK_CONDITION; srb 680 drivers/usb/storage/isd200.c if ((srb->sense_buffer[2] & 0xf) == 0x0) srb 681 drivers/usb/storage/isd200.c srb->result = SAM_STAT_GOOD; srb 683 drivers/usb/storage/isd200.c srb->result = DID_ERROR << 16; srb 693 drivers/usb/storage/isd200.c srb->result = SAM_STAT_CHECK_CONDITION; srb 701 drivers/usb/storage/isd200.c srb->result = DID_ABORT << 16; srb 1219 drivers/usb/storage/isd200.c static int isd200_scsi_to_ata(struct scsi_cmnd *srb, struct us_data *us, srb 1234 drivers/usb/storage/isd200.c switch (srb->cmnd[0]) { srb 1240 drivers/usb/storage/isd200.c sizeof(info->InquiryData), srb); srb 1241 drivers/usb/storage/isd200.c srb->result = SAM_STAT_GOOD; srb 1249 drivers/usb/storage/isd200.c usb_stor_set_xfer_buf(senseData, sizeof(senseData), srb); srb 1258 drivers/usb/storage/isd200.c isd200_srb_set_bufflen(srb, 0); srb 1261 drivers/usb/storage/isd200.c srb->result = SAM_STAT_GOOD; srb 1276 drivers/usb/storage/isd200.c isd200_srb_set_bufflen(srb, 0); srb 1279 drivers/usb/storage/isd200.c srb->result = SAM_STAT_GOOD; srb 1301 drivers/usb/storage/isd200.c sizeof(readCapacityData), srb); srb 1302 drivers/usb/storage/isd200.c srb->result = SAM_STAT_GOOD; srb 1310 drivers/usb/storage/isd200.c lba = be32_to_cpu(*(__be32 *)&srb->cmnd[2]); srb 1311 drivers/usb/storage/isd200.c blockCount = (unsigned long)srb->cmnd[7]<<8 | (unsigned long)srb->cmnd[8]; srb 1342 drivers/usb/storage/isd200.c lba = be32_to_cpu(*(__be32 *)&srb->cmnd[2]); srb 1343 drivers/usb/storage/isd200.c blockCount = (unsigned long)srb->cmnd[7]<<8 | (unsigned long)srb->cmnd[8]; srb 1376 drivers/usb/storage/isd200.c srb->cmnd[4]); srb 1382 drivers/usb/storage/isd200.c ataCdb->write.CommandByte = (srb->cmnd[4] & 0x1) ? srb 1384 drivers/usb/storage/isd200.c isd200_srb_set_bufflen(srb, 0); srb 1387 drivers/usb/storage/isd200.c srb->result = SAM_STAT_GOOD; srb 1394 drivers/usb/storage/isd200.c usb_stor_dbg(us, " srb->cmnd[4] = 0x%X\n", srb->cmnd[4]); srb 1396 drivers/usb/storage/isd200.c if ((srb->cmnd[4] & 0x3) == 0x2) { srb 1403 drivers/usb/storage/isd200.c } else if ((srb->cmnd[4] & 0x3) == 0x1) { srb 1410 drivers/usb/storage/isd200.c isd200_srb_set_bufflen(srb, 0); srb 1413 drivers/usb/storage/isd200.c srb->result = SAM_STAT_GOOD; srb 1420 drivers/usb/storage/isd200.c srb->cmnd[0]); srb 1421 drivers/usb/storage/isd200.c srb->result = DID_ERROR << 16; srb 1442 drivers/usb/storage/isd200.c kfree(info->srb.sense_buffer); srb 1464 drivers/usb/storage/isd200.c info->srb.sense_buffer = kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_KERNEL); srb 1466 drivers/usb/storage/isd200.c if (!info->id || !info->RegsBuf || !info->srb.sense_buffer) { srb 1513 drivers/usb/storage/isd200.c static void isd200_ata_command(struct scsi_cmnd *srb, struct us_data *us) srb 1522 drivers/usb/storage/isd200.c srb->result = DID_ERROR << 16; srb 1526 drivers/usb/storage/isd200.c scsi_set_resid(srb, 0); srb 1528 drivers/usb/storage/isd200.c orig_bufflen = scsi_bufflen(srb); srb 1529 drivers/usb/storage/isd200.c sendToTransport = isd200_scsi_to_ata(srb, us, &ataCdb); srb 1533 drivers/usb/storage/isd200.c isd200_invoke_transport(us, srb, &ataCdb); srb 1535 drivers/usb/storage/isd200.c isd200_srb_set_bufflen(srb, orig_bufflen); srb 214 drivers/usb/storage/jumpshot.c usb_stor_access_xfer_buf(buffer, len, us->srb, srb 270 drivers/usb/storage/jumpshot.c usb_stor_access_xfer_buf(buffer, len, us->srb, srb 367 drivers/usb/storage/jumpshot.c struct scsi_cmnd * srb, srb 387 drivers/usb/storage/jumpshot.c pc = srb->cmnd[2] >> 6; srb 388 drivers/usb/storage/jumpshot.c page_code = srb->cmnd[2] & 0x3F; srb 458 drivers/usb/storage/jumpshot.c usb_stor_set_xfer_buf(ptr, i, srb); srb 474 drivers/usb/storage/jumpshot.c static int jumpshot_transport(struct scsi_cmnd *srb, struct us_data *us) srb 494 drivers/usb/storage/jumpshot.c if (srb->cmnd[0] == INQUIRY) { srb 501 drivers/usb/storage/jumpshot.c if (srb->cmnd[0] == READ_CAPACITY) { srb 519 drivers/usb/storage/jumpshot.c usb_stor_set_xfer_buf(ptr, 8, srb); srb 524 drivers/usb/storage/jumpshot.c if (srb->cmnd[0] == MODE_SELECT_10) { srb 529 drivers/usb/storage/jumpshot.c if (srb->cmnd[0] == READ_10) { srb 530 drivers/usb/storage/jumpshot.c block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) | srb 531 drivers/usb/storage/jumpshot.c ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5])); srb 533 drivers/usb/storage/jumpshot.c blocks = ((u32)(srb->cmnd[7]) << 8) | ((u32)(srb->cmnd[8])); srb 540 drivers/usb/storage/jumpshot.c if (srb->cmnd[0] == READ_12) { srb 543 drivers/usb/storage/jumpshot.c block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) | srb 544 drivers/usb/storage/jumpshot.c ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5])); srb 546 drivers/usb/storage/jumpshot.c blocks = ((u32)(srb->cmnd[6]) << 24) | ((u32)(srb->cmnd[7]) << 16) | srb 547 drivers/usb/storage/jumpshot.c ((u32)(srb->cmnd[8]) << 8) | ((u32)(srb->cmnd[9])); srb 554 drivers/usb/storage/jumpshot.c if (srb->cmnd[0] == WRITE_10) { srb 555 drivers/usb/storage/jumpshot.c block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) | srb 556 drivers/usb/storage/jumpshot.c ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5])); srb 558 drivers/usb/storage/jumpshot.c blocks = ((u32)(srb->cmnd[7]) << 8) | ((u32)(srb->cmnd[8])); srb 565 drivers/usb/storage/jumpshot.c if (srb->cmnd[0] == WRITE_12) { srb 568 drivers/usb/storage/jumpshot.c block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) | srb 569 drivers/usb/storage/jumpshot.c ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5])); srb 571 drivers/usb/storage/jumpshot.c blocks = ((u32)(srb->cmnd[6]) << 24) | ((u32)(srb->cmnd[7]) << 16) | srb 572 drivers/usb/storage/jumpshot.c ((u32)(srb->cmnd[8]) << 8) | ((u32)(srb->cmnd[9])); srb 580 drivers/usb/storage/jumpshot.c if (srb->cmnd[0] == TEST_UNIT_READY) { srb 585 drivers/usb/storage/jumpshot.c if (srb->cmnd[0] == REQUEST_SENSE) { srb 594 drivers/usb/storage/jumpshot.c usb_stor_set_xfer_buf(ptr, 18, srb); srb 599 drivers/usb/storage/jumpshot.c if (srb->cmnd[0] == MODE_SENSE) { srb 601 drivers/usb/storage/jumpshot.c return jumpshot_handle_mode_sense(us, srb, 1); srb 604 drivers/usb/storage/jumpshot.c if (srb->cmnd[0] == MODE_SENSE_10) { srb 606 drivers/usb/storage/jumpshot.c return jumpshot_handle_mode_sense(us, srb, 0); srb 609 drivers/usb/storage/jumpshot.c if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) { srb 617 drivers/usb/storage/jumpshot.c if (srb->cmnd[0] == START_STOP) { srb 630 drivers/usb/storage/jumpshot.c srb->result = SUCCESS; srb 633 drivers/usb/storage/jumpshot.c srb->result = SAM_STAT_CHECK_CONDITION; srb 639 drivers/usb/storage/jumpshot.c srb->cmnd[0], srb->cmnd[0]); srb 145 drivers/usb/storage/karma.c static int rio_karma_transport(struct scsi_cmnd *srb, struct us_data *us) srb 150 drivers/usb/storage/karma.c if (srb->cmnd[0] == READ_10 && !data->in_storage) { srb 156 drivers/usb/storage/karma.c return usb_stor_Bulk_transport(srb, us); srb 157 drivers/usb/storage/karma.c } else if (srb->cmnd[0] == START_STOP) { srb 165 drivers/usb/storage/karma.c return usb_stor_Bulk_transport(srb, us); srb 45 drivers/usb/storage/protocol.c void usb_stor_pad12_command(struct scsi_cmnd *srb, struct us_data *us) srb 54 drivers/usb/storage/protocol.c for (; srb->cmd_len < 12; srb->cmd_len++) srb 55 drivers/usb/storage/protocol.c srb->cmnd[srb->cmd_len] = 0; srb 58 drivers/usb/storage/protocol.c usb_stor_invoke_transport(srb, us); srb 61 drivers/usb/storage/protocol.c void usb_stor_ufi_command(struct scsi_cmnd *srb, struct us_data *us) srb 72 drivers/usb/storage/protocol.c for (; srb->cmd_len < 12; srb->cmd_len++) srb 73 drivers/usb/storage/protocol.c srb->cmnd[srb->cmd_len] = 0; srb 76 drivers/usb/storage/protocol.c srb->cmd_len = 12; srb 81 drivers/usb/storage/protocol.c switch (srb->cmnd[0]) { srb 85 drivers/usb/storage/protocol.c srb->cmnd[4] = 36; srb 90 drivers/usb/storage/protocol.c srb->cmnd[7] = 0; srb 91 drivers/usb/storage/protocol.c srb->cmnd[8] = 8; srb 96 drivers/usb/storage/protocol.c srb->cmnd[4] = 18; srb 101 drivers/usb/storage/protocol.c usb_stor_invoke_transport(srb, us); srb 104 drivers/usb/storage/protocol.c void usb_stor_transparent_scsi_command(struct scsi_cmnd *srb, srb 108 drivers/usb/storage/protocol.c usb_stor_invoke_transport(srb, us); srb 122 drivers/usb/storage/protocol.c unsigned int buflen, struct scsi_cmnd *srb, struct scatterlist **sgptr, srb 128 drivers/usb/storage/protocol.c unsigned int nents = scsi_sg_count(srb); srb 133 drivers/usb/storage/protocol.c sg = scsi_sglist(srb); srb 170 drivers/usb/storage/protocol.c unsigned int buflen, struct scsi_cmnd *srb) srb 175 drivers/usb/storage/protocol.c buflen = min(buflen, scsi_bufflen(srb)); srb 176 drivers/usb/storage/protocol.c buflen = usb_stor_access_xfer_buf(buffer, buflen, srb, &sg, &offset, srb 178 drivers/usb/storage/protocol.c if (buflen < scsi_bufflen(srb)) srb 179 drivers/usb/storage/protocol.c scsi_set_resid(srb, scsi_bufflen(srb) - buflen); srb 37 drivers/usb/storage/protocol.h unsigned int buflen, struct scsi_cmnd *srb, struct scatterlist **, srb 41 drivers/usb/storage/protocol.h unsigned int buflen, struct scsi_cmnd *srb); srb 117 drivers/usb/storage/realtek_cr.c #define SCSI_LUN(srb) ((srb)->device->lun) srb 786 drivers/usb/storage/realtek_cr.c static inline int working_scsi(struct scsi_cmnd *srb) srb 788 drivers/usb/storage/realtek_cr.c if ((srb->cmnd[0] == TEST_UNIT_READY) || srb 789 drivers/usb/storage/realtek_cr.c (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL)) { srb 796 drivers/usb/storage/realtek_cr.c static void rts51x_invoke_transport(struct scsi_cmnd *srb, struct us_data *us) srb 808 drivers/usb/storage/realtek_cr.c if (working_scsi(srb)) { srb 818 drivers/usb/storage/realtek_cr.c chip->proto_handler_backup(srb, us); srb 822 drivers/usb/storage/realtek_cr.c if ((srb->cmnd[0] == TEST_UNIT_READY) && srb 824 drivers/usb/storage/realtek_cr.c if (TST_LUN_READY(chip, srb->device->lun)) { srb 825 drivers/usb/storage/realtek_cr.c srb->result = SAM_STAT_GOOD; srb 827 drivers/usb/storage/realtek_cr.c srb->result = SAM_STAT_CHECK_CONDITION; srb 828 drivers/usb/storage/realtek_cr.c memcpy(srb->sense_buffer, srb 835 drivers/usb/storage/realtek_cr.c if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) { srb 836 drivers/usb/storage/realtek_cr.c int prevent = srb->cmnd[4] & 0x1; srb 838 drivers/usb/storage/realtek_cr.c srb->result = SAM_STAT_CHECK_CONDITION; srb 839 drivers/usb/storage/realtek_cr.c memcpy(srb->sense_buffer, srb 843 drivers/usb/storage/realtek_cr.c srb->result = SAM_STAT_GOOD; srb 850 drivers/usb/storage/realtek_cr.c chip->proto_handler_backup(srb, us); srb 852 drivers/usb/storage/realtek_cr.c if (srb->cmnd[0] == TEST_UNIT_READY) { srb 853 drivers/usb/storage/realtek_cr.c if (srb->result == SAM_STAT_GOOD) { srb 854 drivers/usb/storage/realtek_cr.c SET_LUN_READY(chip, srb->device->lun); srb 860 drivers/usb/storage/realtek_cr.c CLR_LUN_READY(chip, srb->device->lun); srb 366 drivers/usb/storage/scsiglue.c static int queuecommand_lck(struct scsi_cmnd *srb, srb 369 drivers/usb/storage/scsiglue.c struct us_data *us = host_to_us(srb->device->host); srb 372 drivers/usb/storage/scsiglue.c if (us->srb != NULL) { srb 374 drivers/usb/storage/scsiglue.c __func__, us->srb); srb 381 drivers/usb/storage/scsiglue.c srb->result = DID_NO_CONNECT << 16; srb 382 drivers/usb/storage/scsiglue.c done(srb); srb 387 drivers/usb/storage/scsiglue.c (srb->cmnd[0] == ATA_12 || srb->cmnd[0] == ATA_16)) { srb 388 drivers/usb/storage/scsiglue.c memcpy(srb->sense_buffer, usb_stor_sense_invalidCDB, srb 390 drivers/usb/storage/scsiglue.c srb->result = SAM_STAT_CHECK_CONDITION; srb 391 drivers/usb/storage/scsiglue.c done(srb); srb 396 drivers/usb/storage/scsiglue.c srb->scsi_done = done; srb 397 drivers/usb/storage/scsiglue.c us->srb = srb; srb 410 drivers/usb/storage/scsiglue.c static int command_abort(struct scsi_cmnd *srb) srb 412 drivers/usb/storage/scsiglue.c struct us_data *us = host_to_us(srb->device->host); srb 423 drivers/usb/storage/scsiglue.c if (us->srb != srb) { srb 452 drivers/usb/storage/scsiglue.c static int device_reset(struct scsi_cmnd *srb) srb 454 drivers/usb/storage/scsiglue.c struct us_data *us = host_to_us(srb->device->host); srb 468 drivers/usb/storage/scsiglue.c static int bus_reset(struct scsi_cmnd *srb) srb 470 drivers/usb/storage/scsiglue.c struct us_data *us = host_to_us(srb->device->host); srb 53 drivers/usb/storage/sddr09.c static int sddr09_transport(struct scsi_cmnd *srb, struct us_data *us); srb 812 drivers/usb/storage/sddr09.c usb_stor_access_xfer_buf(buffer, len, us->srb, srb 1027 drivers/usb/storage/sddr09.c usb_stor_access_xfer_buf(buffer, len, us->srb, srb 1496 drivers/usb/storage/sddr09.c static int dpcm_transport(struct scsi_cmnd *srb, struct us_data *us) srb 1500 drivers/usb/storage/sddr09.c usb_stor_dbg(us, "LUN=%d\n", (u8)srb->device->lun); srb 1502 drivers/usb/storage/sddr09.c switch (srb->device->lun) { srb 1508 drivers/usb/storage/sddr09.c ret = usb_stor_CB_transport(srb, us); srb 1520 drivers/usb/storage/sddr09.c srb->device->lun = 0; srb 1521 drivers/usb/storage/sddr09.c ret = sddr09_transport(srb, us); srb 1522 drivers/usb/storage/sddr09.c srb->device->lun = 1; srb 1526 drivers/usb/storage/sddr09.c usb_stor_dbg(us, "Invalid LUN %d\n", (u8)srb->device->lun); srb 1537 drivers/usb/storage/sddr09.c static int sddr09_transport(struct scsi_cmnd *srb, struct us_data *us) srb 1561 drivers/usb/storage/sddr09.c if (srb->cmnd[0] == REQUEST_SENSE && havefakesense) { srb 1568 drivers/usb/storage/sddr09.c usb_stor_set_xfer_buf(ptr, 18, srb); srb 1580 drivers/usb/storage/sddr09.c if (srb->cmnd[0] == INQUIRY) { srb 1586 drivers/usb/storage/sddr09.c if (srb->cmnd[0] == READ_CAPACITY) { srb 1622 drivers/usb/storage/sddr09.c usb_stor_set_xfer_buf(ptr, 8, srb); srb 1627 drivers/usb/storage/sddr09.c if (srb->cmnd[0] == MODE_SENSE_10) { srb 1628 drivers/usb/storage/sddr09.c int modepage = (srb->cmnd[2] & 0x3F); srb 1642 drivers/usb/storage/sddr09.c usb_stor_set_xfer_buf(ptr, sizeof(mode_page_01), srb); srb 1651 drivers/usb/storage/sddr09.c if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) srb 1656 drivers/usb/storage/sddr09.c if (srb->cmnd[0] == READ_10) { srb 1658 drivers/usb/storage/sddr09.c page = short_pack(srb->cmnd[3], srb->cmnd[2]); srb 1660 drivers/usb/storage/sddr09.c page |= short_pack(srb->cmnd[5], srb->cmnd[4]); srb 1661 drivers/usb/storage/sddr09.c pages = short_pack(srb->cmnd[8], srb->cmnd[7]); srb 1671 drivers/usb/storage/sddr09.c if (srb->cmnd[0] == WRITE_10) { srb 1673 drivers/usb/storage/sddr09.c page = short_pack(srb->cmnd[3], srb->cmnd[2]); srb 1675 drivers/usb/storage/sddr09.c page |= short_pack(srb->cmnd[5], srb->cmnd[4]); srb 1676 drivers/usb/storage/sddr09.c pages = short_pack(srb->cmnd[8], srb->cmnd[7]); srb 1690 drivers/usb/storage/sddr09.c if (srb->cmnd[0] != TEST_UNIT_READY && srb 1691 drivers/usb/storage/sddr09.c srb->cmnd[0] != REQUEST_SENSE) { srb 1698 drivers/usb/storage/sddr09.c for (; srb->cmd_len<12; srb->cmd_len++) srb 1699 drivers/usb/storage/sddr09.c srb->cmnd[srb->cmd_len] = 0; srb 1701 drivers/usb/storage/sddr09.c srb->cmnd[1] = LUNBITS; srb 1705 drivers/usb/storage/sddr09.c sprintf(ptr+strlen(ptr), "%02X ", srb->cmnd[i]); srb 1709 drivers/usb/storage/sddr09.c result = sddr09_send_scsi_command(us, srb->cmnd, 12); srb 1716 drivers/usb/storage/sddr09.c if (scsi_bufflen(srb) == 0) srb 1719 drivers/usb/storage/sddr09.c if (srb->sc_data_direction == DMA_TO_DEVICE || srb 1720 drivers/usb/storage/sddr09.c srb->sc_data_direction == DMA_FROM_DEVICE) { srb 1721 drivers/usb/storage/sddr09.c unsigned int pipe = (srb->sc_data_direction == DMA_TO_DEVICE) srb 1725 drivers/usb/storage/sddr09.c (srb->sc_data_direction == DMA_TO_DEVICE) ? srb 1727 drivers/usb/storage/sddr09.c scsi_bufflen(srb)); srb 1729 drivers/usb/storage/sddr09.c result = usb_stor_bulk_srb(us, pipe, srb); srb 290 drivers/usb/storage/sddr55.c usb_stor_access_xfer_buf(buffer, len, us->srb, srb 359 drivers/usb/storage/sddr55.c usb_stor_access_xfer_buf(buffer, len, us->srb, srb 775 drivers/usb/storage/sddr55.c static int sddr55_transport(struct scsi_cmnd *srb, struct us_data *us) srb 805 drivers/usb/storage/sddr55.c if (srb->cmnd[0] == REQUEST_SENSE) { srb 814 drivers/usb/storage/sddr55.c usb_stor_set_xfer_buf (ptr, sizeof info->sense_data, srb); srb 827 drivers/usb/storage/sddr55.c if (srb->cmnd[0] == INQUIRY) { srb 860 drivers/usb/storage/sddr55.c if (srb->cmnd[0] == READ_CAPACITY) { srb 888 drivers/usb/storage/sddr55.c usb_stor_set_xfer_buf(ptr, 8, srb); srb 895 drivers/usb/storage/sddr55.c if (srb->cmnd[0] == MODE_SENSE_10) { srb 899 drivers/usb/storage/sddr55.c usb_stor_set_xfer_buf(ptr, sizeof(mode_page_01), srb); srb 901 drivers/usb/storage/sddr55.c if ( (srb->cmnd[2] & 0x3F) == 0x01 ) { srb 905 drivers/usb/storage/sddr55.c } else if ( (srb->cmnd[2] & 0x3F) == 0x3F ) { srb 914 drivers/usb/storage/sddr55.c if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) { srb 917 drivers/usb/storage/sddr55.c (srb->cmnd[4]&0x03) ? "Prevent" : "Allow"); srb 923 drivers/usb/storage/sddr55.c if (srb->cmnd[0] == READ_10 || srb->cmnd[0] == WRITE_10) { srb 925 drivers/usb/storage/sddr55.c page = short_pack(srb->cmnd[3], srb->cmnd[2]); srb 927 drivers/usb/storage/sddr55.c page |= short_pack(srb->cmnd[5], srb->cmnd[4]); srb 928 drivers/usb/storage/sddr55.c pages = short_pack(srb->cmnd[8], srb->cmnd[7]); srb 951 drivers/usb/storage/sddr55.c if (srb->cmnd[0] == WRITE_10) { srb 965 drivers/usb/storage/sddr55.c if (srb->cmnd[0] == TEST_UNIT_READY) { srb 969 drivers/usb/storage/sddr55.c if (srb->cmnd[0] == START_STOP) { srb 149 drivers/usb/storage/shuttle_usbat.c static int usbat_flash_transport(struct scsi_cmnd * srb, struct us_data *us); srb 150 drivers/usb/storage/shuttle_usbat.c static int usbat_hp8200e_transport(struct scsi_cmnd *srb, struct us_data *us); srb 1180 drivers/usb/storage/shuttle_usbat.c usb_stor_access_xfer_buf(buffer, len, us->srb, srb 1256 drivers/usb/storage/shuttle_usbat.c usb_stor_access_xfer_buf(buffer, len, us->srb, srb 1291 drivers/usb/storage/shuttle_usbat.c struct scsi_cmnd *srb) srb 1300 drivers/usb/storage/shuttle_usbat.c usb_stor_dbg(us, "transfersize %d\n", srb->transfersize); srb 1302 drivers/usb/storage/shuttle_usbat.c if (scsi_bufflen(srb) < 0x10000) { srb 1309 drivers/usb/storage/shuttle_usbat.c scsi_sglist(srb), srb 1310 drivers/usb/storage/shuttle_usbat.c scsi_bufflen(srb), scsi_sg_count(srb), 1); srb 1328 drivers/usb/storage/shuttle_usbat.c srb->transfersize = scsi_bufflen(srb)/len; srb 1331 drivers/usb/storage/shuttle_usbat.c if (!srb->transfersize) { srb 1332 drivers/usb/storage/shuttle_usbat.c srb->transfersize = 2048; /* A guess */ srb 1334 drivers/usb/storage/shuttle_usbat.c srb->transfersize); srb 1343 drivers/usb/storage/shuttle_usbat.c len = (65535/srb->transfersize) * srb->transfersize; srb 1345 drivers/usb/storage/shuttle_usbat.c len = min(len, scsi_bufflen(srb)); srb 1354 drivers/usb/storage/shuttle_usbat.c while (transferred != scsi_bufflen(srb)) { srb 1356 drivers/usb/storage/shuttle_usbat.c if (len > scsi_bufflen(srb) - transferred) srb 1357 drivers/usb/storage/shuttle_usbat.c len = scsi_bufflen(srb) - transferred; srb 1370 drivers/usb/storage/shuttle_usbat.c data[7+7] = MSB_of(len / srb->transfersize); /* SCSI command */ srb 1371 drivers/usb/storage/shuttle_usbat.c data[7+8] = LSB_of(len / srb->transfersize); /* num sectors */ srb 1385 drivers/usb/storage/shuttle_usbat.c usb_stor_access_xfer_buf(buffer, len, srb, srb 1391 drivers/usb/storage/shuttle_usbat.c sector += len / srb->transfersize; srb 1552 drivers/usb/storage/shuttle_usbat.c static int usbat_hp8200e_transport(struct scsi_cmnd *srb, struct us_data *us) srb 1561 drivers/usb/storage/shuttle_usbat.c len = scsi_bufflen(srb); srb 1586 drivers/usb/storage/shuttle_usbat.c data[i] = (i-7 >= srb->cmd_len) ? 0 : srb->cmnd[i-7]; srb 1593 drivers/usb/storage/shuttle_usbat.c if (srb->cmnd[0] == TEST_UNIT_READY) srb 1596 drivers/usb/storage/shuttle_usbat.c if (srb->sc_data_direction == DMA_TO_DEVICE) { srb 1603 drivers/usb/storage/shuttle_usbat.c scsi_sglist(srb), srb 1604 drivers/usb/storage/shuttle_usbat.c len, scsi_sg_count(srb), 10); srb 1613 drivers/usb/storage/shuttle_usbat.c } else if (srb->cmnd[0] == READ_10 || srb 1614 drivers/usb/storage/shuttle_usbat.c srb->cmnd[0] == GPCMD_READ_CD) { srb 1616 drivers/usb/storage/shuttle_usbat.c return usbat_hp8200e_handle_read10(us, registers, data, srb); srb 1641 drivers/usb/storage/shuttle_usbat.c result = usbat_write_block(us, USBAT_ATA, srb->cmnd, 12, srb 1642 drivers/usb/storage/shuttle_usbat.c srb->cmnd[0] == GPCMD_BLANK ? 75 : 10, 0); srb 1649 drivers/usb/storage/shuttle_usbat.c if (len != 0 && (srb->sc_data_direction == DMA_FROM_DEVICE)) { srb 1670 drivers/usb/storage/shuttle_usbat.c result = usbat_read_block(us, scsi_sglist(srb), len, srb 1671 drivers/usb/storage/shuttle_usbat.c scsi_sg_count(srb)); srb 1680 drivers/usb/storage/shuttle_usbat.c static int usbat_flash_transport(struct scsi_cmnd * srb, struct us_data *us) srb 1690 drivers/usb/storage/shuttle_usbat.c if (srb->cmnd[0] == INQUIRY) { srb 1697 drivers/usb/storage/shuttle_usbat.c if (srb->cmnd[0] == READ_CAPACITY) { srb 1718 drivers/usb/storage/shuttle_usbat.c usb_stor_set_xfer_buf(ptr, 8, srb); srb 1723 drivers/usb/storage/shuttle_usbat.c if (srb->cmnd[0] == MODE_SELECT_10) { srb 1728 drivers/usb/storage/shuttle_usbat.c if (srb->cmnd[0] == READ_10) { srb 1729 drivers/usb/storage/shuttle_usbat.c block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) | srb 1730 drivers/usb/storage/shuttle_usbat.c ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5])); srb 1732 drivers/usb/storage/shuttle_usbat.c blocks = ((u32)(srb->cmnd[7]) << 8) | ((u32)(srb->cmnd[8])); srb 1739 drivers/usb/storage/shuttle_usbat.c if (srb->cmnd[0] == READ_12) { srb 1743 drivers/usb/storage/shuttle_usbat.c block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) | srb 1744 drivers/usb/storage/shuttle_usbat.c ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5])); srb 1746 drivers/usb/storage/shuttle_usbat.c blocks = ((u32)(srb->cmnd[6]) << 24) | ((u32)(srb->cmnd[7]) << 16) | srb 1747 drivers/usb/storage/shuttle_usbat.c ((u32)(srb->cmnd[8]) << 8) | ((u32)(srb->cmnd[9])); srb 1754 drivers/usb/storage/shuttle_usbat.c if (srb->cmnd[0] == WRITE_10) { srb 1755 drivers/usb/storage/shuttle_usbat.c block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) | srb 1756 drivers/usb/storage/shuttle_usbat.c ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5])); srb 1758 drivers/usb/storage/shuttle_usbat.c blocks = ((u32)(srb->cmnd[7]) << 8) | ((u32)(srb->cmnd[8])); srb 1765 drivers/usb/storage/shuttle_usbat.c if (srb->cmnd[0] == WRITE_12) { srb 1769 drivers/usb/storage/shuttle_usbat.c block = ((u32)(srb->cmnd[2]) << 24) | ((u32)(srb->cmnd[3]) << 16) | srb 1770 drivers/usb/storage/shuttle_usbat.c ((u32)(srb->cmnd[4]) << 8) | ((u32)(srb->cmnd[5])); srb 1772 drivers/usb/storage/shuttle_usbat.c blocks = ((u32)(srb->cmnd[6]) << 24) | ((u32)(srb->cmnd[7]) << 16) | srb 1773 drivers/usb/storage/shuttle_usbat.c ((u32)(srb->cmnd[8]) << 8) | ((u32)(srb->cmnd[9])); srb 1781 drivers/usb/storage/shuttle_usbat.c if (srb->cmnd[0] == TEST_UNIT_READY) { srb 1791 drivers/usb/storage/shuttle_usbat.c if (srb->cmnd[0] == REQUEST_SENSE) { srb 1800 drivers/usb/storage/shuttle_usbat.c usb_stor_set_xfer_buf(ptr, 18, srb); srb 1805 drivers/usb/storage/shuttle_usbat.c if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) { srb 1814 drivers/usb/storage/shuttle_usbat.c srb->cmnd[0], srb->cmnd[0]); srb 462 drivers/usb/storage/transport.c struct scsi_cmnd* srb) srb 465 drivers/usb/storage/transport.c int result = usb_stor_bulk_transfer_sglist(us, pipe, scsi_sglist(srb), srb 466 drivers/usb/storage/transport.c scsi_sg_count(srb), scsi_bufflen(srb), srb 469 drivers/usb/storage/transport.c scsi_set_resid(srb, scsi_bufflen(srb) - partial); srb 519 drivers/usb/storage/transport.c static void last_sector_hacks(struct us_data *us, struct scsi_cmnd *srb) srb 543 drivers/usb/storage/transport.c if (srb->cmnd[0] != READ_10 && srb->cmnd[0] != WRITE_10) srb 547 drivers/usb/storage/transport.c sector = (srb->cmnd[2] << 24) | (srb->cmnd[3] << 16) | srb 548 drivers/usb/storage/transport.c (srb->cmnd[4] << 8) | (srb->cmnd[5]); srb 549 drivers/usb/storage/transport.c disk = srb->request->rq_disk; srb 558 drivers/usb/storage/transport.c if (srb->result == SAM_STAT_GOOD && scsi_get_resid(srb) == 0) { srb 578 drivers/usb/storage/transport.c srb->result = SAM_STAT_CHECK_CONDITION; srb 579 drivers/usb/storage/transport.c memcpy(srb->sense_buffer, record_not_found, srb 589 drivers/usb/storage/transport.c if (srb->cmnd[0] != TEST_UNIT_READY) srb 599 drivers/usb/storage/transport.c void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us) srb 605 drivers/usb/storage/transport.c scsi_set_resid(srb, 0); srb 606 drivers/usb/storage/transport.c result = us->transport(srb, us); srb 614 drivers/usb/storage/transport.c srb->result = DID_ABORT << 16; srb 621 drivers/usb/storage/transport.c srb->result = DID_ERROR << 16; srb 627 drivers/usb/storage/transport.c srb->result = SAM_STAT_CHECK_CONDITION; srb 628 drivers/usb/storage/transport.c last_sector_hacks(us, srb); srb 632 drivers/usb/storage/transport.c srb->result = SAM_STAT_GOOD; srb 649 drivers/usb/storage/transport.c srb->sc_data_direction != DMA_FROM_DEVICE) { srb 670 drivers/usb/storage/transport.c if (unlikely((srb->cmnd[0] == ATA_16 || srb->cmnd[0] == ATA_12) && srb 674 drivers/usb/storage/transport.c !(srb->cmnd[2] & 0x20))) { srb 683 drivers/usb/storage/transport.c if ((scsi_get_resid(srb) > 0) && srb 684 drivers/usb/storage/transport.c !((srb->cmnd[0] == REQUEST_SENSE) || srb 685 drivers/usb/storage/transport.c (srb->cmnd[0] == INQUIRY) || srb 686 drivers/usb/storage/transport.c (srb->cmnd[0] == MODE_SENSE) || srb 687 drivers/usb/storage/transport.c (srb->cmnd[0] == LOG_SENSE) || srb 688 drivers/usb/storage/transport.c (srb->cmnd[0] == MODE_SENSE_10))) { srb 707 drivers/usb/storage/transport.c scsi_eh_prep_cmnd(srb, &ses, NULL, 0, sense_size); srb 712 drivers/usb/storage/transport.c srb->cmd_len = 6; srb 714 drivers/usb/storage/transport.c srb->cmd_len = 12; srb 717 drivers/usb/storage/transport.c scsi_set_resid(srb, 0); srb 718 drivers/usb/storage/transport.c temp_result = us->transport(us->srb, us); srb 721 drivers/usb/storage/transport.c scsi_eh_restore_cmnd(srb, &ses); srb 725 drivers/usb/storage/transport.c srb->result = DID_ABORT << 16; srb 759 drivers/usb/storage/transport.c srb->result = DID_ERROR << 16; srb 770 drivers/usb/storage/transport.c if (srb->sense_buffer[7] > (US_SENSE_SIZE - 8) && srb 773 drivers/usb/storage/transport.c (srb->sense_buffer[0] & 0x7C) == 0x70) { srb 783 drivers/usb/storage/transport.c srb->sense_buffer[7] + 8); srb 784 drivers/usb/storage/transport.c srb->sense_buffer[7] = (US_SENSE_SIZE - 8); srb 787 drivers/usb/storage/transport.c scsi_normalize_sense(srb->sense_buffer, SCSI_SENSE_BUFFERSIZE, srb 800 drivers/usb/storage/transport.c srb->result = SAM_STAT_CHECK_CONDITION; srb 802 drivers/usb/storage/transport.c scdd = scsi_sense_desc_find(srb->sense_buffer, srb 804 drivers/usb/storage/transport.c fm_ili = (scdd ? scdd[3] : srb->sense_buffer[2]) & 0xA0; srb 819 drivers/usb/storage/transport.c srb->result = SAM_STAT_GOOD; srb 820 drivers/usb/storage/transport.c srb->sense_buffer[0] = 0x0; srb 829 drivers/usb/storage/transport.c else if (srb->cmnd[0] == ATA_16 || srb 830 drivers/usb/storage/transport.c srb->cmnd[0] == ATA_12) { srb 840 drivers/usb/storage/transport.c srb->result = DID_ERROR << 16; srb 842 drivers/usb/storage/transport.c srb->sense_buffer[1] = HARDWARE_ERROR; srb 844 drivers/usb/storage/transport.c srb->sense_buffer[2] = HARDWARE_ERROR; srb 858 drivers/usb/storage/transport.c srb->cmnd[0] == READ_10)) { srb 859 drivers/usb/storage/transport.c if (srb->result == SAM_STAT_GOOD) { srb 873 drivers/usb/storage/transport.c srb->result = DID_IMM_RETRY << 16; srb 874 drivers/usb/storage/transport.c srb->sense_buffer[0] = 0; srb 879 drivers/usb/storage/transport.c if ((srb->result == SAM_STAT_GOOD || srb->sense_buffer[2] == 0) && srb 880 drivers/usb/storage/transport.c scsi_bufflen(srb) - scsi_get_resid(srb) < srb->underflow) srb 881 drivers/usb/storage/transport.c srb->result = DID_ERROR << 16; srb 883 drivers/usb/storage/transport.c last_sector_hacks(us, srb); srb 917 drivers/usb/storage/transport.c last_sector_hacks(us, srb); srb 945 drivers/usb/storage/transport.c int usb_stor_CB_transport(struct scsi_cmnd *srb, struct us_data *us) srb 947 drivers/usb/storage/transport.c unsigned int transfer_length = scsi_bufflen(srb); srb 957 drivers/usb/storage/transport.c memcpy(us->iobuf, srb->cmnd, srb->cmd_len); srb 961 drivers/usb/storage/transport.c us->ifnum, us->iobuf, srb->cmd_len); srb 980 drivers/usb/storage/transport.c pipe = srb->sc_data_direction == DMA_FROM_DEVICE ? srb 982 drivers/usb/storage/transport.c result = usb_stor_bulk_srb(us, pipe, srb); srb 1016 drivers/usb/storage/transport.c if (srb->cmnd[0] == REQUEST_SENSE || srb 1017 drivers/usb/storage/transport.c srb->cmnd[0] == INQUIRY) srb 1103 drivers/usb/storage/transport.c int usb_stor_Bulk_transport(struct scsi_cmnd *srb, struct us_data *us) srb 1107 drivers/usb/storage/transport.c unsigned int transfer_length = scsi_bufflen(srb); srb 1123 drivers/usb/storage/transport.c bcb->Flags = srb->sc_data_direction == DMA_FROM_DEVICE ? srb 1126 drivers/usb/storage/transport.c bcb->Lun = srb->device->lun; srb 1128 drivers/usb/storage/transport.c bcb->Lun |= srb->device->id << 4; srb 1129 drivers/usb/storage/transport.c bcb->Length = srb->cmd_len; srb 1133 drivers/usb/storage/transport.c memcpy(bcb->CDB, srb->cmnd, bcb->Length); srb 1159 drivers/usb/storage/transport.c unsigned int pipe = srb->sc_data_direction == DMA_FROM_DEVICE ? srb 1161 drivers/usb/storage/transport.c result = usb_stor_bulk_srb(us, pipe, srb); srb 1183 drivers/usb/storage/transport.c srb->sc_data_direction == DMA_FROM_DEVICE && srb 1184 drivers/usb/storage/transport.c transfer_length - scsi_get_resid(srb) == srb 1190 drivers/usb/storage/transport.c US_BULK_CS_WRAP_LEN, srb, &sg, srb 1196 drivers/usb/storage/transport.c scsi_set_resid(srb, transfer_length); srb 1278 drivers/usb/storage/transport.c scsi_get_resid(srb) == 0 && srb 1279 drivers/usb/storage/transport.c ((srb->cmnd[0] == INQUIRY && srb 1281 drivers/usb/storage/transport.c (srb->cmnd[0] == READ_CAPACITY && srb 1287 drivers/usb/storage/transport.c scsi_set_resid(srb, max(scsi_get_resid(srb), srb 1297 drivers/usb/storage/transport.c memcpy(srb->sense_buffer, srb 85 drivers/usb/storage/transport.h struct scsi_cmnd* srb); srb 294 drivers/usb/storage/usb.c usb_stor_set_xfer_buf(data, data_len, us->srb); srb 302 drivers/usb/storage/usb.c struct scsi_cmnd *srb; srb 318 drivers/usb/storage/usb.c srb = us->srb; srb 319 drivers/usb/storage/usb.c if (srb == NULL) { srb 328 drivers/usb/storage/usb.c srb->result = DID_ABORT << 16; srb 338 drivers/usb/storage/usb.c if (srb->sc_data_direction == DMA_BIDIRECTIONAL) { srb 340 drivers/usb/storage/usb.c srb->result = DID_ERROR << 16; srb 347 drivers/usb/storage/usb.c else if (srb->device->id && srb 350 drivers/usb/storage/usb.c srb->device->id, srb 351 drivers/usb/storage/usb.c srb->device->lun); srb 352 drivers/usb/storage/usb.c srb->result = DID_BAD_TARGET << 16; srb 355 drivers/usb/storage/usb.c else if (srb->device->lun > us->max_lun) { srb 357 drivers/usb/storage/usb.c srb->device->id, srb 358 drivers/usb/storage/usb.c srb->device->lun); srb 359 drivers/usb/storage/usb.c srb->result = DID_BAD_TARGET << 16; srb 366 drivers/usb/storage/usb.c else if ((srb->cmnd[0] == INQUIRY) && srb 374 drivers/usb/storage/usb.c srb->result = SAM_STAT_GOOD; srb 379 drivers/usb/storage/usb.c US_DEBUG(usb_stor_show_command(us, srb)); srb 380 drivers/usb/storage/usb.c us->proto_handler(srb, us); srb 388 drivers/usb/storage/usb.c if (srb->result == DID_ABORT << 16) { srb 391 drivers/usb/storage/usb.c srb = NULL; /* Don't call srb->scsi_done() */ srb 410 drivers/usb/storage/usb.c us->srb = NULL; srb 417 drivers/usb/storage/usb.c if (srb) { srb 419 drivers/usb/storage/usb.c srb->result); srb 420 drivers/usb/storage/usb.c srb->scsi_done(srb); srb 122 drivers/usb/storage/usb.h struct scsi_cmnd *srb; /* current srb */ srb 251 sound/soc/atmel/mchp-i2s-mcc.c u32 sra, imra, srb, imrb, pendinga, pendingb, idra = 0; srb 259 sound/soc/atmel/mchp-i2s-mcc.c regmap_read(dev->regmap, MCHP_I2SMCC_ISRB, &srb); srb 260 sound/soc/atmel/mchp-i2s-mcc.c pendingb = imrb & srb;