diff options
author | Joe Carnuccio <joe.carnuccio@qlogic.com> | 2016-07-06 11:14:31 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-07-15 15:35:50 -0400 |
commit | 9e052e2d4f5fe5a6f5f6d5153dd3075160fa8fcb (patch) | |
tree | 2c702f1ff47dd38a687019c245874a6542a74ee3 /drivers/scsi | |
parent | ef55e5133c3120ec07434b16d09a7c7f026d8c80 (diff) |
qla2xxx: Separate ISP type bits out from device type.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_def.h | 6 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 44 |
2 files changed, 26 insertions, 24 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index c04d83e6a8b6..ae4a74756128 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
@@ -3130,7 +3130,7 @@ struct qla_hw_data { | |||
3130 | #define PCI_DEVICE_ID_QLOGIC_ISP2271 0x2271 | 3130 | #define PCI_DEVICE_ID_QLOGIC_ISP2271 0x2271 |
3131 | #define PCI_DEVICE_ID_QLOGIC_ISP2261 0x2261 | 3131 | #define PCI_DEVICE_ID_QLOGIC_ISP2261 0x2261 |
3132 | 3132 | ||
3133 | uint32_t device_type; | 3133 | uint32_t isp_type; |
3134 | #define DT_ISP2100 BIT_0 | 3134 | #define DT_ISP2100 BIT_0 |
3135 | #define DT_ISP2200 BIT_1 | 3135 | #define DT_ISP2200 BIT_1 |
3136 | #define DT_ISP2300 BIT_2 | 3136 | #define DT_ISP2300 BIT_2 |
@@ -3155,6 +3155,7 @@ struct qla_hw_data { | |||
3155 | #define DT_ISP2261 BIT_21 | 3155 | #define DT_ISP2261 BIT_21 |
3156 | #define DT_ISP_LAST (DT_ISP2261 << 1) | 3156 | #define DT_ISP_LAST (DT_ISP2261 << 1) |
3157 | 3157 | ||
3158 | uint32_t device_type; | ||
3158 | #define DT_T10_PI BIT_25 | 3159 | #define DT_T10_PI BIT_25 |
3159 | #define DT_IIDMA BIT_26 | 3160 | #define DT_IIDMA BIT_26 |
3160 | #define DT_FWI2 BIT_27 | 3161 | #define DT_FWI2 BIT_27 |
@@ -3162,7 +3163,8 @@ struct qla_hw_data { | |||
3162 | #define DT_OEM_001 BIT_29 | 3163 | #define DT_OEM_001 BIT_29 |
3163 | #define DT_ISP2200A BIT_30 | 3164 | #define DT_ISP2200A BIT_30 |
3164 | #define DT_EXTENDED_IDS BIT_31 | 3165 | #define DT_EXTENDED_IDS BIT_31 |
3165 | #define DT_MASK(ha) ((ha)->device_type & (DT_ISP_LAST - 1)) | 3166 | |
3167 | #define DT_MASK(ha) ((ha)->isp_type & (DT_ISP_LAST - 1)) | ||
3166 | #define IS_QLA2100(ha) (DT_MASK(ha) & DT_ISP2100) | 3168 | #define IS_QLA2100(ha) (DT_MASK(ha) & DT_ISP2100) |
3167 | #define IS_QLA2200(ha) (DT_MASK(ha) & DT_ISP2200) | 3169 | #define IS_QLA2200(ha) (DT_MASK(ha) & DT_ISP2200) |
3168 | #define IS_QLA2300(ha) (DT_MASK(ha) & DT_ISP2300) | 3170 | #define IS_QLA2300(ha) (DT_MASK(ha) & DT_ISP2300) |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index fde7ee17ed85..dc7e58315870 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -2110,27 +2110,27 @@ qla2x00_set_isp_flags(struct qla_hw_data *ha) | |||
2110 | ha->device_type = DT_EXTENDED_IDS; | 2110 | ha->device_type = DT_EXTENDED_IDS; |
2111 | switch (ha->pdev->device) { | 2111 | switch (ha->pdev->device) { |
2112 | case PCI_DEVICE_ID_QLOGIC_ISP2100: | 2112 | case PCI_DEVICE_ID_QLOGIC_ISP2100: |
2113 | ha->device_type |= DT_ISP2100; | 2113 | ha->isp_type |= DT_ISP2100; |
2114 | ha->device_type &= ~DT_EXTENDED_IDS; | 2114 | ha->device_type &= ~DT_EXTENDED_IDS; |
2115 | ha->fw_srisc_address = RISC_START_ADDRESS_2100; | 2115 | ha->fw_srisc_address = RISC_START_ADDRESS_2100; |
2116 | break; | 2116 | break; |
2117 | case PCI_DEVICE_ID_QLOGIC_ISP2200: | 2117 | case PCI_DEVICE_ID_QLOGIC_ISP2200: |
2118 | ha->device_type |= DT_ISP2200; | 2118 | ha->isp_type |= DT_ISP2200; |
2119 | ha->device_type &= ~DT_EXTENDED_IDS; | 2119 | ha->device_type &= ~DT_EXTENDED_IDS; |
2120 | ha->fw_srisc_address = RISC_START_ADDRESS_2100; | 2120 | ha->fw_srisc_address = RISC_START_ADDRESS_2100; |
2121 | break; | 2121 | break; |
2122 | case PCI_DEVICE_ID_QLOGIC_ISP2300: | 2122 | case PCI_DEVICE_ID_QLOGIC_ISP2300: |
2123 | ha->device_type |= DT_ISP2300; | 2123 | ha->isp_type |= DT_ISP2300; |
2124 | ha->device_type |= DT_ZIO_SUPPORTED; | 2124 | ha->device_type |= DT_ZIO_SUPPORTED; |
2125 | ha->fw_srisc_address = RISC_START_ADDRESS_2300; | 2125 | ha->fw_srisc_address = RISC_START_ADDRESS_2300; |
2126 | break; | 2126 | break; |
2127 | case PCI_DEVICE_ID_QLOGIC_ISP2312: | 2127 | case PCI_DEVICE_ID_QLOGIC_ISP2312: |
2128 | ha->device_type |= DT_ISP2312; | 2128 | ha->isp_type |= DT_ISP2312; |
2129 | ha->device_type |= DT_ZIO_SUPPORTED; | 2129 | ha->device_type |= DT_ZIO_SUPPORTED; |
2130 | ha->fw_srisc_address = RISC_START_ADDRESS_2300; | 2130 | ha->fw_srisc_address = RISC_START_ADDRESS_2300; |
2131 | break; | 2131 | break; |
2132 | case PCI_DEVICE_ID_QLOGIC_ISP2322: | 2132 | case PCI_DEVICE_ID_QLOGIC_ISP2322: |
2133 | ha->device_type |= DT_ISP2322; | 2133 | ha->isp_type |= DT_ISP2322; |
2134 | ha->device_type |= DT_ZIO_SUPPORTED; | 2134 | ha->device_type |= DT_ZIO_SUPPORTED; |
2135 | if (ha->pdev->subsystem_vendor == 0x1028 && | 2135 | if (ha->pdev->subsystem_vendor == 0x1028 && |
2136 | ha->pdev->subsystem_device == 0x0170) | 2136 | ha->pdev->subsystem_device == 0x0170) |
@@ -2138,60 +2138,60 @@ qla2x00_set_isp_flags(struct qla_hw_data *ha) | |||
2138 | ha->fw_srisc_address = RISC_START_ADDRESS_2300; | 2138 | ha->fw_srisc_address = RISC_START_ADDRESS_2300; |
2139 | break; | 2139 | break; |
2140 | case PCI_DEVICE_ID_QLOGIC_ISP6312: | 2140 | case PCI_DEVICE_ID_QLOGIC_ISP6312: |
2141 | ha->device_type |= DT_ISP6312; | 2141 | ha->isp_type |= DT_ISP6312; |
2142 | ha->fw_srisc_address = RISC_START_ADDRESS_2300; | 2142 | ha->fw_srisc_address = RISC_START_ADDRESS_2300; |
2143 | break; | 2143 | break; |
2144 | case PCI_DEVICE_ID_QLOGIC_ISP6322: | 2144 | case PCI_DEVICE_ID_QLOGIC_ISP6322: |
2145 | ha->device_type |= DT_ISP6322; | 2145 | ha->isp_type |= DT_ISP6322; |
2146 | ha->fw_srisc_address = RISC_START_ADDRESS_2300; | 2146 | ha->fw_srisc_address = RISC_START_ADDRESS_2300; |
2147 | break; | 2147 | break; |
2148 | case PCI_DEVICE_ID_QLOGIC_ISP2422: | 2148 | case PCI_DEVICE_ID_QLOGIC_ISP2422: |
2149 | ha->device_type |= DT_ISP2422; | 2149 | ha->isp_type |= DT_ISP2422; |
2150 | ha->device_type |= DT_ZIO_SUPPORTED; | 2150 | ha->device_type |= DT_ZIO_SUPPORTED; |
2151 | ha->device_type |= DT_FWI2; | 2151 | ha->device_type |= DT_FWI2; |
2152 | ha->device_type |= DT_IIDMA; | 2152 | ha->device_type |= DT_IIDMA; |
2153 | ha->fw_srisc_address = RISC_START_ADDRESS_2400; | 2153 | ha->fw_srisc_address = RISC_START_ADDRESS_2400; |
2154 | break; | 2154 | break; |
2155 | case PCI_DEVICE_ID_QLOGIC_ISP2432: | 2155 | case PCI_DEVICE_ID_QLOGIC_ISP2432: |
2156 | ha->device_type |= DT_ISP2432; | 2156 | ha->isp_type |= DT_ISP2432; |
2157 | ha->device_type |= DT_ZIO_SUPPORTED; | 2157 | ha->device_type |= DT_ZIO_SUPPORTED; |
2158 | ha->device_type |= DT_FWI2; | 2158 | ha->device_type |= DT_FWI2; |
2159 | ha->device_type |= DT_IIDMA; | 2159 | ha->device_type |= DT_IIDMA; |
2160 | ha->fw_srisc_address = RISC_START_ADDRESS_2400; | 2160 | ha->fw_srisc_address = RISC_START_ADDRESS_2400; |
2161 | break; | 2161 | break; |
2162 | case PCI_DEVICE_ID_QLOGIC_ISP8432: | 2162 | case PCI_DEVICE_ID_QLOGIC_ISP8432: |
2163 | ha->device_type |= DT_ISP8432; | 2163 | ha->isp_type |= DT_ISP8432; |
2164 | ha->device_type |= DT_ZIO_SUPPORTED; | 2164 | ha->device_type |= DT_ZIO_SUPPORTED; |
2165 | ha->device_type |= DT_FWI2; | 2165 | ha->device_type |= DT_FWI2; |
2166 | ha->device_type |= DT_IIDMA; | 2166 | ha->device_type |= DT_IIDMA; |
2167 | ha->fw_srisc_address = RISC_START_ADDRESS_2400; | 2167 | ha->fw_srisc_address = RISC_START_ADDRESS_2400; |
2168 | break; | 2168 | break; |
2169 | case PCI_DEVICE_ID_QLOGIC_ISP5422: | 2169 | case PCI_DEVICE_ID_QLOGIC_ISP5422: |
2170 | ha->device_type |= DT_ISP5422; | 2170 | ha->isp_type |= DT_ISP5422; |
2171 | ha->device_type |= DT_FWI2; | 2171 | ha->device_type |= DT_FWI2; |
2172 | ha->fw_srisc_address = RISC_START_ADDRESS_2400; | 2172 | ha->fw_srisc_address = RISC_START_ADDRESS_2400; |
2173 | break; | 2173 | break; |
2174 | case PCI_DEVICE_ID_QLOGIC_ISP5432: | 2174 | case PCI_DEVICE_ID_QLOGIC_ISP5432: |
2175 | ha->device_type |= DT_ISP5432; | 2175 | ha->isp_type |= DT_ISP5432; |
2176 | ha->device_type |= DT_FWI2; | 2176 | ha->device_type |= DT_FWI2; |
2177 | ha->fw_srisc_address = RISC_START_ADDRESS_2400; | 2177 | ha->fw_srisc_address = RISC_START_ADDRESS_2400; |
2178 | break; | 2178 | break; |
2179 | case PCI_DEVICE_ID_QLOGIC_ISP2532: | 2179 | case PCI_DEVICE_ID_QLOGIC_ISP2532: |
2180 | ha->device_type |= DT_ISP2532; | 2180 | ha->isp_type |= DT_ISP2532; |
2181 | ha->device_type |= DT_ZIO_SUPPORTED; | 2181 | ha->device_type |= DT_ZIO_SUPPORTED; |
2182 | ha->device_type |= DT_FWI2; | 2182 | ha->device_type |= DT_FWI2; |
2183 | ha->device_type |= DT_IIDMA; | 2183 | ha->device_type |= DT_IIDMA; |
2184 | ha->fw_srisc_address = RISC_START_ADDRESS_2400; | 2184 | ha->fw_srisc_address = RISC_START_ADDRESS_2400; |
2185 | break; | 2185 | break; |
2186 | case PCI_DEVICE_ID_QLOGIC_ISP8001: | 2186 | case PCI_DEVICE_ID_QLOGIC_ISP8001: |
2187 | ha->device_type |= DT_ISP8001; | 2187 | ha->isp_type |= DT_ISP8001; |
2188 | ha->device_type |= DT_ZIO_SUPPORTED; | 2188 | ha->device_type |= DT_ZIO_SUPPORTED; |
2189 | ha->device_type |= DT_FWI2; | 2189 | ha->device_type |= DT_FWI2; |
2190 | ha->device_type |= DT_IIDMA; | 2190 | ha->device_type |= DT_IIDMA; |
2191 | ha->fw_srisc_address = RISC_START_ADDRESS_2400; | 2191 | ha->fw_srisc_address = RISC_START_ADDRESS_2400; |
2192 | break; | 2192 | break; |
2193 | case PCI_DEVICE_ID_QLOGIC_ISP8021: | 2193 | case PCI_DEVICE_ID_QLOGIC_ISP8021: |
2194 | ha->device_type |= DT_ISP8021; | 2194 | ha->isp_type |= DT_ISP8021; |
2195 | ha->device_type |= DT_ZIO_SUPPORTED; | 2195 | ha->device_type |= DT_ZIO_SUPPORTED; |
2196 | ha->device_type |= DT_FWI2; | 2196 | ha->device_type |= DT_FWI2; |
2197 | ha->fw_srisc_address = RISC_START_ADDRESS_2400; | 2197 | ha->fw_srisc_address = RISC_START_ADDRESS_2400; |
@@ -2199,7 +2199,7 @@ qla2x00_set_isp_flags(struct qla_hw_data *ha) | |||
2199 | qla82xx_init_flags(ha); | 2199 | qla82xx_init_flags(ha); |
2200 | break; | 2200 | break; |
2201 | case PCI_DEVICE_ID_QLOGIC_ISP8044: | 2201 | case PCI_DEVICE_ID_QLOGIC_ISP8044: |
2202 | ha->device_type |= DT_ISP8044; | 2202 | ha->isp_type |= DT_ISP8044; |
2203 | ha->device_type |= DT_ZIO_SUPPORTED; | 2203 | ha->device_type |= DT_ZIO_SUPPORTED; |
2204 | ha->device_type |= DT_FWI2; | 2204 | ha->device_type |= DT_FWI2; |
2205 | ha->fw_srisc_address = RISC_START_ADDRESS_2400; | 2205 | ha->fw_srisc_address = RISC_START_ADDRESS_2400; |
@@ -2207,7 +2207,7 @@ qla2x00_set_isp_flags(struct qla_hw_data *ha) | |||
2207 | qla82xx_init_flags(ha); | 2207 | qla82xx_init_flags(ha); |
2208 | break; | 2208 | break; |
2209 | case PCI_DEVICE_ID_QLOGIC_ISP2031: | 2209 | case PCI_DEVICE_ID_QLOGIC_ISP2031: |
2210 | ha->device_type |= DT_ISP2031; | 2210 | ha->isp_type |= DT_ISP2031; |
2211 | ha->device_type |= DT_ZIO_SUPPORTED; | 2211 | ha->device_type |= DT_ZIO_SUPPORTED; |
2212 | ha->device_type |= DT_FWI2; | 2212 | ha->device_type |= DT_FWI2; |
2213 | ha->device_type |= DT_IIDMA; | 2213 | ha->device_type |= DT_IIDMA; |
@@ -2215,7 +2215,7 @@ qla2x00_set_isp_flags(struct qla_hw_data *ha) | |||
2215 | ha->fw_srisc_address = RISC_START_ADDRESS_2400; | 2215 | ha->fw_srisc_address = RISC_START_ADDRESS_2400; |
2216 | break; | 2216 | break; |
2217 | case PCI_DEVICE_ID_QLOGIC_ISP8031: | 2217 | case PCI_DEVICE_ID_QLOGIC_ISP8031: |
2218 | ha->device_type |= DT_ISP8031; | 2218 | ha->isp_type |= DT_ISP8031; |
2219 | ha->device_type |= DT_ZIO_SUPPORTED; | 2219 | ha->device_type |= DT_ZIO_SUPPORTED; |
2220 | ha->device_type |= DT_FWI2; | 2220 | ha->device_type |= DT_FWI2; |
2221 | ha->device_type |= DT_IIDMA; | 2221 | ha->device_type |= DT_IIDMA; |
@@ -2223,10 +2223,10 @@ qla2x00_set_isp_flags(struct qla_hw_data *ha) | |||
2223 | ha->fw_srisc_address = RISC_START_ADDRESS_2400; | 2223 | ha->fw_srisc_address = RISC_START_ADDRESS_2400; |
2224 | break; | 2224 | break; |
2225 | case PCI_DEVICE_ID_QLOGIC_ISPF001: | 2225 | case PCI_DEVICE_ID_QLOGIC_ISPF001: |
2226 | ha->device_type |= DT_ISPFX00; | 2226 | ha->isp_type |= DT_ISPFX00; |
2227 | break; | 2227 | break; |
2228 | case PCI_DEVICE_ID_QLOGIC_ISP2071: | 2228 | case PCI_DEVICE_ID_QLOGIC_ISP2071: |
2229 | ha->device_type |= DT_ISP2071; | 2229 | ha->isp_type |= DT_ISP2071; |
2230 | ha->device_type |= DT_ZIO_SUPPORTED; | 2230 | ha->device_type |= DT_ZIO_SUPPORTED; |
2231 | ha->device_type |= DT_FWI2; | 2231 | ha->device_type |= DT_FWI2; |
2232 | ha->device_type |= DT_IIDMA; | 2232 | ha->device_type |= DT_IIDMA; |
@@ -2234,7 +2234,7 @@ qla2x00_set_isp_flags(struct qla_hw_data *ha) | |||
2234 | ha->fw_srisc_address = RISC_START_ADDRESS_2400; | 2234 | ha->fw_srisc_address = RISC_START_ADDRESS_2400; |
2235 | break; | 2235 | break; |
2236 | case PCI_DEVICE_ID_QLOGIC_ISP2271: | 2236 | case PCI_DEVICE_ID_QLOGIC_ISP2271: |
2237 | ha->device_type |= DT_ISP2271; | 2237 | ha->isp_type |= DT_ISP2271; |
2238 | ha->device_type |= DT_ZIO_SUPPORTED; | 2238 | ha->device_type |= DT_ZIO_SUPPORTED; |
2239 | ha->device_type |= DT_FWI2; | 2239 | ha->device_type |= DT_FWI2; |
2240 | ha->device_type |= DT_IIDMA; | 2240 | ha->device_type |= DT_IIDMA; |
@@ -2242,7 +2242,7 @@ qla2x00_set_isp_flags(struct qla_hw_data *ha) | |||
2242 | ha->fw_srisc_address = RISC_START_ADDRESS_2400; | 2242 | ha->fw_srisc_address = RISC_START_ADDRESS_2400; |
2243 | break; | 2243 | break; |
2244 | case PCI_DEVICE_ID_QLOGIC_ISP2261: | 2244 | case PCI_DEVICE_ID_QLOGIC_ISP2261: |
2245 | ha->device_type |= DT_ISP2261; | 2245 | ha->isp_type |= DT_ISP2261; |
2246 | ha->device_type |= DT_ZIO_SUPPORTED; | 2246 | ha->device_type |= DT_ZIO_SUPPORTED; |
2247 | ha->device_type |= DT_FWI2; | 2247 | ha->device_type |= DT_FWI2; |
2248 | ha->device_type |= DT_IIDMA; | 2248 | ha->device_type |= DT_IIDMA; |