[SCSI] qla2xxx: Generalize iIDMA support.

In preparation for new ISP types.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>

authored by

Andrew Vasquez and committed by
James Bottomley
c76f2c01 e428924c

+9 -5
+2
drivers/scsi/qla2xxx/qla_def.h
··· 2215 #define DT_ISP5432 BIT_10 2216 #define DT_ISP_LAST (DT_ISP5432 << 1) 2217 2218 #define DT_FWI2 BIT_27 2219 #define DT_ZIO_SUPPORTED BIT_28 2220 #define DT_OEM_001 BIT_29 ··· 2240 #define IS_QLA24XX(ha) (IS_QLA2422(ha) || IS_QLA2432(ha)) 2241 #define IS_QLA54XX(ha) (IS_QLA5422(ha) || IS_QLA5432(ha)) 2242 2243 #define IS_FWI2_CAPABLE(ha) ((ha)->device_type & DT_FWI2) 2244 #define IS_ZIO_SUPPORTED(ha) ((ha)->device_type & DT_ZIO_SUPPORTED) 2245 #define IS_OEM_001(ha) ((ha)->device_type & DT_OEM_001)
··· 2215 #define DT_ISP5432 BIT_10 2216 #define DT_ISP_LAST (DT_ISP5432 << 1) 2217 2218 + #define DT_IIDMA BIT_26 2219 #define DT_FWI2 BIT_27 2220 #define DT_ZIO_SUPPORTED BIT_28 2221 #define DT_OEM_001 BIT_29 ··· 2239 #define IS_QLA24XX(ha) (IS_QLA2422(ha) || IS_QLA2432(ha)) 2240 #define IS_QLA54XX(ha) (IS_QLA5422(ha) || IS_QLA5432(ha)) 2241 2242 + #define IS_IIDMA_CAPABLE(ha) ((ha)->device_type & DT_IIDMA) 2243 #define IS_FWI2_CAPABLE(ha) ((ha)->device_type & DT_FWI2) 2244 #define IS_ZIO_SUPPORTED(ha) ((ha)->device_type & DT_ZIO_SUPPORTED) 2245 #define IS_OEM_001(ha) ((ha)->device_type & DT_OEM_001)
+2 -2
drivers/scsi/qla2xxx/qla_gs.c
··· 1678 struct ct_sns_req *ct_req; 1679 struct ct_sns_rsp *ct_rsp; 1680 1681 - if (!IS_FWI2_CAPABLE(ha)) 1682 return QLA_FUNCTION_FAILED; 1683 1684 for (i = 0; i < MAX_FIBRE_DEVICES; i++) { ··· 1786 struct ct_sns_req *ct_req; 1787 struct ct_sns_rsp *ct_rsp; 1788 1789 - if (!IS_FWI2_CAPABLE(ha)) 1790 return QLA_FUNCTION_FAILED; 1791 if (!ha->flags.gpsc_supported) 1792 return QLA_FUNCTION_FAILED;
··· 1678 struct ct_sns_req *ct_req; 1679 struct ct_sns_rsp *ct_rsp; 1680 1681 + if (!IS_IIDMA_CAPABLE(ha)) 1682 return QLA_FUNCTION_FAILED; 1683 1684 for (i = 0; i < MAX_FIBRE_DEVICES; i++) { ··· 1786 struct ct_sns_req *ct_req; 1787 struct ct_sns_rsp *ct_rsp; 1788 1789 + if (!IS_IIDMA_CAPABLE(ha)) 1790 return QLA_FUNCTION_FAILED; 1791 if (!ha->flags.gpsc_supported) 1792 return QLA_FUNCTION_FAILED;
+1 -1
drivers/scsi/qla2xxx/qla_init.c
··· 2119 int rval; 2120 uint16_t port_speed, mb[6]; 2121 2122 - if (!IS_QLA24XX(ha)) 2123 return; 2124 2125 switch (be16_to_cpu(fcport->fp_speed)) {
··· 2119 int rval; 2120 uint16_t port_speed, mb[6]; 2121 2122 + if (!IS_IIDMA_CAPABLE(ha)) 2123 return; 2124 2125 switch (be16_to_cpu(fcport->fp_speed)) {
+2 -2
drivers/scsi/qla2xxx/qla_mbx.c
··· 2552 mbx_cmd_t mc; 2553 mbx_cmd_t *mcp = &mc; 2554 2555 - if (!IS_QLA24XX(ha)) 2556 return QLA_FUNCTION_FAILED; 2557 2558 DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); ··· 2595 mbx_cmd_t mc; 2596 mbx_cmd_t *mcp = &mc; 2597 2598 - if (!IS_QLA24XX(ha)) 2599 return QLA_FUNCTION_FAILED; 2600 2601 DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no));
··· 2552 mbx_cmd_t mc; 2553 mbx_cmd_t *mcp = &mc; 2554 2555 + if (!IS_IIDMA_CAPABLE(ha)) 2556 return QLA_FUNCTION_FAILED; 2557 2558 DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); ··· 2595 mbx_cmd_t mc; 2596 mbx_cmd_t *mcp = &mc; 2597 2598 + if (!IS_IIDMA_CAPABLE(ha)) 2599 return QLA_FUNCTION_FAILED; 2600 2601 DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no));
+2
drivers/scsi/qla2xxx/qla_os.c
··· 1239 ha->device_type |= DT_ISP2422; 1240 ha->device_type |= DT_ZIO_SUPPORTED; 1241 ha->device_type |= DT_FWI2; 1242 ha->fw_srisc_address = RISC_START_ADDRESS_2400; 1243 break; 1244 case PCI_DEVICE_ID_QLOGIC_ISP2432: 1245 ha->device_type |= DT_ISP2432; 1246 ha->device_type |= DT_ZIO_SUPPORTED; 1247 ha->device_type |= DT_FWI2; 1248 ha->fw_srisc_address = RISC_START_ADDRESS_2400; 1249 break; 1250 case PCI_DEVICE_ID_QLOGIC_ISP5422:
··· 1239 ha->device_type |= DT_ISP2422; 1240 ha->device_type |= DT_ZIO_SUPPORTED; 1241 ha->device_type |= DT_FWI2; 1242 + ha->device_type |= DT_IIDMA; 1243 ha->fw_srisc_address = RISC_START_ADDRESS_2400; 1244 break; 1245 case PCI_DEVICE_ID_QLOGIC_ISP2432: 1246 ha->device_type |= DT_ISP2432; 1247 ha->device_type |= DT_ZIO_SUPPORTED; 1248 ha->device_type |= DT_FWI2; 1249 + ha->device_type |= DT_IIDMA; 1250 ha->fw_srisc_address = RISC_START_ADDRESS_2400; 1251 break; 1252 case PCI_DEVICE_ID_QLOGIC_ISP5422: