aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_os.c
diff options
context:
space:
mode:
authorandrew.vasquez@qlogic.com <andrew.vasquez@qlogic.com>2006-03-09 14:27:08 -0800
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-03-12 09:37:24 -0600
commitea5b6382fde00e0dbcd0de2e4aa2fd15705e5fc3 (patch)
tree0ab005b73710821d916773c5d40eb3cfe69d84b1 /drivers/scsi/qla2xxx/qla_os.c
parent93f56089898a1b27fc0c89b5c1c748291353f679 (diff)
downloadkernel_samsung_espresso10-ea5b6382fde00e0dbcd0de2e4aa2fd15705e5fc3.zip
kernel_samsung_espresso10-ea5b6382fde00e0dbcd0de2e4aa2fd15705e5fc3.tar.gz
kernel_samsung_espresso10-ea5b6382fde00e0dbcd0de2e4aa2fd15705e5fc3.tar.bz2
[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.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 43ca0d8..757c4c4 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)
pci_set_consistent_dma_mask(ha->pdev, DMA_32BIT_MASK);
}
+static inline void
+qla2x00_set_isp_flags(scsi_qla_host_t *ha)
+{
+ ha->device_type = DT_EXTENDED_IDS;
+ switch (ha->pdev->device) {
+ case PCI_DEVICE_ID_QLOGIC_ISP2100:
+ ha->device_type |= DT_ISP2100;
+ ha->device_type &= ~DT_EXTENDED_IDS;
+ break;
+ case PCI_DEVICE_ID_QLOGIC_ISP2200:
+ ha->device_type |= DT_ISP2200;
+ ha->device_type &= ~DT_EXTENDED_IDS;
+ break;
+ case PCI_DEVICE_ID_QLOGIC_ISP2300:
+ ha->device_type |= DT_ISP2300;
+ break;
+ case PCI_DEVICE_ID_QLOGIC_ISP2312:
+ ha->device_type |= DT_ISP2312;
+ break;
+ case PCI_DEVICE_ID_QLOGIC_ISP2322:
+ ha->device_type |= DT_ISP2322;
+ if (ha->pdev->subsystem_vendor == 0x1028 &&
+ ha->pdev->subsystem_device == 0x0170)
+ ha->device_type |= DT_OEM_001;
+ break;
+ case PCI_DEVICE_ID_QLOGIC_ISP6312:
+ ha->device_type |= DT_ISP6312;
+ break;
+ case PCI_DEVICE_ID_QLOGIC_ISP6322:
+ ha->device_type |= DT_ISP6322;
+ break;
+ case PCI_DEVICE_ID_QLOGIC_ISP2422:
+ ha->device_type |= DT_ISP2422;
+ break;
+ case PCI_DEVICE_ID_QLOGIC_ISP2432:
+ ha->device_type |= DT_ISP2432;
+ break;
+ case PCI_DEVICE_ID_QLOGIC_ISP2512:
+ ha->device_type |= DT_ISP2512;
+ break;
+ case PCI_DEVICE_ID_QLOGIC_ISP2522:
+ ha->device_type |= DT_ISP2522;
+ break;
+ }
+}
+
static int
qla2x00_iospace_config(scsi_qla_host_t *ha)
{
@@ -1307,6 +1353,9 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info)
ha->brd_info = brd_info;
sprintf(ha->host_str, "%s_%ld", ha->brd_info->drv_name, ha->host_no);
+ /* Set ISP-type information. */
+ qla2x00_set_isp_flags(ha);
+
/* Configure PCI I/O space */
ret = qla2x00_iospace_config(ha);
if (ret)