Lines Matching refs:srb

418 					tw_dev->srb[request_id]->sense_buffer[0] = (0x1 << 7 | 0x70);  in tw_decode_sense()
421 tw_dev->srb[request_id]->sense_buffer[2] = tw_sense_table[i][1]; in tw_decode_sense()
424 tw_dev->srb[request_id]->sense_buffer[7] = 0xa; /* 10 bytes */ in tw_decode_sense()
427 tw_dev->srb[request_id]->sense_buffer[12] = tw_sense_table[i][2]; in tw_decode_sense()
430 tw_dev->srb[request_id]->sense_buffer[13] = tw_sense_table[i][3]; in tw_decode_sense()
432 tw_dev->srb[request_id]->result = (DID_OK << 16) | SAM_STAT_CHECK_CONDITION; in tw_decode_sense()
597 tw_dev->srb[request_id] = NULL; /* Flag internal command */ in tw_aen_read_queue()
959 tw_dev->srb[request_id] = NULL; in tw_chrdev_ioctl()
1164 tw_dev->srb[request_id]->result = (DID_OK << 16); in tw_setfeature()
1165 scsi_done(tw_dev->srb[request_id]); in tw_setfeature()
1291 struct scsi_cmnd *srb; in tw_reset_device_extension() local
1306 srb = tw_dev->srb[i]; in tw_reset_device_extension()
1307 if (srb != NULL) { in tw_reset_device_extension()
1308 srb->result = (DID_RESET << 16); in tw_reset_device_extension()
1309 scsi_dma_unmap(srb); in tw_reset_device_extension()
1310 scsi_done(srb); in tw_reset_device_extension()
1454 scsi_sg_copy_from_buffer(tw_dev->srb[request_id], data, len); in tw_transfer_internal()
1472 sprintf(&request_buffer[16], "Logical Disk %-2d ", tw_dev->srb[request_id]->device->id); in tw_scsiop_inquiry_complete()
1484 if (is_unit_present[tw_dev->srb[request_id]->device->id] & TW_UNIT_ONLINE) { in tw_scsiop_inquiry_complete()
1485 tw_dev->is_unit_present[tw_dev->srb[request_id]->device->id] = 1; in tw_scsiop_inquiry_complete()
1487 tw_dev->is_unit_present[tw_dev->srb[request_id]->device->id] = 0; in tw_scsiop_inquiry_complete()
1488 tw_dev->srb[request_id]->result = (DID_BAD_TARGET << 16); in tw_scsiop_inquiry_complete()
1506 if (tw_dev->srb[request_id]->cmnd[2] != 0x8) { in tw_scsiop_mode_sense()
1509 tw_dev->srb[request_id]->result = (DID_OK << 16); in tw_scsiop_mode_sense()
1510 scsi_done(tw_dev->srb[request_id]); in tw_scsiop_mode_sense()
1538 param->table_id = TW_UNIT_INFORMATION_TABLE_BASE + tw_dev->srb[request_id]->device->id; in tw_scsiop_mode_sense()
1615 command_packet->unit__hostid = TW_UNITHOST_IN(0, tw_dev->srb[request_id]->device->id); in tw_scsiop_read_capacity()
1628 tw_dev->srb[request_id]->device->id; in tw_scsiop_read_capacity()
1701 struct scsi_cmnd *srb; in tw_scsiop_read_write() local
1706 srb = tw_dev->srb[request_id]; in tw_scsiop_read_write()
1708 sglist = scsi_sglist(srb); in tw_scsiop_read_write()
1721 if (srb->cmnd[0] == READ_6 || srb->cmnd[0] == READ_10) { in tw_scsiop_read_write()
1729 command_packet->unit__hostid = TW_UNITHOST_IN(0, srb->device->id); in tw_scsiop_read_write()
1733 if (srb->cmnd[0] == WRITE_10) { in tw_scsiop_read_write()
1734 if ((srb->cmnd[1] & 0x8) || (srb->cmnd[1] & 0x10)) in tw_scsiop_read_write()
1738 if (srb->cmnd[0] == READ_6 || srb->cmnd[0] == WRITE_6) { in tw_scsiop_read_write()
1739 lba = ((u32)srb->cmnd[1] << 16) | ((u32)srb->cmnd[2] << 8) | (u32)srb->cmnd[3]; in tw_scsiop_read_write()
1740 num_sectors = (u32)srb->cmnd[4]; in tw_scsiop_read_write()
1742 …lba = ((u32)srb->cmnd[2] << 24) | ((u32)srb->cmnd[3] << 16) | ((u32)srb->cmnd[4] << 8) | (u32)srb-… in tw_scsiop_read_write()
1743 num_sectors = (u32)srb->cmnd[8] | ((u32)srb->cmnd[7] << 8); in tw_scsiop_read_write()
1755 use_sg = scsi_dma_map(srb); in tw_scsiop_read_write()
1759 scsi_for_each_sg(tw_dev->srb[request_id], sg, use_sg, i) { in tw_scsiop_read_write()
1766 tw_dev->sgl_entries = scsi_sg_count(tw_dev->srb[request_id]); in tw_scsiop_read_write()
1800 tw_dev->srb[request_id]->result = (DID_ERROR << 16); in tw_scsiop_request_sense()
1801 scsi_done(tw_dev->srb[request_id]); in tw_scsiop_request_sense()
1826 command_packet->unit__hostid = TW_UNITHOST_IN(0, tw_dev->srb[request_id]->device->id); in tw_scsiop_synchronize_cache()
1911 if (is_unit_present[tw_dev->srb[request_id]->device->id] & TW_UNIT_ONLINE) { in tw_scsiop_test_unit_ready_complete()
1912 tw_dev->is_unit_present[tw_dev->srb[request_id]->device->id] = 1; in tw_scsiop_test_unit_ready_complete()
1914 tw_dev->is_unit_present[tw_dev->srb[request_id]->device->id] = 0; in tw_scsiop_test_unit_ready_complete()
1915 tw_dev->srb[request_id]->result = (DID_BAD_TARGET << 16); in tw_scsiop_test_unit_ready_complete()
1939 tw_dev->srb[request_id] = SCpnt; in tw_scsi_queue_lck()
2090 if (tw_dev->srb[request_id] == NULL) { in DEF_SCSI_QCMD()
2099 if (tw_dev->srb[request_id] != NULL) { in DEF_SCSI_QCMD()
2108 if (tw_dev->srb[request_id] == NULL) { in DEF_SCSI_QCMD()
2121 switch (tw_dev->srb[request_id]->cmnd[0]) { in DEF_SCSI_QCMD()
2156 tw_dev->srb[request_id]->result = (DID_OK << 16); in DEF_SCSI_QCMD()
2162 tw_dev->srb[request_id]->result = (DID_OK << 16) | SAM_STAT_CHECK_CONDITION; in DEF_SCSI_QCMD()
2167 scsi_dma_unmap(tw_dev->srb[request_id]); in DEF_SCSI_QCMD()
2168 scsi_done(tw_dev->srb[request_id]); in DEF_SCSI_QCMD()