[SCSI] qla2xxx: Re-factor isp_operations to static structures.

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
fd34f556 8084fe16

+244 -196
+12 -11
drivers/scsi/qla2xxx/qla_attr.c
··· 98 98 99 99 /* Read NVRAM. */ 100 100 spin_lock_irqsave(&ha->hardware_lock, flags); 101 - ha->isp_ops.read_nvram(ha, (uint8_t *)buf, ha->nvram_base, 101 + ha->isp_ops->read_nvram(ha, (uint8_t *)buf, ha->nvram_base, 102 102 ha->nvram_size); 103 103 spin_unlock_irqrestore(&ha->hardware_lock, flags); 104 104 ··· 143 143 144 144 /* Write NVRAM. */ 145 145 spin_lock_irqsave(&ha->hardware_lock, flags); 146 - ha->isp_ops.write_nvram(ha, (uint8_t *)buf, ha->nvram_base, count); 146 + ha->isp_ops->write_nvram(ha, (uint8_t *)buf, ha->nvram_base, count); 147 147 spin_unlock_irqrestore(&ha->hardware_lock, flags); 148 148 149 149 set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); ··· 252 252 } 253 253 254 254 memset(ha->optrom_buffer, 0, ha->optrom_size); 255 - ha->isp_ops.read_optrom(ha, ha->optrom_buffer, 0, 255 + ha->isp_ops->read_optrom(ha, ha->optrom_buffer, 0, 256 256 ha->optrom_size); 257 257 break; 258 258 case 2: ··· 275 275 if (ha->optrom_state != QLA_SWRITING) 276 276 break; 277 277 278 - ha->isp_ops.write_optrom(ha, ha->optrom_buffer, 0, 278 + ha->isp_ops->write_optrom(ha, ha->optrom_buffer, 0, 279 279 ha->optrom_size); 280 280 break; 281 281 } ··· 305 305 306 306 /* Read NVRAM. */ 307 307 spin_lock_irqsave(&ha->hardware_lock, flags); 308 - ha->isp_ops.read_nvram(ha, (uint8_t *)buf, ha->vpd_base, ha->vpd_size); 308 + ha->isp_ops->read_nvram(ha, (uint8_t *)buf, ha->vpd_base, 309 + ha->vpd_size); 309 310 spin_unlock_irqrestore(&ha->hardware_lock, flags); 310 311 311 312 return ha->vpd_size; ··· 326 325 327 326 /* Write NVRAM. */ 328 327 spin_lock_irqsave(&ha->hardware_lock, flags); 329 - ha->isp_ops.write_nvram(ha, (uint8_t *)buf, ha->vpd_base, count); 328 + ha->isp_ops->write_nvram(ha, (uint8_t *)buf, ha->vpd_base, count); 330 329 spin_unlock_irqrestore(&ha->hardware_lock, flags); 331 330 332 331 return count; ··· 438 437 } 439 438 440 439 if (ha->beacon_blink_led == 1) 441 - ha->isp_ops.beacon_off(ha); 440 + ha->isp_ops->beacon_off(ha); 442 441 } 443 442 444 443 /* Scsi_Host attributes. */ ··· 456 455 char fw_str[30]; 457 456 458 457 return snprintf(buf, PAGE_SIZE, "%s\n", 459 - ha->isp_ops.fw_version_str(ha, fw_str)); 458 + ha->isp_ops->fw_version_str(ha, fw_str)); 460 459 } 461 460 462 461 static ssize_t ··· 508 507 char pci_info[30]; 509 508 510 509 return snprintf(buf, PAGE_SIZE, "%s\n", 511 - ha->isp_ops.pci_info_str(ha, pci_info)); 510 + ha->isp_ops->pci_info_str(ha, pci_info)); 512 511 } 513 512 514 513 static ssize_t ··· 653 652 return -EINVAL; 654 653 655 654 if (val) 656 - rval = ha->isp_ops.beacon_on(ha); 655 + rval = ha->isp_ops->beacon_on(ha); 657 656 else 658 - rval = ha->isp_ops.beacon_off(ha); 657 + rval = ha->isp_ops->beacon_off(ha); 659 658 660 659 if (rval != QLA_SUCCESS) 661 660 count = 0;
+1 -1
drivers/scsi/qla2xxx/qla_def.h
··· 2286 2286 uint16_t rsp_ring_index; /* Current index. */ 2287 2287 uint16_t response_q_length; 2288 2288 2289 - struct isp_operations isp_ops; 2289 + struct isp_operations *isp_ops; 2290 2290 2291 2291 /* Outstandings ISP commands. */ 2292 2292 srb_t *outstanding_cmds[MAX_OUTSTANDING_COMMANDS];
+19 -14
drivers/scsi/qla2xxx/qla_gs.c
··· 180 180 181 181 /* Issue GA_NXT */ 182 182 /* Prepare common MS IOCB */ 183 - ms_pkt = ha->isp_ops.prep_ms_iocb(ha, GA_NXT_REQ_SIZE, GA_NXT_RSP_SIZE); 183 + ms_pkt = ha->isp_ops->prep_ms_iocb(ha, GA_NXT_REQ_SIZE, 184 + GA_NXT_RSP_SIZE); 184 185 185 186 /* Prepare CT request */ 186 187 ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, GA_NXT_CMD, ··· 267 266 268 267 /* Issue GID_PT */ 269 268 /* Prepare common MS IOCB */ 270 - ms_pkt = ha->isp_ops.prep_ms_iocb(ha, GID_PT_REQ_SIZE, GID_PT_RSP_SIZE); 269 + ms_pkt = ha->isp_ops->prep_ms_iocb(ha, GID_PT_REQ_SIZE, 270 + GID_PT_RSP_SIZE); 271 271 272 272 /* Prepare CT request */ 273 273 ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, GID_PT_CMD, ··· 340 338 for (i = 0; i < MAX_FIBRE_DEVICES; i++) { 341 339 /* Issue GPN_ID */ 342 340 /* Prepare common MS IOCB */ 343 - ms_pkt = ha->isp_ops.prep_ms_iocb(ha, GPN_ID_REQ_SIZE, 341 + ms_pkt = ha->isp_ops->prep_ms_iocb(ha, GPN_ID_REQ_SIZE, 344 342 GPN_ID_RSP_SIZE); 345 343 346 344 /* Prepare CT request */ ··· 401 399 for (i = 0; i < MAX_FIBRE_DEVICES; i++) { 402 400 /* Issue GNN_ID */ 403 401 /* Prepare common MS IOCB */ 404 - ms_pkt = ha->isp_ops.prep_ms_iocb(ha, GNN_ID_REQ_SIZE, 402 + ms_pkt = ha->isp_ops->prep_ms_iocb(ha, GNN_ID_REQ_SIZE, 405 403 GNN_ID_RSP_SIZE); 406 404 407 405 /* Prepare CT request */ ··· 475 473 476 474 /* Issue RFT_ID */ 477 475 /* Prepare common MS IOCB */ 478 - ms_pkt = ha->isp_ops.prep_ms_iocb(ha, RFT_ID_REQ_SIZE, RFT_ID_RSP_SIZE); 476 + ms_pkt = ha->isp_ops->prep_ms_iocb(ha, RFT_ID_REQ_SIZE, 477 + RFT_ID_RSP_SIZE); 479 478 480 479 /* Prepare CT request */ 481 480 ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, RFT_ID_CMD, ··· 531 528 532 529 /* Issue RFF_ID */ 533 530 /* Prepare common MS IOCB */ 534 - ms_pkt = ha->isp_ops.prep_ms_iocb(ha, RFF_ID_REQ_SIZE, RFF_ID_RSP_SIZE); 531 + ms_pkt = ha->isp_ops->prep_ms_iocb(ha, RFF_ID_REQ_SIZE, 532 + RFF_ID_RSP_SIZE); 535 533 536 534 /* Prepare CT request */ 537 535 ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, RFF_ID_CMD, ··· 586 582 587 583 /* Issue RNN_ID */ 588 584 /* Prepare common MS IOCB */ 589 - ms_pkt = ha->isp_ops.prep_ms_iocb(ha, RNN_ID_REQ_SIZE, RNN_ID_RSP_SIZE); 585 + ms_pkt = ha->isp_ops->prep_ms_iocb(ha, RNN_ID_REQ_SIZE, 586 + RNN_ID_RSP_SIZE); 590 587 591 588 /* Prepare CT request */ 592 589 ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, RNN_ID_CMD, ··· 650 645 /* Issue RSNN_NN */ 651 646 /* Prepare common MS IOCB */ 652 647 /* Request size adjusted after CT preparation */ 653 - ms_pkt = ha->isp_ops.prep_ms_iocb(ha, 0, RSNN_NN_RSP_SIZE); 648 + ms_pkt = ha->isp_ops->prep_ms_iocb(ha, 0, RSNN_NN_RSP_SIZE); 654 649 655 650 /* Prepare CT request */ 656 651 ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, RSNN_NN_CMD, ··· 1107 1102 if (ha->flags.management_server_logged_in) 1108 1103 return ret; 1109 1104 1110 - ha->isp_ops.fabric_login(ha, ha->mgmt_svr_loop_id, 0xff, 0xff, 0xfa, 1105 + ha->isp_ops->fabric_login(ha, ha->mgmt_svr_loop_id, 0xff, 0xff, 0xfa, 1111 1106 mb, BIT_1); 1112 1107 if (mb[0] != MBS_COMMAND_COMPLETE) { 1113 1108 DEBUG2_13(printk("%s(%ld): Failed MANAGEMENT_SERVER login: " ··· 1258 1253 /* Issue RHBA */ 1259 1254 /* Prepare common MS IOCB */ 1260 1255 /* Request size adjusted after CT preparation */ 1261 - ms_pkt = ha->isp_ops.prep_ms_fdmi_iocb(ha, 0, RHBA_RSP_SIZE); 1256 + ms_pkt = ha->isp_ops->prep_ms_fdmi_iocb(ha, 0, RHBA_RSP_SIZE); 1262 1257 1263 1258 /* Prepare CT request */ 1264 1259 ct_req = qla2x00_prep_ct_fdmi_req(&ha->ct_sns->p.req, RHBA_CMD, ··· 1378 1373 /* Firmware version */ 1379 1374 eiter = (struct ct_fdmi_hba_attr *) (entries + size); 1380 1375 eiter->type = __constant_cpu_to_be16(FDMI_HBA_FIRMWARE_VERSION); 1381 - ha->isp_ops.fw_version_str(ha, eiter->a.fw_version); 1376 + ha->isp_ops->fw_version_str(ha, eiter->a.fw_version); 1382 1377 alen = strlen(eiter->a.fw_version); 1383 1378 alen += (alen & 3) ? (4 - (alen & 3)) : 4; 1384 1379 eiter->len = cpu_to_be16(4 + alen); ··· 1444 1439 1445 1440 /* Issue RPA */ 1446 1441 /* Prepare common MS IOCB */ 1447 - ms_pkt = ha->isp_ops.prep_ms_fdmi_iocb(ha, DHBA_REQ_SIZE, 1442 + ms_pkt = ha->isp_ops->prep_ms_fdmi_iocb(ha, DHBA_REQ_SIZE, 1448 1443 DHBA_RSP_SIZE); 1449 1444 1450 1445 /* Prepare CT request */ ··· 1502 1497 /* Issue RPA */ 1503 1498 /* Prepare common MS IOCB */ 1504 1499 /* Request size adjusted after CT preparation */ 1505 - ms_pkt = ha->isp_ops.prep_ms_fdmi_iocb(ha, 0, RPA_RSP_SIZE); 1500 + ms_pkt = ha->isp_ops->prep_ms_fdmi_iocb(ha, 0, RPA_RSP_SIZE); 1506 1501 1507 1502 /* Prepare CT request */ 1508 1503 ct_req = qla2x00_prep_ct_fdmi_req(&ha->ct_sns->p.req, RPA_CMD, ··· 1702 1697 memset(list[i].fabric_port_name, 0, WWN_SIZE); 1703 1698 1704 1699 /* Prepare common MS IOCB */ 1705 - ms_pkt = ha->isp_ops.prep_ms_iocb(ha, GFPN_ID_REQ_SIZE, 1700 + ms_pkt = ha->isp_ops->prep_ms_iocb(ha, GFPN_ID_REQ_SIZE, 1706 1701 GFPN_ID_RSP_SIZE); 1707 1702 1708 1703 /* Prepare CT request */
+27 -27
drivers/scsi/qla2xxx/qla_init.c
··· 79 79 set_bit(REGISTER_FDMI_NEEDED, &ha->dpc_flags); 80 80 81 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 83 if (rval) { 84 84 DEBUG2(printk("scsi(%ld): Unable to configure PCI space.\n", 85 85 ha->host_no)); 86 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 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 97 if (ha->flags.disable_serdes) { 98 98 /* Mask HBA via NVRAM settings? */ ··· 108 108 qla_printk(KERN_INFO, ha, "Verifying loaded RISC code...\n"); 109 109 110 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 112 if (rval) 113 113 return (rval); 114 114 rval = qla2x00_setup_chip(ha); ··· 351 351 uint32_t cnt; 352 352 uint16_t cmd; 353 353 354 - ha->isp_ops.disable_intrs(ha); 354 + ha->isp_ops->disable_intrs(ha); 355 355 356 356 spin_lock_irqsave(&ha->hardware_lock, flags); 357 357 ··· 551 551 void 552 552 qla24xx_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 556 /* Perform RISC reset. */ 557 557 qla24xx_reset_risc(ha); ··· 879 879 uint32_t srisc_address = 0; 880 880 881 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 883 if (rval == QLA_SUCCESS) { 884 884 DEBUG(printk("scsi(%ld): Verifying Checksum of loaded RISC " 885 885 "code.\n", ha->host_no)); ··· 1130 1130 /* Initialize response queue entries */ 1131 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 1135 spin_unlock_irqrestore(&ha->hardware_lock, flags); 1136 1136 1137 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 1140 DEBUG(printk("scsi(%ld): Issue init firmware.\n", ha->host_no)); 1141 1141 ··· 1459 1459 ha->nvram_base = 0x80; 1460 1460 1461 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 1463 for (cnt = 0, chksum = 0; cnt < ha->nvram_size; cnt++) 1464 1464 chksum += *ptr++; 1465 1465 ··· 2298 2298 loop_id = NPH_SNS; 2299 2299 else 2300 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 2302 0xfc, mb, BIT_1 | BIT_0); 2303 2303 if (mb[0] != MBS_COMMAND_COMPLETE) { 2304 2304 DEBUG2(qla_printk(KERN_INFO, ha, ··· 2355 2355 (fcport->flags & FCF_TAPE_PRESENT) == 0 && 2356 2356 fcport->port_type != FCT_INITIATOR && 2357 2357 fcport->port_type != FCT_BROADCAST) { 2358 - ha->isp_ops.fabric_logout(ha, 2358 + ha->isp_ops->fabric_logout(ha, 2359 2359 fcport->loop_id, 2360 2360 fcport->d_id.b.domain, 2361 2361 fcport->d_id.b.area, ··· 2664 2664 (fcport->flags & FCF_TAPE_PRESENT) == 0 && 2665 2665 fcport->port_type != FCT_INITIATOR && 2666 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 2668 fcport->d_id.b.domain, fcport->d_id.b.area, 2669 2669 fcport->d_id.b.al_pa); 2670 2670 fcport->loop_id = FC_NO_LOOP_ID; ··· 2919 2919 opts |= BIT_1; 2920 2920 rval = qla2x00_get_port_database(ha, fcport, opts); 2921 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 2923 fcport->d_id.b.domain, fcport->d_id.b.area, 2924 2924 fcport->d_id.b.al_pa); 2925 2925 qla2x00_mark_device_lost(ha, fcport, 1, 0); ··· 2964 2964 fcport->d_id.b.area, fcport->d_id.b.al_pa)); 2965 2965 2966 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 2968 fcport->d_id.b.domain, fcport->d_id.b.area, 2969 2969 fcport->d_id.b.al_pa, mb, BIT_0); 2970 2970 if (mb[0] == MBS_PORT_ID_USED) { ··· 3032 3032 * dead. 3033 3033 */ 3034 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 3036 fcport->d_id.b.domain, fcport->d_id.b.area, 3037 3037 fcport->d_id.b.al_pa); 3038 3038 qla2x00_mark_device_lost(ha, fcport, 1, 0); ··· 3050 3050 fcport->d_id.b.al_pa, fcport->loop_id, jiffies)); 3051 3051 3052 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 3054 fcport->d_id.b.domain, fcport->d_id.b.area, 3055 3055 fcport->d_id.b.al_pa); 3056 3056 fcport->loop_id = FC_NO_LOOP_ID; ··· 3206 3206 3207 3207 qla_printk(KERN_INFO, ha, 3208 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 3211 atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME); 3212 3212 if (atomic_read(&ha->loop_state) != LOOP_DOWN) { ··· 3232 3232 } 3233 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 3239 if (!qla2x00_restart_isp(ha)) { 3240 3240 clear_bit(RESET_MARKER_NEEDED, &ha->dpc_flags); ··· 3249 3249 3250 3250 ha->flags.online = 1; 3251 3251 3252 - ha->isp_ops.enable_intrs(ha); 3252 + ha->isp_ops->enable_intrs(ha); 3253 3253 3254 3254 ha->isp_abort_cnt = 0; 3255 3255 clear_bit(ISP_ABORT_RETRY, &ha->dpc_flags); ··· 3274 3274 * The next call disables the board 3275 3275 * completely. 3276 3276 */ 3277 - ha->isp_ops.reset_adapter(ha); 3277 + ha->isp_ops->reset_adapter(ha); 3278 3278 ha->flags.online = 0; 3279 3279 clear_bit(ISP_ABORT_RETRY, 3280 3280 &ha->dpc_flags); ··· 3331 3331 /* If firmware needs to be loaded */ 3332 3332 if (qla2x00_isp_firmware(ha)) { 3333 3333 ha->flags.online = 0; 3334 - if (!(status = ha->isp_ops.chip_diag(ha))) { 3334 + if (!(status = ha->isp_ops->chip_diag(ha))) { 3335 3335 if (IS_QLA2100(ha) || IS_QLA2200(ha)) { 3336 3336 status = qla2x00_setup_chip(ha); 3337 3337 goto done; ··· 3423 3423 struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; 3424 3424 3425 3425 ha->flags.online = 0; 3426 - ha->isp_ops.disable_intrs(ha); 3426 + ha->isp_ops->disable_intrs(ha); 3427 3427 3428 3428 spin_lock_irqsave(&ha->hardware_lock, flags); 3429 3429 WRT_REG_WORD(&reg->hccr, HCCR_RESET_RISC); ··· 3440 3440 struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; 3441 3441 3442 3442 ha->flags.online = 0; 3443 - ha->isp_ops.disable_intrs(ha); 3443 + ha->isp_ops->disable_intrs(ha); 3444 3444 3445 3445 spin_lock_irqsave(&ha->hardware_lock, flags); 3446 3446 WRT_REG_DWORD(&reg->hccr, HCCRX_SET_RISC_RESET); ··· 3498 3498 3499 3499 /* Get NVRAM data and calculate checksum. */ 3500 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 3502 ha->nvram_size); 3503 3503 for (cnt = 0, chksum = 0; cnt < ha->nvram_size >> 2; cnt++) 3504 3504 chksum += le32_to_cpu(*dptr++);
+1 -1
drivers/scsi/qla2xxx/qla_inline.h
··· 104 104 static inline void 105 105 qla2x00_poll(scsi_qla_host_t *ha) 106 106 { 107 - ha->isp_ops.intr_handler(0, ha); 107 + ha->isp_ops->intr_handler(0, ha); 108 108 } 109 109 110 110 static __inline__ void qla2x00_check_fabric_devices(scsi_qla_host_t *);
+2 -2
drivers/scsi/qla2xxx/qla_iocb.c
··· 326 326 tot_dsds = nseg; 327 327 328 328 /* Calculate the number of request entries needed. */ 329 - req_cnt = ha->isp_ops.calc_req_entries(tot_dsds); 329 + req_cnt = ha->isp_ops->calc_req_entries(tot_dsds); 330 330 if (ha->req_q_cnt < (req_cnt + 2)) { 331 331 cnt = RD_REG_WORD_RELAXED(ISP_REQ_Q_OUT(ha, reg)); 332 332 if (ha->req_ring_index < cnt) ··· 364 364 cmd_pkt->byte_count = cpu_to_le32((uint32_t)scsi_bufflen(cmd)); 365 365 366 366 /* Build IOCB segments */ 367 - ha->isp_ops.build_iocbs(sp, cmd_pkt, tot_dsds); 367 + ha->isp_ops->build_iocbs(sp, cmd_pkt, tot_dsds); 368 368 369 369 /* Set total data segment count. */ 370 370 cmd_pkt->entry_count = (uint8_t)req_cnt;
+5 -5
drivers/scsi/qla2xxx/qla_isr.c
··· 143 143 WRT_REG_WORD(&reg->hccr, HCCR_RESET_RISC); 144 144 RD_REG_WORD(&reg->hccr); 145 145 146 - ha->isp_ops.fw_dump(ha, 1); 146 + ha->isp_ops->fw_dump(ha, 1); 147 147 set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); 148 148 break; 149 149 } else if ((stat & HSR_RISC_INT) == 0) ··· 334 334 "ISP System Error - mbx1=%xh mbx2=%xh mbx3=%xh.\n", 335 335 mb[1], mb[2], mb[3]); 336 336 337 - ha->isp_ops.fw_dump(ha, 1); 337 + ha->isp_ops->fw_dump(ha, 1); 338 338 339 339 if (IS_FWI2_CAPABLE(ha)) { 340 340 if (mb[1] == 0 && mb[2] == 0) { ··· 1502 1502 1503 1503 qla_printk(KERN_INFO, ha, "RISC paused -- HCCR=%x, " 1504 1504 "Dumping firmware!\n", hccr); 1505 - ha->isp_ops.fw_dump(ha, 1); 1505 + ha->isp_ops->fw_dump(ha, 1); 1506 1506 set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); 1507 1507 break; 1508 1508 } else if ((stat & HSRX_RISC_INT) == 0) ··· 1636 1636 1637 1637 qla_printk(KERN_INFO, ha, "RISC paused -- HCCR=%x, " 1638 1638 "Dumping firmware!\n", hccr); 1639 - ha->isp_ops.fw_dump(ha, 1); 1639 + ha->isp_ops->fw_dump(ha, 1); 1640 1640 set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); 1641 1641 break; 1642 1642 } else if ((stat & HSRX_RISC_INT) == 0) ··· 1791 1791 } 1792 1792 skip_msi: 1793 1793 1794 - ret = request_irq(ha->pdev->irq, ha->isp_ops.intr_handler, 1794 + ret = request_irq(ha->pdev->irq, ha->isp_ops->intr_handler, 1795 1795 IRQF_DISABLED|IRQF_SHARED, QLA2XXX_DRIVER_NAME, ha); 1796 1796 if (!ret) { 1797 1797 ha->flags.inta_enabled = 1;
+171 -129
drivers/scsi/qla2xxx/qla_os.c
··· 681 681 DEBUG3(qla2x00_print_scsi_cmd(cmd)); 682 682 683 683 spin_unlock_irqrestore(&pha->hardware_lock, flags); 684 - if (ha->isp_ops.abort_command(ha, sp)) { 684 + if (ha->isp_ops->abort_command(ha, sp)) { 685 685 DEBUG2(printk("%s(%ld): abort_command " 686 686 "mbx failed.\n", __func__, ha->host_no)); 687 687 } else { ··· 813 813 #if defined(LOGOUT_AFTER_DEVICE_RESET) 814 814 if (ret == SUCCESS) { 815 815 if (fcport->flags & FC_FABRIC_DEVICE) { 816 - ha->isp_ops.fabric_logout(ha, fcport->loop_id); 816 + ha->isp_ops->fabric_logout(ha, fcport->loop_id); 817 817 qla2x00_mark_device_lost(ha, fcport, 0, 0); 818 818 } 819 819 } ··· 1105 1105 qla2x00_device_reset(scsi_qla_host_t *ha, fc_port_t *reset_fcport) 1106 1106 { 1107 1107 /* Abort Target command will clear Reservation */ 1108 - return ha->isp_ops.abort_target(reset_fcport); 1108 + return ha->isp_ops->abort_target(reset_fcport); 1109 1109 } 1110 1110 1111 1111 static int ··· 1184 1184 !pci_set_consistent_dma_mask(ha->pdev, DMA_64BIT_MASK)) { 1185 1185 /* Ok, a 64bit DMA mask is applicable. */ 1186 1186 ha->flags.enable_64bit_addressing = 1; 1187 - ha->isp_ops.calc_req_entries = qla2x00_calc_iocbs_64; 1188 - ha->isp_ops.build_iocbs = qla2x00_build_scsi_iocbs_64; 1187 + ha->isp_ops->calc_req_entries = qla2x00_calc_iocbs_64; 1188 + ha->isp_ops->build_iocbs = qla2x00_build_scsi_iocbs_64; 1189 1189 return; 1190 1190 } 1191 1191 } ··· 1193 1193 dma_set_mask(&ha->pdev->dev, DMA_32BIT_MASK); 1194 1194 pci_set_consistent_dma_mask(ha->pdev, DMA_32BIT_MASK); 1195 1195 } 1196 + 1197 + static void 1198 + qla2x00_enable_intrs(scsi_qla_host_t *ha) 1199 + { 1200 + unsigned long flags = 0; 1201 + struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; 1202 + 1203 + spin_lock_irqsave(&ha->hardware_lock, flags); 1204 + ha->interrupts_on = 1; 1205 + /* enable risc and host interrupts */ 1206 + WRT_REG_WORD(&reg->ictrl, ICR_EN_INT | ICR_EN_RISC); 1207 + RD_REG_WORD(&reg->ictrl); 1208 + spin_unlock_irqrestore(&ha->hardware_lock, flags); 1209 + 1210 + } 1211 + 1212 + static void 1213 + qla2x00_disable_intrs(scsi_qla_host_t *ha) 1214 + { 1215 + unsigned long flags = 0; 1216 + struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; 1217 + 1218 + spin_lock_irqsave(&ha->hardware_lock, flags); 1219 + ha->interrupts_on = 0; 1220 + /* disable risc and host interrupts */ 1221 + WRT_REG_WORD(&reg->ictrl, 0); 1222 + RD_REG_WORD(&reg->ictrl); 1223 + spin_unlock_irqrestore(&ha->hardware_lock, flags); 1224 + } 1225 + 1226 + static void 1227 + qla24xx_enable_intrs(scsi_qla_host_t *ha) 1228 + { 1229 + unsigned long flags = 0; 1230 + struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; 1231 + 1232 + spin_lock_irqsave(&ha->hardware_lock, flags); 1233 + ha->interrupts_on = 1; 1234 + WRT_REG_DWORD(&reg->ictrl, ICRX_EN_RISC_INT); 1235 + RD_REG_DWORD(&reg->ictrl); 1236 + spin_unlock_irqrestore(&ha->hardware_lock, flags); 1237 + } 1238 + 1239 + static void 1240 + qla24xx_disable_intrs(scsi_qla_host_t *ha) 1241 + { 1242 + unsigned long flags = 0; 1243 + struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; 1244 + 1245 + spin_lock_irqsave(&ha->hardware_lock, flags); 1246 + ha->interrupts_on = 0; 1247 + WRT_REG_DWORD(&reg->ictrl, 0); 1248 + RD_REG_DWORD(&reg->ictrl); 1249 + spin_unlock_irqrestore(&ha->hardware_lock, flags); 1250 + } 1251 + 1252 + static struct isp_operations qla2100_isp_ops = { 1253 + .pci_config = qla2100_pci_config, 1254 + .reset_chip = qla2x00_reset_chip, 1255 + .chip_diag = qla2x00_chip_diag, 1256 + .config_rings = qla2x00_config_rings, 1257 + .reset_adapter = qla2x00_reset_adapter, 1258 + .nvram_config = qla2x00_nvram_config, 1259 + .update_fw_options = qla2x00_update_fw_options, 1260 + .load_risc = qla2x00_load_risc, 1261 + .pci_info_str = qla2x00_pci_info_str, 1262 + .fw_version_str = qla2x00_fw_version_str, 1263 + .intr_handler = qla2100_intr_handler, 1264 + .enable_intrs = qla2x00_enable_intrs, 1265 + .disable_intrs = qla2x00_disable_intrs, 1266 + .abort_command = qla2x00_abort_command, 1267 + .abort_target = qla2x00_abort_target, 1268 + .fabric_login = qla2x00_login_fabric, 1269 + .fabric_logout = qla2x00_fabric_logout, 1270 + .calc_req_entries = qla2x00_calc_iocbs_32, 1271 + .build_iocbs = qla2x00_build_scsi_iocbs_32, 1272 + .prep_ms_iocb = qla2x00_prep_ms_iocb, 1273 + .prep_ms_fdmi_iocb = qla2x00_prep_ms_fdmi_iocb, 1274 + .read_nvram = qla2x00_read_nvram_data, 1275 + .write_nvram = qla2x00_write_nvram_data, 1276 + .fw_dump = qla2100_fw_dump, 1277 + .beacon_on = NULL, 1278 + .beacon_off = NULL, 1279 + .beacon_blink = NULL, 1280 + .read_optrom = qla2x00_read_optrom_data, 1281 + .write_optrom = qla2x00_write_optrom_data, 1282 + .get_flash_version = qla2x00_get_flash_version, 1283 + }; 1284 + 1285 + static struct isp_operations qla2300_isp_ops = { 1286 + .pci_config = qla2300_pci_config, 1287 + .reset_chip = qla2x00_reset_chip, 1288 + .chip_diag = qla2x00_chip_diag, 1289 + .config_rings = qla2x00_config_rings, 1290 + .reset_adapter = qla2x00_reset_adapter, 1291 + .nvram_config = qla2x00_nvram_config, 1292 + .update_fw_options = qla2x00_update_fw_options, 1293 + .load_risc = qla2x00_load_risc, 1294 + .pci_info_str = qla2x00_pci_info_str, 1295 + .fw_version_str = qla2x00_fw_version_str, 1296 + .intr_handler = qla2300_intr_handler, 1297 + .enable_intrs = qla2x00_enable_intrs, 1298 + .disable_intrs = qla2x00_disable_intrs, 1299 + .abort_command = qla2x00_abort_command, 1300 + .abort_target = qla2x00_abort_target, 1301 + .fabric_login = qla2x00_login_fabric, 1302 + .fabric_logout = qla2x00_fabric_logout, 1303 + .calc_req_entries = qla2x00_calc_iocbs_32, 1304 + .build_iocbs = qla2x00_build_scsi_iocbs_32, 1305 + .prep_ms_iocb = qla2x00_prep_ms_iocb, 1306 + .prep_ms_fdmi_iocb = qla2x00_prep_ms_fdmi_iocb, 1307 + .read_nvram = qla2x00_read_nvram_data, 1308 + .write_nvram = qla2x00_write_nvram_data, 1309 + .fw_dump = qla2300_fw_dump, 1310 + .beacon_on = qla2x00_beacon_on, 1311 + .beacon_off = qla2x00_beacon_off, 1312 + .beacon_blink = qla2x00_beacon_blink, 1313 + .read_optrom = qla2x00_read_optrom_data, 1314 + .write_optrom = qla2x00_write_optrom_data, 1315 + .get_flash_version = qla2x00_get_flash_version, 1316 + }; 1317 + 1318 + static struct isp_operations qla24xx_isp_ops = { 1319 + .pci_config = qla24xx_pci_config, 1320 + .reset_chip = qla24xx_reset_chip, 1321 + .chip_diag = qla24xx_chip_diag, 1322 + .config_rings = qla24xx_config_rings, 1323 + .reset_adapter = qla24xx_reset_adapter, 1324 + .nvram_config = qla24xx_nvram_config, 1325 + .update_fw_options = qla24xx_update_fw_options, 1326 + .load_risc = qla24xx_load_risc, 1327 + .pci_info_str = qla24xx_pci_info_str, 1328 + .fw_version_str = qla24xx_fw_version_str, 1329 + .intr_handler = qla24xx_intr_handler, 1330 + .enable_intrs = qla24xx_enable_intrs, 1331 + .disable_intrs = qla24xx_disable_intrs, 1332 + .abort_command = qla24xx_abort_command, 1333 + .abort_target = qla24xx_abort_target, 1334 + .fabric_login = qla24xx_login_fabric, 1335 + .fabric_logout = qla24xx_fabric_logout, 1336 + .calc_req_entries = NULL, 1337 + .build_iocbs = NULL, 1338 + .prep_ms_iocb = qla24xx_prep_ms_iocb, 1339 + .prep_ms_fdmi_iocb = qla24xx_prep_ms_fdmi_iocb, 1340 + .read_nvram = qla24xx_read_nvram_data, 1341 + .write_nvram = qla24xx_write_nvram_data, 1342 + .fw_dump = qla24xx_fw_dump, 1343 + .beacon_on = qla24xx_beacon_on, 1344 + .beacon_off = qla24xx_beacon_off, 1345 + .beacon_blink = qla24xx_beacon_blink, 1346 + .read_optrom = qla24xx_read_optrom_data, 1347 + .write_optrom = qla24xx_write_optrom_data, 1348 + .get_flash_version = qla24xx_get_flash_version, 1349 + }; 1196 1350 1197 1351 static inline void 1198 1352 qla2x00_set_isp_flags(scsi_qla_host_t *ha) ··· 1483 1329 } 1484 1330 1485 1331 static void 1486 - qla2x00_enable_intrs(scsi_qla_host_t *ha) 1487 - { 1488 - unsigned long flags = 0; 1489 - struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; 1490 - 1491 - spin_lock_irqsave(&ha->hardware_lock, flags); 1492 - ha->interrupts_on = 1; 1493 - /* enable risc and host interrupts */ 1494 - WRT_REG_WORD(&reg->ictrl, ICR_EN_INT | ICR_EN_RISC); 1495 - RD_REG_WORD(&reg->ictrl); 1496 - spin_unlock_irqrestore(&ha->hardware_lock, flags); 1497 - 1498 - } 1499 - 1500 - static void 1501 - qla2x00_disable_intrs(scsi_qla_host_t *ha) 1502 - { 1503 - unsigned long flags = 0; 1504 - struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; 1505 - 1506 - spin_lock_irqsave(&ha->hardware_lock, flags); 1507 - ha->interrupts_on = 0; 1508 - /* disable risc and host interrupts */ 1509 - WRT_REG_WORD(&reg->ictrl, 0); 1510 - RD_REG_WORD(&reg->ictrl); 1511 - spin_unlock_irqrestore(&ha->hardware_lock, flags); 1512 - } 1513 - 1514 - static void 1515 - qla24xx_enable_intrs(scsi_qla_host_t *ha) 1516 - { 1517 - unsigned long flags = 0; 1518 - struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; 1519 - 1520 - spin_lock_irqsave(&ha->hardware_lock, flags); 1521 - ha->interrupts_on = 1; 1522 - WRT_REG_DWORD(&reg->ictrl, ICRX_EN_RISC_INT); 1523 - RD_REG_DWORD(&reg->ictrl); 1524 - spin_unlock_irqrestore(&ha->hardware_lock, flags); 1525 - } 1526 - 1527 - static void 1528 - qla24xx_disable_intrs(scsi_qla_host_t *ha) 1529 - { 1530 - unsigned long flags = 0; 1531 - struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; 1532 - 1533 - spin_lock_irqsave(&ha->hardware_lock, flags); 1534 - ha->interrupts_on = 0; 1535 - WRT_REG_DWORD(&reg->ictrl, 0); 1536 - RD_REG_DWORD(&reg->ictrl); 1537 - spin_unlock_irqrestore(&ha->hardware_lock, flags); 1538 - } 1539 - 1540 - static void 1541 1332 qla2xxx_scan_start(struct Scsi_Host *shost) 1542 1333 { 1543 1334 scsi_qla_host_t *ha = (scsi_qla_host_t *)shost->hostdata; ··· 1571 1472 ha->max_q_depth = ql2xmaxqdepth; 1572 1473 1573 1474 /* Assign ISP specific operations. */ 1574 - ha->isp_ops.pci_config = qla2100_pci_config; 1575 - ha->isp_ops.reset_chip = qla2x00_reset_chip; 1576 - ha->isp_ops.chip_diag = qla2x00_chip_diag; 1577 - ha->isp_ops.config_rings = qla2x00_config_rings; 1578 - ha->isp_ops.reset_adapter = qla2x00_reset_adapter; 1579 - ha->isp_ops.nvram_config = qla2x00_nvram_config; 1580 - ha->isp_ops.update_fw_options = qla2x00_update_fw_options; 1581 - ha->isp_ops.load_risc = qla2x00_load_risc; 1582 - ha->isp_ops.pci_info_str = qla2x00_pci_info_str; 1583 - ha->isp_ops.fw_version_str = qla2x00_fw_version_str; 1584 - ha->isp_ops.intr_handler = qla2100_intr_handler; 1585 - ha->isp_ops.enable_intrs = qla2x00_enable_intrs; 1586 - ha->isp_ops.disable_intrs = qla2x00_disable_intrs; 1587 - ha->isp_ops.abort_command = qla2x00_abort_command; 1588 - ha->isp_ops.abort_target = qla2x00_abort_target; 1589 - ha->isp_ops.fabric_login = qla2x00_login_fabric; 1590 - ha->isp_ops.fabric_logout = qla2x00_fabric_logout; 1591 - ha->isp_ops.calc_req_entries = qla2x00_calc_iocbs_32; 1592 - ha->isp_ops.build_iocbs = qla2x00_build_scsi_iocbs_32; 1593 - ha->isp_ops.prep_ms_iocb = qla2x00_prep_ms_iocb; 1594 - ha->isp_ops.prep_ms_fdmi_iocb = qla2x00_prep_ms_fdmi_iocb; 1595 - ha->isp_ops.read_nvram = qla2x00_read_nvram_data; 1596 - ha->isp_ops.write_nvram = qla2x00_write_nvram_data; 1597 - ha->isp_ops.fw_dump = qla2100_fw_dump; 1598 - ha->isp_ops.read_optrom = qla2x00_read_optrom_data; 1599 - ha->isp_ops.write_optrom = qla2x00_write_optrom_data; 1600 - ha->isp_ops.get_flash_version = qla2x00_get_flash_version; 1601 1475 if (IS_QLA2100(ha)) { 1602 1476 host->max_id = MAX_TARGETS_2100; 1603 1477 ha->mbx_count = MAILBOX_REGISTER_COUNT_2100; ··· 1579 1507 ha->last_loop_id = SNS_LAST_LOOP_ID_2100; 1580 1508 host->sg_tablesize = 32; 1581 1509 ha->gid_list_info_size = 4; 1510 + ha->isp_ops = &qla2100_isp_ops; 1582 1511 } else if (IS_QLA2200(ha)) { 1583 1512 host->max_id = MAX_TARGETS_2200; 1584 1513 ha->mbx_count = MAILBOX_REGISTER_COUNT; ··· 1587 1514 ha->response_q_length = RESPONSE_ENTRY_CNT_2100; 1588 1515 ha->last_loop_id = SNS_LAST_LOOP_ID_2100; 1589 1516 ha->gid_list_info_size = 4; 1517 + ha->isp_ops = &qla2100_isp_ops; 1590 1518 } else if (IS_QLA23XX(ha)) { 1591 1519 host->max_id = MAX_TARGETS_2200; 1592 1520 ha->mbx_count = MAILBOX_REGISTER_COUNT; 1593 1521 ha->request_q_length = REQUEST_ENTRY_CNT_2200; 1594 1522 ha->response_q_length = RESPONSE_ENTRY_CNT_2300; 1595 1523 ha->last_loop_id = SNS_LAST_LOOP_ID_2300; 1596 - ha->isp_ops.pci_config = qla2300_pci_config; 1597 - ha->isp_ops.intr_handler = qla2300_intr_handler; 1598 - ha->isp_ops.fw_dump = qla2300_fw_dump; 1599 - ha->isp_ops.beacon_on = qla2x00_beacon_on; 1600 - ha->isp_ops.beacon_off = qla2x00_beacon_off; 1601 - ha->isp_ops.beacon_blink = qla2x00_beacon_blink; 1602 1524 ha->gid_list_info_size = 6; 1603 1525 if (IS_QLA2322(ha) || IS_QLA6322(ha)) 1604 1526 ha->optrom_size = OPTROM_SIZE_2322; 1527 + ha->isp_ops = &qla2300_isp_ops; 1605 1528 } else if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { 1606 1529 host->max_id = MAX_TARGETS_2200; 1607 1530 ha->mbx_count = MAILBOX_REGISTER_COUNT; ··· 1606 1537 ha->last_loop_id = SNS_LAST_LOOP_ID_2300; 1607 1538 ha->init_cb_size = sizeof(struct mid_init_cb_24xx); 1608 1539 ha->mgmt_svr_loop_id = 10 + ha->vp_idx; 1609 - ha->isp_ops.pci_config = qla24xx_pci_config; 1610 - ha->isp_ops.reset_chip = qla24xx_reset_chip; 1611 - ha->isp_ops.chip_diag = qla24xx_chip_diag; 1612 - ha->isp_ops.config_rings = qla24xx_config_rings; 1613 - ha->isp_ops.reset_adapter = qla24xx_reset_adapter; 1614 - ha->isp_ops.nvram_config = qla24xx_nvram_config; 1615 - ha->isp_ops.update_fw_options = qla24xx_update_fw_options; 1616 - ha->isp_ops.load_risc = qla24xx_load_risc; 1617 - ha->isp_ops.pci_info_str = qla24xx_pci_info_str; 1618 - ha->isp_ops.fw_version_str = qla24xx_fw_version_str; 1619 - ha->isp_ops.intr_handler = qla24xx_intr_handler; 1620 - ha->isp_ops.enable_intrs = qla24xx_enable_intrs; 1621 - ha->isp_ops.disable_intrs = qla24xx_disable_intrs; 1622 - ha->isp_ops.abort_command = qla24xx_abort_command; 1623 - ha->isp_ops.abort_target = qla24xx_abort_target; 1624 - ha->isp_ops.fabric_login = qla24xx_login_fabric; 1625 - ha->isp_ops.fabric_logout = qla24xx_fabric_logout; 1626 - ha->isp_ops.prep_ms_iocb = qla24xx_prep_ms_iocb; 1627 - ha->isp_ops.prep_ms_fdmi_iocb = qla24xx_prep_ms_fdmi_iocb; 1628 - ha->isp_ops.read_nvram = qla24xx_read_nvram_data; 1629 - ha->isp_ops.write_nvram = qla24xx_write_nvram_data; 1630 - ha->isp_ops.fw_dump = qla24xx_fw_dump; 1631 - ha->isp_ops.read_optrom = qla24xx_read_optrom_data; 1632 - ha->isp_ops.write_optrom = qla24xx_write_optrom_data; 1633 - ha->isp_ops.beacon_on = qla24xx_beacon_on; 1634 - ha->isp_ops.beacon_off = qla24xx_beacon_off; 1635 - ha->isp_ops.beacon_blink = qla24xx_beacon_blink; 1636 - ha->isp_ops.get_flash_version = qla24xx_get_flash_version; 1637 1540 ha->gid_list_info_size = 8; 1638 1541 ha->optrom_size = OPTROM_SIZE_24XX; 1542 + ha->isp_ops = &qla24xx_isp_ops; 1639 1543 } 1640 1544 host->can_queue = ha->request_q_length + 128; 1641 1545 ··· 1676 1634 DEBUG2(printk("DEBUG: detect hba %ld at address = %p\n", 1677 1635 ha->host_no, ha)); 1678 1636 1679 - ha->isp_ops.disable_intrs(ha); 1637 + ha->isp_ops->disable_intrs(ha); 1680 1638 1681 1639 spin_lock_irqsave(&ha->hardware_lock, flags); 1682 1640 reg = ha->iobase; ··· 1702 1660 } 1703 1661 spin_unlock_irqrestore(&ha->hardware_lock, flags); 1704 1662 1705 - ha->isp_ops.enable_intrs(ha); 1663 + ha->isp_ops->enable_intrs(ha); 1706 1664 1707 1665 pci_set_drvdata(pdev, ha); 1708 1666 ··· 1727 1685 " ISP%04X: %s @ %s hdma%c, host#=%ld, fw=%s\n", 1728 1686 qla2x00_version_str, ha->model_number, 1729 1687 ha->model_desc ? ha->model_desc: "", pdev->device, 1730 - ha->isp_ops.pci_info_str(ha, pci_info), pci_name(pdev), 1688 + ha->isp_ops->pci_info_str(ha, pci_info), pci_name(pdev), 1731 1689 ha->flags.enable_64bit_addressing ? '+': '-', ha->host_no, 1732 - ha->isp_ops.fw_version_str(ha, fw_str)); 1690 + ha->isp_ops->fw_version_str(ha, fw_str)); 1733 1691 1734 1692 return 0; 1735 1693 ··· 1795 1753 1796 1754 /* turn-off interrupts on the card */ 1797 1755 if (ha->interrupts_on) 1798 - ha->isp_ops.disable_intrs(ha); 1756 + ha->isp_ops->disable_intrs(ha); 1799 1757 1800 1758 qla2x00_mem_free(ha); 1801 1759 ··· 2353 2311 if (fcport->flags & FCF_FABRIC_DEVICE) { 2354 2312 if (fcport->flags & 2355 2313 FCF_TAPE_PRESENT) 2356 - ha->isp_ops.fabric_logout( 2314 + ha->isp_ops->fabric_logout( 2357 2315 ha, fcport->loop_id, 2358 2316 fcport->d_id.b.domain, 2359 2317 fcport->d_id.b.area, ··· 2433 2391 } 2434 2392 2435 2393 if (!ha->interrupts_on) 2436 - ha->isp_ops.enable_intrs(ha); 2394 + ha->isp_ops->enable_intrs(ha); 2437 2395 2438 2396 if (test_and_clear_bit(BEACON_BLINK_NEEDED, &ha->dpc_flags)) 2439 - ha->isp_ops.beacon_blink(ha); 2397 + ha->isp_ops->beacon_blink(ha); 2440 2398 2441 2399 qla2x00_do_dpc_all_vps(ha); 2442 2400
+6 -6
drivers/scsi/qla2xxx/qla_sup.c
··· 919 919 else 920 920 ha->beacon_color_state = QLA_LED_GRN_ON; 921 921 922 - ha->isp_ops.beacon_blink(ha); /* This turns green LED off */ 922 + ha->isp_ops->beacon_blink(ha); /* This turns green LED off */ 923 923 924 924 ha->fw_options[1] &= ~FO1_SET_EMPHASIS_SWING; 925 925 ha->fw_options[1] &= ~FO1_DISABLE_GPIO6_7; ··· 1031 1031 ha->beacon_blink_led = 0; 1032 1032 ha->beacon_color_state = QLA_LED_ALL_ON; 1033 1033 1034 - ha->isp_ops.beacon_blink(ha); /* Will flip to all off. */ 1034 + ha->isp_ops->beacon_blink(ha); /* Will flip to all off. */ 1035 1035 1036 1036 /* Give control back to firmware. */ 1037 1037 spin_lock_irqsave(&ha->hardware_lock, flags); ··· 1419 1419 1420 1420 /* Suspend HBA. */ 1421 1421 scsi_block_requests(ha->host); 1422 - ha->isp_ops.disable_intrs(ha); 1422 + ha->isp_ops->disable_intrs(ha); 1423 1423 set_bit(MBX_UPDATE_FLASH_ACTIVE, &ha->mbx_cmd_flags); 1424 1424 1425 1425 /* Pause RISC. */ ··· 1705 1705 { 1706 1706 /* Suspend HBA. */ 1707 1707 scsi_block_requests(ha->host); 1708 - ha->isp_ops.disable_intrs(ha); 1708 + ha->isp_ops->disable_intrs(ha); 1709 1709 set_bit(MBX_UPDATE_FLASH_ACTIVE, &ha->mbx_cmd_flags); 1710 1710 1711 1711 /* Go with read. */ ··· 1713 1713 1714 1714 /* Resume HBA. */ 1715 1715 clear_bit(MBX_UPDATE_FLASH_ACTIVE, &ha->mbx_cmd_flags); 1716 - ha->isp_ops.enable_intrs(ha); 1716 + ha->isp_ops->enable_intrs(ha); 1717 1717 scsi_unblock_requests(ha->host); 1718 1718 1719 1719 return buf; ··· 1727 1727 1728 1728 /* Suspend HBA. */ 1729 1729 scsi_block_requests(ha->host); 1730 - ha->isp_ops.disable_intrs(ha); 1730 + ha->isp_ops->disable_intrs(ha); 1731 1731 set_bit(MBX_UPDATE_FLASH_ACTIVE, &ha->mbx_cmd_flags); 1732 1732 1733 1733 /* Go with write. */