diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 136 |
1 files changed, 76 insertions, 60 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index cc6ebb609e98..5ec798c2bf13 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -79,20 +79,20 @@ qla2x00_initialize_adapter(scsi_qla_host_t *ha) | |||
79 | set_bit(REGISTER_FDMI_NEEDED, &ha->dpc_flags); | 79 | set_bit(REGISTER_FDMI_NEEDED, &ha->dpc_flags); |
80 | 80 | ||
81 | qla_printk(KERN_INFO, ha, "Configuring PCI space...\n"); | 81 | qla_printk(KERN_INFO, ha, "Configuring PCI space...\n"); |
82 | rval = ha->isp_ops.pci_config(ha); | 82 | rval = ha->isp_ops->pci_config(ha); |
83 | if (rval) { | 83 | if (rval) { |
84 | DEBUG2(printk("scsi(%ld): Unable to configure PCI space.\n", | 84 | DEBUG2(printk("scsi(%ld): Unable to configure PCI space.\n", |
85 | ha->host_no)); | 85 | ha->host_no)); |
86 | return (rval); | 86 | return (rval); |
87 | } | 87 | } |
88 | 88 | ||
89 | ha->isp_ops.reset_chip(ha); | 89 | ha->isp_ops->reset_chip(ha); |
90 | 90 | ||
91 | ha->isp_ops.get_flash_version(ha, ha->request_ring); | 91 | ha->isp_ops->get_flash_version(ha, ha->request_ring); |
92 | 92 | ||
93 | qla_printk(KERN_INFO, ha, "Configure NVRAM parameters...\n"); | 93 | qla_printk(KERN_INFO, ha, "Configure NVRAM parameters...\n"); |
94 | 94 | ||
95 | ha->isp_ops.nvram_config(ha); | 95 | ha->isp_ops->nvram_config(ha); |
96 | 96 | ||
97 | if (ha->flags.disable_serdes) { | 97 | if (ha->flags.disable_serdes) { |
98 | /* Mask HBA via NVRAM settings? */ | 98 | /* Mask HBA via NVRAM settings? */ |
@@ -108,7 +108,7 @@ qla2x00_initialize_adapter(scsi_qla_host_t *ha) | |||
108 | qla_printk(KERN_INFO, ha, "Verifying loaded RISC code...\n"); | 108 | qla_printk(KERN_INFO, ha, "Verifying loaded RISC code...\n"); |
109 | 109 | ||
110 | if (qla2x00_isp_firmware(ha) != QLA_SUCCESS) { | 110 | if (qla2x00_isp_firmware(ha) != QLA_SUCCESS) { |
111 | rval = ha->isp_ops.chip_diag(ha); | 111 | rval = ha->isp_ops->chip_diag(ha); |
112 | if (rval) | 112 | if (rval) |
113 | return (rval); | 113 | return (rval); |
114 | rval = qla2x00_setup_chip(ha); | 114 | rval = qla2x00_setup_chip(ha); |
@@ -129,14 +129,13 @@ qla2x00_initialize_adapter(scsi_qla_host_t *ha) | |||
129 | int | 129 | int |
130 | qla2100_pci_config(scsi_qla_host_t *ha) | 130 | qla2100_pci_config(scsi_qla_host_t *ha) |
131 | { | 131 | { |
132 | int ret; | ||
133 | uint16_t w; | 132 | uint16_t w; |
134 | uint32_t d; | 133 | uint32_t d; |
135 | unsigned long flags; | 134 | unsigned long flags; |
136 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; | 135 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; |
137 | 136 | ||
138 | pci_set_master(ha->pdev); | 137 | pci_set_master(ha->pdev); |
139 | ret = pci_set_mwi(ha->pdev); | 138 | pci_try_set_mwi(ha->pdev); |
140 | 139 | ||
141 | pci_read_config_word(ha->pdev, PCI_COMMAND, &w); | 140 | pci_read_config_word(ha->pdev, PCI_COMMAND, &w); |
142 | w |= (PCI_COMMAND_PARITY | PCI_COMMAND_SERR); | 141 | w |= (PCI_COMMAND_PARITY | PCI_COMMAND_SERR); |
@@ -164,7 +163,6 @@ qla2100_pci_config(scsi_qla_host_t *ha) | |||
164 | int | 163 | int |
165 | qla2300_pci_config(scsi_qla_host_t *ha) | 164 | qla2300_pci_config(scsi_qla_host_t *ha) |
166 | { | 165 | { |
167 | int ret; | ||
168 | uint16_t w; | 166 | uint16_t w; |
169 | uint32_t d; | 167 | uint32_t d; |
170 | unsigned long flags = 0; | 168 | unsigned long flags = 0; |
@@ -172,7 +170,7 @@ qla2300_pci_config(scsi_qla_host_t *ha) | |||
172 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; | 170 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; |
173 | 171 | ||
174 | pci_set_master(ha->pdev); | 172 | pci_set_master(ha->pdev); |
175 | ret = pci_set_mwi(ha->pdev); | 173 | pci_try_set_mwi(ha->pdev); |
176 | 174 | ||
177 | pci_read_config_word(ha->pdev, PCI_COMMAND, &w); | 175 | pci_read_config_word(ha->pdev, PCI_COMMAND, &w); |
178 | w |= (PCI_COMMAND_PARITY | PCI_COMMAND_SERR); | 176 | w |= (PCI_COMMAND_PARITY | PCI_COMMAND_SERR); |
@@ -250,15 +248,13 @@ qla2300_pci_config(scsi_qla_host_t *ha) | |||
250 | int | 248 | int |
251 | qla24xx_pci_config(scsi_qla_host_t *ha) | 249 | qla24xx_pci_config(scsi_qla_host_t *ha) |
252 | { | 250 | { |
253 | int ret; | ||
254 | uint16_t w; | 251 | uint16_t w; |
255 | uint32_t d; | 252 | uint32_t d; |
256 | unsigned long flags = 0; | 253 | unsigned long flags = 0; |
257 | struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; | 254 | struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; |
258 | int pcix_cmd_reg, pcie_dctl_reg; | ||
259 | 255 | ||
260 | pci_set_master(ha->pdev); | 256 | pci_set_master(ha->pdev); |
261 | ret = pci_set_mwi(ha->pdev); | 257 | pci_try_set_mwi(ha->pdev); |
262 | 258 | ||
263 | pci_read_config_word(ha->pdev, PCI_COMMAND, &w); | 259 | pci_read_config_word(ha->pdev, PCI_COMMAND, &w); |
264 | w |= (PCI_COMMAND_PARITY | PCI_COMMAND_SERR); | 260 | w |= (PCI_COMMAND_PARITY | PCI_COMMAND_SERR); |
@@ -268,28 +264,12 @@ qla24xx_pci_config(scsi_qla_host_t *ha) | |||
268 | pci_write_config_byte(ha->pdev, PCI_LATENCY_TIMER, 0x80); | 264 | pci_write_config_byte(ha->pdev, PCI_LATENCY_TIMER, 0x80); |
269 | 265 | ||
270 | /* PCI-X -- adjust Maximum Memory Read Byte Count (2048). */ | 266 | /* PCI-X -- adjust Maximum Memory Read Byte Count (2048). */ |
271 | pcix_cmd_reg = pci_find_capability(ha->pdev, PCI_CAP_ID_PCIX); | 267 | if (pci_find_capability(ha->pdev, PCI_CAP_ID_PCIX)) |
272 | if (pcix_cmd_reg) { | 268 | pcix_set_mmrbc(ha->pdev, 2048); |
273 | uint16_t pcix_cmd; | ||
274 | |||
275 | pcix_cmd_reg += PCI_X_CMD; | ||
276 | pci_read_config_word(ha->pdev, pcix_cmd_reg, &pcix_cmd); | ||
277 | pcix_cmd &= ~PCI_X_CMD_MAX_READ; | ||
278 | pcix_cmd |= 0x0008; | ||
279 | pci_write_config_word(ha->pdev, pcix_cmd_reg, pcix_cmd); | ||
280 | } | ||
281 | 269 | ||
282 | /* PCIe -- adjust Maximum Read Request Size (2048). */ | 270 | /* PCIe -- adjust Maximum Read Request Size (2048). */ |
283 | pcie_dctl_reg = pci_find_capability(ha->pdev, PCI_CAP_ID_EXP); | 271 | if (pci_find_capability(ha->pdev, PCI_CAP_ID_EXP)) |
284 | if (pcie_dctl_reg) { | 272 | pcie_set_readrq(ha->pdev, 2048); |
285 | uint16_t pcie_dctl; | ||
286 | |||
287 | pcie_dctl_reg += PCI_EXP_DEVCTL; | ||
288 | pci_read_config_word(ha->pdev, pcie_dctl_reg, &pcie_dctl); | ||
289 | pcie_dctl &= ~PCI_EXP_DEVCTL_READRQ; | ||
290 | pcie_dctl |= 0x4000; | ||
291 | pci_write_config_word(ha->pdev, pcie_dctl_reg, pcie_dctl); | ||
292 | } | ||
293 | 273 | ||
294 | /* Reset expansion ROM address decode enable */ | 274 | /* Reset expansion ROM address decode enable */ |
295 | pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d); | 275 | pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d); |
@@ -307,6 +287,40 @@ qla24xx_pci_config(scsi_qla_host_t *ha) | |||
307 | } | 287 | } |
308 | 288 | ||
309 | /** | 289 | /** |
290 | * qla25xx_pci_config() - Setup ISP25xx PCI configuration registers. | ||
291 | * @ha: HA context | ||
292 | * | ||
293 | * Returns 0 on success. | ||
294 | */ | ||
295 | int | ||
296 | qla25xx_pci_config(scsi_qla_host_t *ha) | ||
297 | { | ||
298 | uint16_t w; | ||
299 | uint32_t d; | ||
300 | |||
301 | pci_set_master(ha->pdev); | ||
302 | pci_try_set_mwi(ha->pdev); | ||
303 | |||
304 | pci_read_config_word(ha->pdev, PCI_COMMAND, &w); | ||
305 | w |= (PCI_COMMAND_PARITY | PCI_COMMAND_SERR); | ||
306 | w &= ~PCI_COMMAND_INTX_DISABLE; | ||
307 | pci_write_config_word(ha->pdev, PCI_COMMAND, w); | ||
308 | |||
309 | /* PCIe -- adjust Maximum Read Request Size (2048). */ | ||
310 | if (pci_find_capability(ha->pdev, PCI_CAP_ID_EXP)) | ||
311 | pcie_set_readrq(ha->pdev, 2048); | ||
312 | |||
313 | /* Reset expansion ROM address decode enable */ | ||
314 | pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d); | ||
315 | d &= ~PCI_ROM_ADDRESS_ENABLE; | ||
316 | pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d); | ||
317 | |||
318 | ha->chip_revision = ha->pdev->revision; | ||
319 | |||
320 | return QLA_SUCCESS; | ||
321 | } | ||
322 | |||
323 | /** | ||
310 | * qla2x00_isp_firmware() - Choose firmware image. | 324 | * qla2x00_isp_firmware() - Choose firmware image. |
311 | * @ha: HA context | 325 | * @ha: HA context |
312 | * | 326 | * |
@@ -351,7 +365,7 @@ qla2x00_reset_chip(scsi_qla_host_t *ha) | |||
351 | uint32_t cnt; | 365 | uint32_t cnt; |
352 | uint16_t cmd; | 366 | uint16_t cmd; |
353 | 367 | ||
354 | ha->isp_ops.disable_intrs(ha); | 368 | ha->isp_ops->disable_intrs(ha); |
355 | 369 | ||
356 | spin_lock_irqsave(&ha->hardware_lock, flags); | 370 | spin_lock_irqsave(&ha->hardware_lock, flags); |
357 | 371 | ||
@@ -551,7 +565,7 @@ qla24xx_reset_risc(scsi_qla_host_t *ha) | |||
551 | void | 565 | void |
552 | qla24xx_reset_chip(scsi_qla_host_t *ha) | 566 | qla24xx_reset_chip(scsi_qla_host_t *ha) |
553 | { | 567 | { |
554 | ha->isp_ops.disable_intrs(ha); | 568 | ha->isp_ops->disable_intrs(ha); |
555 | 569 | ||
556 | /* Perform RISC reset. */ | 570 | /* Perform RISC reset. */ |
557 | qla24xx_reset_risc(ha); | 571 | qla24xx_reset_risc(ha); |
@@ -736,8 +750,10 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *ha) | |||
736 | fixed_size = offsetof(struct qla2300_fw_dump, data_ram); | 750 | fixed_size = offsetof(struct qla2300_fw_dump, data_ram); |
737 | mem_size = (ha->fw_memory_size - 0x11000 + 1) * | 751 | mem_size = (ha->fw_memory_size - 0x11000 + 1) * |
738 | sizeof(uint16_t); | 752 | sizeof(uint16_t); |
739 | } else if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { | 753 | } else if (IS_FWI2_CAPABLE(ha)) { |
740 | fixed_size = offsetof(struct qla24xx_fw_dump, ext_mem); | 754 | fixed_size = IS_QLA25XX(ha) ? |
755 | offsetof(struct qla25xx_fw_dump, ext_mem): | ||
756 | offsetof(struct qla24xx_fw_dump, ext_mem); | ||
741 | mem_size = (ha->fw_memory_size - 0x100000 + 1) * | 757 | mem_size = (ha->fw_memory_size - 0x100000 + 1) * |
742 | sizeof(uint32_t); | 758 | sizeof(uint32_t); |
743 | 759 | ||
@@ -879,7 +895,7 @@ qla2x00_setup_chip(scsi_qla_host_t *ha) | |||
879 | uint32_t srisc_address = 0; | 895 | uint32_t srisc_address = 0; |
880 | 896 | ||
881 | /* Load firmware sequences */ | 897 | /* Load firmware sequences */ |
882 | rval = ha->isp_ops.load_risc(ha, &srisc_address); | 898 | rval = ha->isp_ops->load_risc(ha, &srisc_address); |
883 | if (rval == QLA_SUCCESS) { | 899 | if (rval == QLA_SUCCESS) { |
884 | DEBUG(printk("scsi(%ld): Verifying Checksum of loaded RISC " | 900 | DEBUG(printk("scsi(%ld): Verifying Checksum of loaded RISC " |
885 | "code.\n", ha->host_no)); | 901 | "code.\n", ha->host_no)); |
@@ -1130,12 +1146,12 @@ qla2x00_init_rings(scsi_qla_host_t *ha) | |||
1130 | /* Initialize response queue entries */ | 1146 | /* Initialize response queue entries */ |
1131 | qla2x00_init_response_q_entries(ha); | 1147 | qla2x00_init_response_q_entries(ha); |
1132 | 1148 | ||
1133 | ha->isp_ops.config_rings(ha); | 1149 | ha->isp_ops->config_rings(ha); |
1134 | 1150 | ||
1135 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | 1151 | spin_unlock_irqrestore(&ha->hardware_lock, flags); |
1136 | 1152 | ||
1137 | /* Update any ISP specific firmware options before initialization. */ | 1153 | /* Update any ISP specific firmware options before initialization. */ |
1138 | ha->isp_ops.update_fw_options(ha); | 1154 | ha->isp_ops->update_fw_options(ha); |
1139 | 1155 | ||
1140 | DEBUG(printk("scsi(%ld): Issue init firmware.\n", ha->host_no)); | 1156 | DEBUG(printk("scsi(%ld): Issue init firmware.\n", ha->host_no)); |
1141 | 1157 | ||
@@ -1459,7 +1475,7 @@ qla2x00_nvram_config(scsi_qla_host_t *ha) | |||
1459 | ha->nvram_base = 0x80; | 1475 | ha->nvram_base = 0x80; |
1460 | 1476 | ||
1461 | /* Get NVRAM data and calculate checksum. */ | 1477 | /* Get NVRAM data and calculate checksum. */ |
1462 | ha->isp_ops.read_nvram(ha, ptr, ha->nvram_base, ha->nvram_size); | 1478 | ha->isp_ops->read_nvram(ha, ptr, ha->nvram_base, ha->nvram_size); |
1463 | for (cnt = 0, chksum = 0; cnt < ha->nvram_size; cnt++) | 1479 | for (cnt = 0, chksum = 0; cnt < ha->nvram_size; cnt++) |
1464 | chksum += *ptr++; | 1480 | chksum += *ptr++; |
1465 | 1481 | ||
@@ -2119,7 +2135,7 @@ qla2x00_iidma_fcport(scsi_qla_host_t *ha, fc_port_t *fcport) | |||
2119 | int rval; | 2135 | int rval; |
2120 | uint16_t port_speed, mb[6]; | 2136 | uint16_t port_speed, mb[6]; |
2121 | 2137 | ||
2122 | if (!IS_QLA24XX(ha)) | 2138 | if (!IS_IIDMA_CAPABLE(ha)) |
2123 | return; | 2139 | return; |
2124 | 2140 | ||
2125 | switch (be16_to_cpu(fcport->fp_speed)) { | 2141 | switch (be16_to_cpu(fcport->fp_speed)) { |
@@ -2267,7 +2283,7 @@ qla2x00_configure_fabric(scsi_qla_host_t *ha) | |||
2267 | scsi_qla_host_t *pha = to_qla_parent(ha); | 2283 | scsi_qla_host_t *pha = to_qla_parent(ha); |
2268 | 2284 | ||
2269 | /* If FL port exists, then SNS is present */ | 2285 | /* If FL port exists, then SNS is present */ |
2270 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) | 2286 | if (IS_FWI2_CAPABLE(ha)) |
2271 | loop_id = NPH_F_PORT; | 2287 | loop_id = NPH_F_PORT; |
2272 | else | 2288 | else |
2273 | loop_id = SNS_FL_PORT; | 2289 | loop_id = SNS_FL_PORT; |
@@ -2294,11 +2310,11 @@ qla2x00_configure_fabric(scsi_qla_host_t *ha) | |||
2294 | qla2x00_fdmi_register(ha); | 2310 | qla2x00_fdmi_register(ha); |
2295 | 2311 | ||
2296 | /* Ensure we are logged into the SNS. */ | 2312 | /* Ensure we are logged into the SNS. */ |
2297 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) | 2313 | if (IS_FWI2_CAPABLE(ha)) |
2298 | loop_id = NPH_SNS; | 2314 | loop_id = NPH_SNS; |
2299 | else | 2315 | else |
2300 | loop_id = SIMPLE_NAME_SERVER; | 2316 | loop_id = SIMPLE_NAME_SERVER; |
2301 | ha->isp_ops.fabric_login(ha, loop_id, 0xff, 0xff, | 2317 | ha->isp_ops->fabric_login(ha, loop_id, 0xff, 0xff, |
2302 | 0xfc, mb, BIT_1 | BIT_0); | 2318 | 0xfc, mb, BIT_1 | BIT_0); |
2303 | if (mb[0] != MBS_COMMAND_COMPLETE) { | 2319 | if (mb[0] != MBS_COMMAND_COMPLETE) { |
2304 | DEBUG2(qla_printk(KERN_INFO, ha, | 2320 | DEBUG2(qla_printk(KERN_INFO, ha, |
@@ -2355,7 +2371,7 @@ qla2x00_configure_fabric(scsi_qla_host_t *ha) | |||
2355 | (fcport->flags & FCF_TAPE_PRESENT) == 0 && | 2371 | (fcport->flags & FCF_TAPE_PRESENT) == 0 && |
2356 | fcport->port_type != FCT_INITIATOR && | 2372 | fcport->port_type != FCT_INITIATOR && |
2357 | fcport->port_type != FCT_BROADCAST) { | 2373 | fcport->port_type != FCT_BROADCAST) { |
2358 | ha->isp_ops.fabric_logout(ha, | 2374 | ha->isp_ops->fabric_logout(ha, |
2359 | fcport->loop_id, | 2375 | fcport->loop_id, |
2360 | fcport->d_id.b.domain, | 2376 | fcport->d_id.b.domain, |
2361 | fcport->d_id.b.area, | 2377 | fcport->d_id.b.area, |
@@ -2664,7 +2680,7 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *ha, struct list_head *new_fcports) | |||
2664 | (fcport->flags & FCF_TAPE_PRESENT) == 0 && | 2680 | (fcport->flags & FCF_TAPE_PRESENT) == 0 && |
2665 | fcport->port_type != FCT_INITIATOR && | 2681 | fcport->port_type != FCT_INITIATOR && |
2666 | fcport->port_type != FCT_BROADCAST) { | 2682 | fcport->port_type != FCT_BROADCAST) { |
2667 | ha->isp_ops.fabric_logout(ha, fcport->loop_id, | 2683 | ha->isp_ops->fabric_logout(ha, fcport->loop_id, |
2668 | fcport->d_id.b.domain, fcport->d_id.b.area, | 2684 | fcport->d_id.b.domain, fcport->d_id.b.area, |
2669 | fcport->d_id.b.al_pa); | 2685 | fcport->d_id.b.al_pa); |
2670 | fcport->loop_id = FC_NO_LOOP_ID; | 2686 | fcport->loop_id = FC_NO_LOOP_ID; |
@@ -2919,7 +2935,7 @@ qla2x00_fabric_dev_login(scsi_qla_host_t *ha, fc_port_t *fcport, | |||
2919 | opts |= BIT_1; | 2935 | opts |= BIT_1; |
2920 | rval = qla2x00_get_port_database(ha, fcport, opts); | 2936 | rval = qla2x00_get_port_database(ha, fcport, opts); |
2921 | if (rval != QLA_SUCCESS) { | 2937 | if (rval != QLA_SUCCESS) { |
2922 | ha->isp_ops.fabric_logout(ha, fcport->loop_id, | 2938 | ha->isp_ops->fabric_logout(ha, fcport->loop_id, |
2923 | fcport->d_id.b.domain, fcport->d_id.b.area, | 2939 | fcport->d_id.b.domain, fcport->d_id.b.area, |
2924 | fcport->d_id.b.al_pa); | 2940 | fcport->d_id.b.al_pa); |
2925 | qla2x00_mark_device_lost(ha, fcport, 1, 0); | 2941 | qla2x00_mark_device_lost(ha, fcport, 1, 0); |
@@ -2964,7 +2980,7 @@ qla2x00_fabric_login(scsi_qla_host_t *ha, fc_port_t *fcport, | |||
2964 | fcport->d_id.b.area, fcport->d_id.b.al_pa)); | 2980 | fcport->d_id.b.area, fcport->d_id.b.al_pa)); |
2965 | 2981 | ||
2966 | /* Login fcport on switch. */ | 2982 | /* Login fcport on switch. */ |
2967 | ha->isp_ops.fabric_login(ha, fcport->loop_id, | 2983 | ha->isp_ops->fabric_login(ha, fcport->loop_id, |
2968 | fcport->d_id.b.domain, fcport->d_id.b.area, | 2984 | fcport->d_id.b.domain, fcport->d_id.b.area, |
2969 | fcport->d_id.b.al_pa, mb, BIT_0); | 2985 | fcport->d_id.b.al_pa, mb, BIT_0); |
2970 | if (mb[0] == MBS_PORT_ID_USED) { | 2986 | if (mb[0] == MBS_PORT_ID_USED) { |
@@ -3032,7 +3048,7 @@ qla2x00_fabric_login(scsi_qla_host_t *ha, fc_port_t *fcport, | |||
3032 | * dead. | 3048 | * dead. |
3033 | */ | 3049 | */ |
3034 | *next_loopid = fcport->loop_id; | 3050 | *next_loopid = fcport->loop_id; |
3035 | ha->isp_ops.fabric_logout(ha, fcport->loop_id, | 3051 | ha->isp_ops->fabric_logout(ha, fcport->loop_id, |
3036 | fcport->d_id.b.domain, fcport->d_id.b.area, | 3052 | fcport->d_id.b.domain, fcport->d_id.b.area, |
3037 | fcport->d_id.b.al_pa); | 3053 | fcport->d_id.b.al_pa); |
3038 | qla2x00_mark_device_lost(ha, fcport, 1, 0); | 3054 | qla2x00_mark_device_lost(ha, fcport, 1, 0); |
@@ -3050,7 +3066,7 @@ qla2x00_fabric_login(scsi_qla_host_t *ha, fc_port_t *fcport, | |||
3050 | fcport->d_id.b.al_pa, fcport->loop_id, jiffies)); | 3066 | fcport->d_id.b.al_pa, fcport->loop_id, jiffies)); |
3051 | 3067 | ||
3052 | *next_loopid = fcport->loop_id; | 3068 | *next_loopid = fcport->loop_id; |
3053 | ha->isp_ops.fabric_logout(ha, fcport->loop_id, | 3069 | ha->isp_ops->fabric_logout(ha, fcport->loop_id, |
3054 | fcport->d_id.b.domain, fcport->d_id.b.area, | 3070 | fcport->d_id.b.domain, fcport->d_id.b.area, |
3055 | fcport->d_id.b.al_pa); | 3071 | fcport->d_id.b.al_pa); |
3056 | fcport->loop_id = FC_NO_LOOP_ID; | 3072 | fcport->loop_id = FC_NO_LOOP_ID; |
@@ -3206,7 +3222,7 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) | |||
3206 | 3222 | ||
3207 | qla_printk(KERN_INFO, ha, | 3223 | qla_printk(KERN_INFO, ha, |
3208 | "Performing ISP error recovery - ha= %p.\n", ha); | 3224 | "Performing ISP error recovery - ha= %p.\n", ha); |
3209 | ha->isp_ops.reset_chip(ha); | 3225 | ha->isp_ops->reset_chip(ha); |
3210 | 3226 | ||
3211 | atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME); | 3227 | atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME); |
3212 | if (atomic_read(&ha->loop_state) != LOOP_DOWN) { | 3228 | if (atomic_read(&ha->loop_state) != LOOP_DOWN) { |
@@ -3232,9 +3248,9 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) | |||
3232 | } | 3248 | } |
3233 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | 3249 | spin_unlock_irqrestore(&ha->hardware_lock, flags); |
3234 | 3250 | ||
3235 | ha->isp_ops.get_flash_version(ha, ha->request_ring); | 3251 | ha->isp_ops->get_flash_version(ha, ha->request_ring); |
3236 | 3252 | ||
3237 | ha->isp_ops.nvram_config(ha); | 3253 | ha->isp_ops->nvram_config(ha); |
3238 | 3254 | ||
3239 | if (!qla2x00_restart_isp(ha)) { | 3255 | if (!qla2x00_restart_isp(ha)) { |
3240 | clear_bit(RESET_MARKER_NEEDED, &ha->dpc_flags); | 3256 | clear_bit(RESET_MARKER_NEEDED, &ha->dpc_flags); |
@@ -3249,7 +3265,7 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) | |||
3249 | 3265 | ||
3250 | ha->flags.online = 1; | 3266 | ha->flags.online = 1; |
3251 | 3267 | ||
3252 | ha->isp_ops.enable_intrs(ha); | 3268 | ha->isp_ops->enable_intrs(ha); |
3253 | 3269 | ||
3254 | ha->isp_abort_cnt = 0; | 3270 | ha->isp_abort_cnt = 0; |
3255 | clear_bit(ISP_ABORT_RETRY, &ha->dpc_flags); | 3271 | clear_bit(ISP_ABORT_RETRY, &ha->dpc_flags); |
@@ -3274,7 +3290,7 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) | |||
3274 | * The next call disables the board | 3290 | * The next call disables the board |
3275 | * completely. | 3291 | * completely. |
3276 | */ | 3292 | */ |
3277 | ha->isp_ops.reset_adapter(ha); | 3293 | ha->isp_ops->reset_adapter(ha); |
3278 | ha->flags.online = 0; | 3294 | ha->flags.online = 0; |
3279 | clear_bit(ISP_ABORT_RETRY, | 3295 | clear_bit(ISP_ABORT_RETRY, |
3280 | &ha->dpc_flags); | 3296 | &ha->dpc_flags); |
@@ -3331,7 +3347,7 @@ qla2x00_restart_isp(scsi_qla_host_t *ha) | |||
3331 | /* If firmware needs to be loaded */ | 3347 | /* If firmware needs to be loaded */ |
3332 | if (qla2x00_isp_firmware(ha)) { | 3348 | if (qla2x00_isp_firmware(ha)) { |
3333 | ha->flags.online = 0; | 3349 | ha->flags.online = 0; |
3334 | if (!(status = ha->isp_ops.chip_diag(ha))) { | 3350 | if (!(status = ha->isp_ops->chip_diag(ha))) { |
3335 | if (IS_QLA2100(ha) || IS_QLA2200(ha)) { | 3351 | if (IS_QLA2100(ha) || IS_QLA2200(ha)) { |
3336 | status = qla2x00_setup_chip(ha); | 3352 | status = qla2x00_setup_chip(ha); |
3337 | goto done; | 3353 | goto done; |
@@ -3423,7 +3439,7 @@ qla2x00_reset_adapter(scsi_qla_host_t *ha) | |||
3423 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; | 3439 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; |
3424 | 3440 | ||
3425 | ha->flags.online = 0; | 3441 | ha->flags.online = 0; |
3426 | ha->isp_ops.disable_intrs(ha); | 3442 | ha->isp_ops->disable_intrs(ha); |
3427 | 3443 | ||
3428 | spin_lock_irqsave(&ha->hardware_lock, flags); | 3444 | spin_lock_irqsave(&ha->hardware_lock, flags); |
3429 | WRT_REG_WORD(®->hccr, HCCR_RESET_RISC); | 3445 | WRT_REG_WORD(®->hccr, HCCR_RESET_RISC); |
@@ -3440,7 +3456,7 @@ qla24xx_reset_adapter(scsi_qla_host_t *ha) | |||
3440 | struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; | 3456 | struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; |
3441 | 3457 | ||
3442 | ha->flags.online = 0; | 3458 | ha->flags.online = 0; |
3443 | ha->isp_ops.disable_intrs(ha); | 3459 | ha->isp_ops->disable_intrs(ha); |
3444 | 3460 | ||
3445 | spin_lock_irqsave(&ha->hardware_lock, flags); | 3461 | spin_lock_irqsave(&ha->hardware_lock, flags); |
3446 | WRT_REG_DWORD(®->hccr, HCCRX_SET_RISC_RESET); | 3462 | WRT_REG_DWORD(®->hccr, HCCRX_SET_RISC_RESET); |
@@ -3498,7 +3514,7 @@ qla24xx_nvram_config(scsi_qla_host_t *ha) | |||
3498 | 3514 | ||
3499 | /* Get NVRAM data and calculate checksum. */ | 3515 | /* Get NVRAM data and calculate checksum. */ |
3500 | dptr = (uint32_t *)nv; | 3516 | dptr = (uint32_t *)nv; |
3501 | ha->isp_ops.read_nvram(ha, (uint8_t *)dptr, ha->nvram_base, | 3517 | ha->isp_ops->read_nvram(ha, (uint8_t *)dptr, ha->nvram_base, |
3502 | ha->nvram_size); | 3518 | ha->nvram_size); |
3503 | for (cnt = 0, chksum = 0; cnt < ha->nvram_size >> 2; cnt++) | 3519 | for (cnt = 0, chksum = 0; cnt < ha->nvram_size >> 2; cnt++) |
3504 | chksum += le32_to_cpu(*dptr++); | 3520 | chksum += le32_to_cpu(*dptr++); |
@@ -4012,7 +4028,7 @@ qla2x00_try_to_stop_firmware(scsi_qla_host_t *ha) | |||
4012 | { | 4028 | { |
4013 | int ret, retries; | 4029 | int ret, retries; |
4014 | 4030 | ||
4015 | if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) | 4031 | if (!IS_FWI2_CAPABLE(ha)) |
4016 | return; | 4032 | return; |
4017 | if (!ha->fw_major_version) | 4033 | if (!ha->fw_major_version) |
4018 | return; | 4034 | return; |