diff options
author | andrew.vasquez@qlogic.com <andrew.vasquez@qlogic.com> | 2006-03-09 17:27:08 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-03-12 10:37:24 -0500 |
commit | ea5b6382fde00e0dbcd0de2e4aa2fd15705e5fc3 (patch) | |
tree | 0ab005b73710821d916773c5d40eb3cfe69d84b1 /drivers/scsi/qla2xxx/qla_os.c | |
parent | 93f56089898a1b27fc0c89b5c1c748291353f679 (diff) |
[SCSI] qla2xxx: Convert IS_QLA*() defines to bit-operations.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 43ca0d8ca384..757c4c43c453 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -1146,6 +1146,52 @@ qla2x00_config_dma_addressing(scsi_qla_host_t *ha) | |||
1146 | pci_set_consistent_dma_mask(ha->pdev, DMA_32BIT_MASK); | 1146 | pci_set_consistent_dma_mask(ha->pdev, DMA_32BIT_MASK); |
1147 | } | 1147 | } |
1148 | 1148 | ||
1149 | static inline void | ||
1150 | qla2x00_set_isp_flags(scsi_qla_host_t *ha) | ||
1151 | { | ||
1152 | ha->device_type = DT_EXTENDED_IDS; | ||
1153 | switch (ha->pdev->device) { | ||
1154 | case PCI_DEVICE_ID_QLOGIC_ISP2100: | ||
1155 | ha->device_type |= DT_ISP2100; | ||
1156 | ha->device_type &= ~DT_EXTENDED_IDS; | ||
1157 | break; | ||
1158 | case PCI_DEVICE_ID_QLOGIC_ISP2200: | ||
1159 | ha->device_type |= DT_ISP2200; | ||
1160 | ha->device_type &= ~DT_EXTENDED_IDS; | ||
1161 | break; | ||
1162 | case PCI_DEVICE_ID_QLOGIC_ISP2300: | ||
1163 | ha->device_type |= DT_ISP2300; | ||
1164 | break; | ||
1165 | case PCI_DEVICE_ID_QLOGIC_ISP2312: | ||
1166 | ha->device_type |= DT_ISP2312; | ||
1167 | break; | ||
1168 | case PCI_DEVICE_ID_QLOGIC_ISP2322: | ||
1169 | ha->device_type |= DT_ISP2322; | ||
1170 | if (ha->pdev->subsystem_vendor == 0x1028 && | ||
1171 | ha->pdev->subsystem_device == 0x0170) | ||
1172 | ha->device_type |= DT_OEM_001; | ||
1173 | break; | ||
1174 | case PCI_DEVICE_ID_QLOGIC_ISP6312: | ||
1175 | ha->device_type |= DT_ISP6312; | ||
1176 | break; | ||
1177 | case PCI_DEVICE_ID_QLOGIC_ISP6322: | ||
1178 | ha->device_type |= DT_ISP6322; | ||
1179 | break; | ||
1180 | case PCI_DEVICE_ID_QLOGIC_ISP2422: | ||
1181 | ha->device_type |= DT_ISP2422; | ||
1182 | break; | ||
1183 | case PCI_DEVICE_ID_QLOGIC_ISP2432: | ||
1184 | ha->device_type |= DT_ISP2432; | ||
1185 | break; | ||
1186 | case PCI_DEVICE_ID_QLOGIC_ISP2512: | ||
1187 | ha->device_type |= DT_ISP2512; | ||
1188 | break; | ||
1189 | case PCI_DEVICE_ID_QLOGIC_ISP2522: | ||
1190 | ha->device_type |= DT_ISP2522; | ||
1191 | break; | ||
1192 | } | ||
1193 | } | ||
1194 | |||
1149 | static int | 1195 | static int |
1150 | qla2x00_iospace_config(scsi_qla_host_t *ha) | 1196 | qla2x00_iospace_config(scsi_qla_host_t *ha) |
1151 | { | 1197 | { |
@@ -1307,6 +1353,9 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info) | |||
1307 | ha->brd_info = brd_info; | 1353 | ha->brd_info = brd_info; |
1308 | sprintf(ha->host_str, "%s_%ld", ha->brd_info->drv_name, ha->host_no); | 1354 | sprintf(ha->host_str, "%s_%ld", ha->brd_info->drv_name, ha->host_no); |
1309 | 1355 | ||
1356 | /* Set ISP-type information. */ | ||
1357 | qla2x00_set_isp_flags(ha); | ||
1358 | |||
1310 | /* Configure PCI I/O space */ | 1359 | /* Configure PCI I/O space */ |
1311 | ret = qla2x00_iospace_config(ha); | 1360 | ret = qla2x00_iospace_config(ha); |
1312 | if (ret) | 1361 | if (ret) |