aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index dbf64bb1f3db..401a8798ce52 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);
@@ -351,7 +351,7 @@ qla2x00_reset_chip(scsi_qla_host_t *ha)
351 uint32_t cnt; 351 uint32_t cnt;
352 uint16_t cmd; 352 uint16_t cmd;
353 353
354 ha->isp_ops.disable_intrs(ha); 354 ha->isp_ops->disable_intrs(ha);
355 355
356 spin_lock_irqsave(&ha->hardware_lock, flags); 356 spin_lock_irqsave(&ha->hardware_lock, flags);
357 357
@@ -551,7 +551,7 @@ qla24xx_reset_risc(scsi_qla_host_t *ha)
551void 551void
552qla24xx_reset_chip(scsi_qla_host_t *ha) 552qla24xx_reset_chip(scsi_qla_host_t *ha)
553{ 553{
554 ha->isp_ops.disable_intrs(ha); 554 ha->isp_ops->disable_intrs(ha);
555 555
556 /* Perform RISC reset. */ 556 /* Perform RISC reset. */
557 qla24xx_reset_risc(ha); 557 qla24xx_reset_risc(ha);
@@ -879,7 +879,7 @@ qla2x00_setup_chip(scsi_qla_host_t *ha)
879 uint32_t srisc_address = 0; 879 uint32_t srisc_address = 0;
880 880
881 /* Load firmware sequences */ 881 /* Load firmware sequences */
882 rval = ha->isp_ops.load_risc(ha, &srisc_address); 882 rval = ha->isp_ops->load_risc(ha, &srisc_address);
883 if (rval == QLA_SUCCESS) { 883 if (rval == QLA_SUCCESS) {
884 DEBUG(printk("scsi(%ld): Verifying Checksum of loaded RISC " 884 DEBUG(printk("scsi(%ld): Verifying Checksum of loaded RISC "
885 "code.\n", ha->host_no)); 885 "code.\n", ha->host_no));
@@ -1130,12 +1130,12 @@ qla2x00_init_rings(scsi_qla_host_t *ha)
1130 /* Initialize response queue entries */ 1130 /* Initialize response queue entries */
1131 qla2x00_init_response_q_entries(ha); 1131 qla2x00_init_response_q_entries(ha);
1132 1132
1133 ha->isp_ops.config_rings(ha); 1133 ha->isp_ops->config_rings(ha);
1134 1134
1135 spin_unlock_irqrestore(&ha->hardware_lock, flags); 1135 spin_unlock_irqrestore(&ha->hardware_lock, flags);
1136 1136
1137 /* Update any ISP specific firmware options before initialization. */ 1137 /* Update any ISP specific firmware options before initialization. */
1138 ha->isp_ops.update_fw_options(ha); 1138 ha->isp_ops->update_fw_options(ha);
1139 1139
1140 DEBUG(printk("scsi(%ld): Issue init firmware.\n", ha->host_no)); 1140 DEBUG(printk("scsi(%ld): Issue init firmware.\n", ha->host_no));
1141 1141
@@ -1459,7 +1459,7 @@ qla2x00_nvram_config(scsi_qla_host_t *ha)
1459 ha->nvram_base = 0x80; 1459 ha->nvram_base = 0x80;
1460 1460
1461 /* Get NVRAM data and calculate checksum. */ 1461 /* Get NVRAM data and calculate checksum. */
1462 ha->isp_ops.read_nvram(ha, ptr, ha->nvram_base, ha->nvram_size); 1462 ha->isp_ops->read_nvram(ha, ptr, ha->nvram_base, ha->nvram_size);
1463 for (cnt = 0, chksum = 0; cnt < ha->nvram_size; cnt++) 1463 for (cnt = 0, chksum = 0; cnt < ha->nvram_size; cnt++)
1464 chksum += *ptr++; 1464 chksum += *ptr++;
1465 1465
@@ -2298,7 +2298,7 @@ qla2x00_configure_fabric(scsi_qla_host_t *ha)
2298 loop_id = NPH_SNS; 2298 loop_id = NPH_SNS;
2299 else 2299 else
2300 loop_id = SIMPLE_NAME_SERVER; 2300 loop_id = SIMPLE_NAME_SERVER;
2301 ha->isp_ops.fabric_login(ha, loop_id, 0xff, 0xff, 2301 ha->isp_ops->fabric_login(ha, loop_id, 0xff, 0xff,
2302 0xfc, mb, BIT_1 | BIT_0); 2302 0xfc, mb, BIT_1 | BIT_0);
2303 if (mb[0] != MBS_COMMAND_COMPLETE) { 2303 if (mb[0] != MBS_COMMAND_COMPLETE) {
2304 DEBUG2(qla_printk(KERN_INFO, ha, 2304 DEBUG2(qla_printk(KERN_INFO, ha,
@@ -2355,7 +2355,7 @@ qla2x00_configure_fabric(scsi_qla_host_t *ha)
2355 (fcport->flags & FCF_TAPE_PRESENT) == 0 && 2355 (fcport->flags & FCF_TAPE_PRESENT) == 0 &&
2356 fcport->port_type != FCT_INITIATOR && 2356 fcport->port_type != FCT_INITIATOR &&
2357 fcport->port_type != FCT_BROADCAST) { 2357 fcport->port_type != FCT_BROADCAST) {
2358 ha->isp_ops.fabric_logout(ha, 2358 ha->isp_ops->fabric_logout(ha,
2359 fcport->loop_id, 2359 fcport->loop_id,
2360 fcport->d_id.b.domain, 2360 fcport->d_id.b.domain,
2361 fcport->d_id.b.area, 2361 fcport->d_id.b.area,
@@ -2664,7 +2664,7 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *ha, struct list_head *new_fcports)
2664 (fcport->flags & FCF_TAPE_PRESENT) == 0 && 2664 (fcport->flags & FCF_TAPE_PRESENT) == 0 &&
2665 fcport->port_type != FCT_INITIATOR && 2665 fcport->port_type != FCT_INITIATOR &&
2666 fcport->port_type != FCT_BROADCAST) { 2666 fcport->port_type != FCT_BROADCAST) {
2667 ha->isp_ops.fabric_logout(ha, fcport->loop_id, 2667 ha->isp_ops->fabric_logout(ha, fcport->loop_id,
2668 fcport->d_id.b.domain, fcport->d_id.b.area, 2668 fcport->d_id.b.domain, fcport->d_id.b.area,
2669 fcport->d_id.b.al_pa); 2669 fcport->d_id.b.al_pa);
2670 fcport->loop_id = FC_NO_LOOP_ID; 2670 fcport->loop_id = FC_NO_LOOP_ID;
@@ -2919,7 +2919,7 @@ qla2x00_fabric_dev_login(scsi_qla_host_t *ha, fc_port_t *fcport,
2919 opts |= BIT_1; 2919 opts |= BIT_1;
2920 rval = qla2x00_get_port_database(ha, fcport, opts); 2920 rval = qla2x00_get_port_database(ha, fcport, opts);
2921 if (rval != QLA_SUCCESS) { 2921 if (rval != QLA_SUCCESS) {
2922 ha->isp_ops.fabric_logout(ha, fcport->loop_id, 2922 ha->isp_ops->fabric_logout(ha, fcport->loop_id,
2923 fcport->d_id.b.domain, fcport->d_id.b.area, 2923 fcport->d_id.b.domain, fcport->d_id.b.area,
2924 fcport->d_id.b.al_pa); 2924 fcport->d_id.b.al_pa);
2925 qla2x00_mark_device_lost(ha, fcport, 1, 0); 2925 qla2x00_mark_device_lost(ha, fcport, 1, 0);
@@ -2964,7 +2964,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)); 2964 fcport->d_id.b.area, fcport->d_id.b.al_pa));
2965 2965
2966 /* Login fcport on switch. */ 2966 /* Login fcport on switch. */
2967 ha->isp_ops.fabric_login(ha, fcport->loop_id, 2967 ha->isp_ops->fabric_login(ha, fcport->loop_id,
2968 fcport->d_id.b.domain, fcport->d_id.b.area, 2968 fcport->d_id.b.domain, fcport->d_id.b.area,
2969 fcport->d_id.b.al_pa, mb, BIT_0); 2969 fcport->d_id.b.al_pa, mb, BIT_0);
2970 if (mb[0] == MBS_PORT_ID_USED) { 2970 if (mb[0] == MBS_PORT_ID_USED) {
@@ -3032,7 +3032,7 @@ qla2x00_fabric_login(scsi_qla_host_t *ha, fc_port_t *fcport,
3032 * dead. 3032 * dead.
3033 */ 3033 */
3034 *next_loopid = fcport->loop_id; 3034 *next_loopid = fcport->loop_id;
3035 ha->isp_ops.fabric_logout(ha, fcport->loop_id, 3035 ha->isp_ops->fabric_logout(ha, fcport->loop_id,
3036 fcport->d_id.b.domain, fcport->d_id.b.area, 3036 fcport->d_id.b.domain, fcport->d_id.b.area,
3037 fcport->d_id.b.al_pa); 3037 fcport->d_id.b.al_pa);
3038 qla2x00_mark_device_lost(ha, fcport, 1, 0); 3038 qla2x00_mark_device_lost(ha, fcport, 1, 0);
@@ -3050,7 +3050,7 @@ qla2x00_fabric_login(scsi_qla_host_t *ha, fc_port_t *fcport,
3050 fcport->d_id.b.al_pa, fcport->loop_id, jiffies)); 3050 fcport->d_id.b.al_pa, fcport->loop_id, jiffies));
3051 3051
3052 *next_loopid = fcport->loop_id; 3052 *next_loopid = fcport->loop_id;
3053 ha->isp_ops.fabric_logout(ha, fcport->loop_id, 3053 ha->isp_ops->fabric_logout(ha, fcport->loop_id,
3054 fcport->d_id.b.domain, fcport->d_id.b.area, 3054 fcport->d_id.b.domain, fcport->d_id.b.area,
3055 fcport->d_id.b.al_pa); 3055 fcport->d_id.b.al_pa);
3056 fcport->loop_id = FC_NO_LOOP_ID; 3056 fcport->loop_id = FC_NO_LOOP_ID;
@@ -3206,7 +3206,7 @@ qla2x00_abort_isp(scsi_qla_host_t *ha)
3206 3206
3207 qla_printk(KERN_INFO, ha, 3207 qla_printk(KERN_INFO, ha,
3208 "Performing ISP error recovery - ha= %p.\n", ha); 3208 "Performing ISP error recovery - ha= %p.\n", ha);
3209 ha->isp_ops.reset_chip(ha); 3209 ha->isp_ops->reset_chip(ha);
3210 3210
3211 atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME); 3211 atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME);
3212 if (atomic_read(&ha->loop_state) != LOOP_DOWN) { 3212 if (atomic_read(&ha->loop_state) != LOOP_DOWN) {
@@ -3232,9 +3232,9 @@ qla2x00_abort_isp(scsi_qla_host_t *ha)
3232 } 3232 }
3233 spin_unlock_irqrestore(&ha->hardware_lock, flags); 3233 spin_unlock_irqrestore(&ha->hardware_lock, flags);
3234 3234
3235 ha->isp_ops.get_flash_version(ha, ha->request_ring); 3235 ha->isp_ops->get_flash_version(ha, ha->request_ring);
3236 3236
3237 ha->isp_ops.nvram_config(ha); 3237 ha->isp_ops->nvram_config(ha);
3238 3238
3239 if (!qla2x00_restart_isp(ha)) { 3239 if (!qla2x00_restart_isp(ha)) {
3240 clear_bit(RESET_MARKER_NEEDED, &ha->dpc_flags); 3240 clear_bit(RESET_MARKER_NEEDED, &ha->dpc_flags);
@@ -3249,7 +3249,7 @@ qla2x00_abort_isp(scsi_qla_host_t *ha)
3249 3249
3250 ha->flags.online = 1; 3250 ha->flags.online = 1;
3251 3251
3252 ha->isp_ops.enable_intrs(ha); 3252 ha->isp_ops->enable_intrs(ha);
3253 3253
3254 ha->isp_abort_cnt = 0; 3254 ha->isp_abort_cnt = 0;
3255 clear_bit(ISP_ABORT_RETRY, &ha->dpc_flags); 3255 clear_bit(ISP_ABORT_RETRY, &ha->dpc_flags);
@@ -3274,7 +3274,7 @@ qla2x00_abort_isp(scsi_qla_host_t *ha)
3274 * The next call disables the board 3274 * The next call disables the board
3275 * completely. 3275 * completely.
3276 */ 3276 */
3277 ha->isp_ops.reset_adapter(ha); 3277 ha->isp_ops->reset_adapter(ha);
3278 ha->flags.online = 0; 3278 ha->flags.online = 0;
3279 clear_bit(ISP_ABORT_RETRY, 3279 clear_bit(ISP_ABORT_RETRY,
3280 &ha->dpc_flags); 3280 &ha->dpc_flags);
@@ -3331,7 +3331,7 @@ qla2x00_restart_isp(scsi_qla_host_t *ha)
3331 /* If firmware needs to be loaded */ 3331 /* If firmware needs to be loaded */
3332 if (qla2x00_isp_firmware(ha)) { 3332 if (qla2x00_isp_firmware(ha)) {
3333 ha->flags.online = 0; 3333 ha->flags.online = 0;
3334 if (!(status = ha->isp_ops.chip_diag(ha))) { 3334 if (!(status = ha->isp_ops->chip_diag(ha))) {
3335 if (IS_QLA2100(ha) || IS_QLA2200(ha)) { 3335 if (IS_QLA2100(ha) || IS_QLA2200(ha)) {
3336 status = qla2x00_setup_chip(ha); 3336 status = qla2x00_setup_chip(ha);
3337 goto done; 3337 goto done;
@@ -3423,7 +3423,7 @@ qla2x00_reset_adapter(scsi_qla_host_t *ha)
3423 struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; 3423 struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
3424 3424
3425 ha->flags.online = 0; 3425 ha->flags.online = 0;
3426 ha->isp_ops.disable_intrs(ha); 3426 ha->isp_ops->disable_intrs(ha);
3427 3427
3428 spin_lock_irqsave(&ha->hardware_lock, flags); 3428 spin_lock_irqsave(&ha->hardware_lock, flags);
3429 WRT_REG_WORD(&reg->hccr, HCCR_RESET_RISC); 3429 WRT_REG_WORD(&reg->hccr, HCCR_RESET_RISC);
@@ -3440,7 +3440,7 @@ qla24xx_reset_adapter(scsi_qla_host_t *ha)
3440 struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; 3440 struct device_reg_24xx __iomem *reg = &ha->iobase->isp24;
3441 3441
3442 ha->flags.online = 0; 3442 ha->flags.online = 0;
3443 ha->isp_ops.disable_intrs(ha); 3443 ha->isp_ops->disable_intrs(ha);
3444 3444
3445 spin_lock_irqsave(&ha->hardware_lock, flags); 3445 spin_lock_irqsave(&ha->hardware_lock, flags);
3446 WRT_REG_DWORD(&reg->hccr, HCCRX_SET_RISC_RESET); 3446 WRT_REG_DWORD(&reg->hccr, HCCRX_SET_RISC_RESET);
@@ -3498,7 +3498,7 @@ qla24xx_nvram_config(scsi_qla_host_t *ha)
3498 3498
3499 /* Get NVRAM data and calculate checksum. */ 3499 /* Get NVRAM data and calculate checksum. */
3500 dptr = (uint32_t *)nv; 3500 dptr = (uint32_t *)nv;
3501 ha->isp_ops.read_nvram(ha, (uint8_t *)dptr, ha->nvram_base, 3501 ha->isp_ops->read_nvram(ha, (uint8_t *)dptr, ha->nvram_base,
3502 ha->nvram_size); 3502 ha->nvram_size);
3503 for (cnt = 0, chksum = 0; cnt < ha->nvram_size >> 2; cnt++) 3503 for (cnt = 0, chksum = 0; cnt < ha->nvram_size >> 2; cnt++)
3504 chksum += le32_to_cpu(*dptr++); 3504 chksum += le32_to_cpu(*dptr++);