diff options
-rw-r--r-- | drivers/scsi/stex.c | 64 |
1 files changed, 3 insertions, 61 deletions
diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c index 12dc0d176f3f..425a61c79bb6 100644 --- a/drivers/scsi/stex.c +++ b/drivers/scsi/stex.c | |||
@@ -153,35 +153,6 @@ enum { | |||
153 | ST_ADDITIONAL_MEM = 0x200000, | 153 | ST_ADDITIONAL_MEM = 0x200000, |
154 | }; | 154 | }; |
155 | 155 | ||
156 | /* SCSI inquiry data */ | ||
157 | typedef struct st_inq { | ||
158 | u8 DeviceType :5; | ||
159 | u8 DeviceTypeQualifier :3; | ||
160 | u8 DeviceTypeModifier :7; | ||
161 | u8 RemovableMedia :1; | ||
162 | u8 Versions; | ||
163 | u8 ResponseDataFormat :4; | ||
164 | u8 HiSupport :1; | ||
165 | u8 NormACA :1; | ||
166 | u8 ReservedBit :1; | ||
167 | u8 AERC :1; | ||
168 | u8 AdditionalLength; | ||
169 | u8 Reserved[2]; | ||
170 | u8 SoftReset :1; | ||
171 | u8 CommandQueue :1; | ||
172 | u8 Reserved2 :1; | ||
173 | u8 LinkedCommands :1; | ||
174 | u8 Synchronous :1; | ||
175 | u8 Wide16Bit :1; | ||
176 | u8 Wide32Bit :1; | ||
177 | u8 RelativeAddressing :1; | ||
178 | u8 VendorId[8]; | ||
179 | u8 ProductId[16]; | ||
180 | u8 ProductRevisionLevel[4]; | ||
181 | u8 VendorSpecific[20]; | ||
182 | u8 Reserved3[40]; | ||
183 | } ST_INQ; | ||
184 | |||
185 | struct st_sgitem { | 156 | struct st_sgitem { |
186 | u8 ctrl; /* SG_CF_xxx */ | 157 | u8 ctrl; /* SG_CF_xxx */ |
187 | u8 reserved[3]; | 158 | u8 reserved[3]; |
@@ -285,7 +256,7 @@ struct st_drvver { | |||
285 | #define MU_REQ_BUFFER_SIZE (MU_REQ_COUNT * sizeof(struct req_msg)) | 256 | #define MU_REQ_BUFFER_SIZE (MU_REQ_COUNT * sizeof(struct req_msg)) |
286 | #define MU_STATUS_BUFFER_SIZE (MU_STATUS_COUNT * sizeof(struct status_msg)) | 257 | #define MU_STATUS_BUFFER_SIZE (MU_STATUS_COUNT * sizeof(struct status_msg)) |
287 | #define MU_BUFFER_SIZE (MU_REQ_BUFFER_SIZE + MU_STATUS_BUFFER_SIZE) | 258 | #define MU_BUFFER_SIZE (MU_REQ_BUFFER_SIZE + MU_STATUS_BUFFER_SIZE) |
288 | #define STEX_EXTRA_SIZE max(sizeof(struct st_frame), sizeof(ST_INQ)) | 259 | #define STEX_EXTRA_SIZE sizeof(struct st_frame) |
289 | #define STEX_BUFFER_SIZE (MU_BUFFER_SIZE + STEX_EXTRA_SIZE) | 260 | #define STEX_BUFFER_SIZE (MU_BUFFER_SIZE + STEX_EXTRA_SIZE) |
290 | 261 | ||
291 | struct st_ccb { | 262 | struct st_ccb { |
@@ -662,24 +633,6 @@ static void stex_ys_commands(struct st_hba *hba, | |||
662 | resp->scsi_status != SAM_STAT_CHECK_CONDITION) { | 633 | resp->scsi_status != SAM_STAT_CHECK_CONDITION) { |
663 | scsi_set_resid(ccb->cmd, scsi_bufflen(ccb->cmd) - | 634 | scsi_set_resid(ccb->cmd, scsi_bufflen(ccb->cmd) - |
664 | le32_to_cpu(*(__le32 *)&resp->variable[0])); | 635 | le32_to_cpu(*(__le32 *)&resp->variable[0])); |
665 | return; | ||
666 | } | ||
667 | |||
668 | if (resp->srb_status != 0) | ||
669 | return; | ||
670 | |||
671 | /* determine inquiry command status by DeviceTypeQualifier */ | ||
672 | if (ccb->cmd->cmnd[0] == INQUIRY && | ||
673 | resp->scsi_status == SAM_STAT_GOOD) { | ||
674 | ST_INQ *inq_data; | ||
675 | |||
676 | scsi_sg_copy_to_buffer(ccb->cmd, hba->copy_buffer, | ||
677 | STEX_EXTRA_SIZE); | ||
678 | inq_data = (ST_INQ *)hba->copy_buffer; | ||
679 | if (inq_data->DeviceTypeQualifier != 0) | ||
680 | ccb->srb_status = SRB_STATUS_SELECTION_TIMEOUT; | ||
681 | else | ||
682 | ccb->srb_status = SRB_STATUS_SUCCESS; | ||
683 | } | 636 | } |
684 | } | 637 | } |
685 | 638 | ||
@@ -1148,7 +1101,7 @@ stex_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1148 | host->max_lun = 8; | 1101 | host->max_lun = 8; |
1149 | host->max_id = 16 + 1; | 1102 | host->max_id = 16 + 1; |
1150 | } else if (hba->cardtype == st_yosemite) { | 1103 | } else if (hba->cardtype == st_yosemite) { |
1151 | host->max_lun = 128; | 1104 | host->max_lun = 256; |
1152 | host->max_id = 1 + 1; | 1105 | host->max_id = 1 + 1; |
1153 | } else { | 1106 | } else { |
1154 | /* st_vsc , st_vsc1 and st_seq */ | 1107 | /* st_vsc , st_vsc1 and st_seq */ |
@@ -1301,18 +1254,7 @@ static struct pci_device_id stex_pci_tbl[] = { | |||
1301 | { 0x105a, 0x7250, PCI_ANY_ID, PCI_ANY_ID, 0, 0, st_vsc }, | 1254 | { 0x105a, 0x7250, PCI_ANY_ID, PCI_ANY_ID, 0, 0, st_vsc }, |
1302 | 1255 | ||
1303 | /* st_yosemite */ | 1256 | /* st_yosemite */ |
1304 | { 0x105a, 0x8650, PCI_ANY_ID, 0x4600, 0, 0, | 1257 | { 0x105a, 0x8650, PCI_ANY_ID, PCI_ANY_ID, 0, 0, st_yosemite }, |
1305 | st_yosemite }, /* SuperTrak EX4650 */ | ||
1306 | { 0x105a, 0x8650, PCI_ANY_ID, 0x4610, 0, 0, | ||
1307 | st_yosemite }, /* SuperTrak EX4650o */ | ||
1308 | { 0x105a, 0x8650, PCI_ANY_ID, 0x8600, 0, 0, | ||
1309 | st_yosemite }, /* SuperTrak EX8650EL */ | ||
1310 | { 0x105a, 0x8650, PCI_ANY_ID, 0x8601, 0, 0, | ||
1311 | st_yosemite }, /* SuperTrak EX8650 */ | ||
1312 | { 0x105a, 0x8650, PCI_ANY_ID, 0x8602, 0, 0, | ||
1313 | st_yosemite }, /* SuperTrak EX8654 */ | ||
1314 | { 0x105a, 0x8650, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
1315 | st_yosemite }, /* generic st_yosemite */ | ||
1316 | 1258 | ||
1317 | /* st_seq */ | 1259 | /* st_seq */ |
1318 | { 0x105a, 0x3360, PCI_ANY_ID, PCI_ANY_ID, 0, 0, st_seq }, | 1260 | { 0x105a, 0x3360, PCI_ANY_ID, PCI_ANY_ID, 0, 0, st_seq }, |