aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2007-07-19 18:06:00 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-07-20 10:24:22 -0400
commitfd34f55694a784052981977cb84c50ea369ffc68 (patch)
treef80c089762ff6a2ed53edc29a1ccf05d5a4c4d0d
parent8084fe168a5252548cdddf2ed181c337fecd0523 (diff)
[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>
-rw-r--r--drivers/scsi/qla2xxx/qla_attr.c23
-rw-r--r--drivers/scsi/qla2xxx/qla_def.h2
-rw-r--r--drivers/scsi/qla2xxx/qla_gs.c33
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c54
-rw-r--r--drivers/scsi/qla2xxx/qla_inline.h2
-rw-r--r--drivers/scsi/qla2xxx/qla_iocb.c4
-rw-r--r--drivers/scsi/qla2xxx/qla_isr.c10
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c300
-rw-r--r--drivers/scsi/qla2xxx/qla_sup.c12
9 files changed, 244 insertions, 196 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index e406eae3e08..362353dcb34 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -98,7 +98,7 @@ qla2x00_sysfs_read_nvram(struct kobject *kobj,
98 98
99 /* Read NVRAM. */ 99 /* Read NVRAM. */
100 spin_lock_irqsave(&ha->hardware_lock, flags); 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 ha->nvram_size); 102 ha->nvram_size);
103 spin_unlock_irqrestore(&ha->hardware_lock, flags); 103 spin_unlock_irqrestore(&ha->hardware_lock, flags);
104 104
@@ -143,7 +143,7 @@ qla2x00_sysfs_write_nvram(struct kobject *kobj,
143 143
144 /* Write NVRAM. */ 144 /* Write NVRAM. */
145 spin_lock_irqsave(&ha->hardware_lock, flags); 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 spin_unlock_irqrestore(&ha->hardware_lock, flags); 147 spin_unlock_irqrestore(&ha->hardware_lock, flags);
148 148
149 set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); 149 set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
@@ -252,7 +252,7 @@ qla2x00_sysfs_write_optrom_ctl(struct kobject *kobj,
252 } 252 }
253 253
254 memset(ha->optrom_buffer, 0, ha->optrom_size); 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 ha->optrom_size); 256 ha->optrom_size);
257 break; 257 break;
258 case 2: 258 case 2:
@@ -275,7 +275,7 @@ qla2x00_sysfs_write_optrom_ctl(struct kobject *kobj,
275 if (ha->optrom_state != QLA_SWRITING) 275 if (ha->optrom_state != QLA_SWRITING)
276 break; 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 ha->optrom_size); 279 ha->optrom_size);
280 break; 280 break;
281 } 281 }
@@ -305,7 +305,8 @@ qla2x00_sysfs_read_vpd(struct kobject *kobj,
305 305
306 /* Read NVRAM. */ 306 /* Read NVRAM. */
307 spin_lock_irqsave(&ha->hardware_lock, flags); 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 spin_unlock_irqrestore(&ha->hardware_lock, flags); 310 spin_unlock_irqrestore(&ha->hardware_lock, flags);
310 311
311 return ha->vpd_size; 312 return ha->vpd_size;
@@ -325,7 +326,7 @@ qla2x00_sysfs_write_vpd(struct kobject *kobj,
325 326
326 /* Write NVRAM. */ 327 /* Write NVRAM. */
327 spin_lock_irqsave(&ha->hardware_lock, flags); 328 spin_lock_irqsave(&ha->hardware_lock, flags);
328 ha->isp_ops.write_nvram(ha, (uint8_t *)buf, ha->vpd_base, count); 329 ha->isp_ops->write_nvram(ha, (uint8_t *)buf, ha->vpd_base, count);
329 spin_unlock_irqrestore(&ha->hardware_lock, flags); 330 spin_unlock_irqrestore(&ha->hardware_lock, flags);
330 331
331 return count; 332 return count;
@@ -437,7 +438,7 @@ qla2x00_free_sysfs_attr(scsi_qla_host_t *ha)
437 } 438 }
438 439
439 if (ha->beacon_blink_led == 1) 440 if (ha->beacon_blink_led == 1)
440 ha->isp_ops.beacon_off(ha); 441 ha->isp_ops->beacon_off(ha);
441} 442}
442 443
443/* Scsi_Host attributes. */ 444/* Scsi_Host attributes. */
@@ -455,7 +456,7 @@ qla2x00_fw_version_show(struct class_device *cdev, char *buf)
455 char fw_str[30]; 456 char fw_str[30];
456 457
457 return snprintf(buf, PAGE_SIZE, "%s\n", 458 return snprintf(buf, PAGE_SIZE, "%s\n",
458 ha->isp_ops.fw_version_str(ha, fw_str)); 459 ha->isp_ops->fw_version_str(ha, fw_str));
459} 460}
460 461
461static ssize_t 462static ssize_t
@@ -507,7 +508,7 @@ qla2x00_pci_info_show(struct class_device *cdev, char *buf)
507 char pci_info[30]; 508 char pci_info[30];
508 509
509 return snprintf(buf, PAGE_SIZE, "%s\n", 510 return snprintf(buf, PAGE_SIZE, "%s\n",
510 ha->isp_ops.pci_info_str(ha, pci_info)); 511 ha->isp_ops->pci_info_str(ha, pci_info));
511} 512}
512 513
513static ssize_t 514static ssize_t
@@ -652,9 +653,9 @@ qla2x00_beacon_store(struct class_device *cdev, const char *buf,
652 return -EINVAL; 653 return -EINVAL;
653 654
654 if (val) 655 if (val)
655 rval = ha->isp_ops.beacon_on(ha); 656 rval = ha->isp_ops->beacon_on(ha);
656 else 657 else
657 rval = ha->isp_ops.beacon_off(ha); 658 rval = ha->isp_ops->beacon_off(ha);
658 659
659 if (rval != QLA_SUCCESS) 660 if (rval != QLA_SUCCESS)
660 count = 0; 661 count = 0;
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index f98eb6340e1..27a23966b1f 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -2286,7 +2286,7 @@ typedef struct scsi_qla_host {
2286 uint16_t rsp_ring_index; /* Current index. */ 2286 uint16_t rsp_ring_index; /* Current index. */
2287 uint16_t response_q_length; 2287 uint16_t response_q_length;
2288 2288
2289 struct isp_operations isp_ops; 2289 struct isp_operations *isp_ops;
2290 2290
2291 /* Outstandings ISP commands. */ 2291 /* Outstandings ISP commands. */
2292 srb_t *outstanding_cmds[MAX_OUTSTANDING_COMMANDS]; 2292 srb_t *outstanding_cmds[MAX_OUTSTANDING_COMMANDS];
diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
index 301279a1a49..e393c848ea6 100644
--- a/drivers/scsi/qla2xxx/qla_gs.c
+++ b/drivers/scsi/qla2xxx/qla_gs.c
@@ -180,7 +180,8 @@ qla2x00_ga_nxt(scsi_qla_host_t *ha, fc_port_t *fcport)
180 180
181 /* Issue GA_NXT */ 181 /* Issue GA_NXT */
182 /* Prepare common MS IOCB */ 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 /* Prepare CT request */ 186 /* Prepare CT request */
186 ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, GA_NXT_CMD, 187 ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, GA_NXT_CMD,
@@ -266,7 +267,8 @@ qla2x00_gid_pt(scsi_qla_host_t *ha, sw_info_t *list)
266 267
267 /* Issue GID_PT */ 268 /* Issue GID_PT */
268 /* Prepare common MS IOCB */ 269 /* Prepare common MS IOCB */
269 ms_pkt = ha->isp_ops.prep_ms_iocb(ha, GID_PT_REQ_SIZE, GID_PT_RSP_SIZE); 270 ms_pkt = ha->isp_ops->prep_ms_iocb(ha, GID_PT_REQ_SIZE,
271 GID_PT_RSP_SIZE);
270 272
271 /* Prepare CT request */ 273 /* Prepare CT request */
272 ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, GID_PT_CMD, 274 ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, GID_PT_CMD,
@@ -338,7 +340,7 @@ qla2x00_gpn_id(scsi_qla_host_t *ha, sw_info_t *list)
338 for (i = 0; i < MAX_FIBRE_DEVICES; i++) { 340 for (i = 0; i < MAX_FIBRE_DEVICES; i++) {
339 /* Issue GPN_ID */ 341 /* Issue GPN_ID */
340 /* Prepare common MS IOCB */ 342 /* Prepare common MS IOCB */
341 ms_pkt = ha->isp_ops.prep_ms_iocb(ha, GPN_ID_REQ_SIZE, 343 ms_pkt = ha->isp_ops->prep_ms_iocb(ha, GPN_ID_REQ_SIZE,
342 GPN_ID_RSP_SIZE); 344 GPN_ID_RSP_SIZE);
343 345
344 /* Prepare CT request */ 346 /* Prepare CT request */
@@ -399,7 +401,7 @@ qla2x00_gnn_id(scsi_qla_host_t *ha, sw_info_t *list)
399 for (i = 0; i < MAX_FIBRE_DEVICES; i++) { 401 for (i = 0; i < MAX_FIBRE_DEVICES; i++) {
400 /* Issue GNN_ID */ 402 /* Issue GNN_ID */
401 /* Prepare common MS IOCB */ 403 /* Prepare common MS IOCB */
402 ms_pkt = ha->isp_ops.prep_ms_iocb(ha, GNN_ID_REQ_SIZE, 404 ms_pkt = ha->isp_ops->prep_ms_iocb(ha, GNN_ID_REQ_SIZE,
403 GNN_ID_RSP_SIZE); 405 GNN_ID_RSP_SIZE);
404 406
405 /* Prepare CT request */ 407 /* Prepare CT request */
@@ -473,7 +475,8 @@ qla2x00_rft_id(scsi_qla_host_t *ha)
473 475
474 /* Issue RFT_ID */ 476 /* Issue RFT_ID */
475 /* Prepare common MS IOCB */ 477 /* Prepare common MS IOCB */
476 ms_pkt = ha->isp_ops.prep_ms_iocb(ha, RFT_ID_REQ_SIZE, RFT_ID_RSP_SIZE); 478 ms_pkt = ha->isp_ops->prep_ms_iocb(ha, RFT_ID_REQ_SIZE,
479 RFT_ID_RSP_SIZE);
477 480
478 /* Prepare CT request */ 481 /* Prepare CT request */
479 ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, RFT_ID_CMD, 482 ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, RFT_ID_CMD,
@@ -528,7 +531,8 @@ qla2x00_rff_id(scsi_qla_host_t *ha)
528 531
529 /* Issue RFF_ID */ 532 /* Issue RFF_ID */
530 /* Prepare common MS IOCB */ 533 /* Prepare common MS IOCB */
531 ms_pkt = ha->isp_ops.prep_ms_iocb(ha, RFF_ID_REQ_SIZE, RFF_ID_RSP_SIZE); 534 ms_pkt = ha->isp_ops->prep_ms_iocb(ha, RFF_ID_REQ_SIZE,
535 RFF_ID_RSP_SIZE);
532 536
533 /* Prepare CT request */ 537 /* Prepare CT request */
534 ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, RFF_ID_CMD, 538 ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, RFF_ID_CMD,
@@ -582,7 +586,8 @@ qla2x00_rnn_id(scsi_qla_host_t *ha)
582 586
583 /* Issue RNN_ID */ 587 /* Issue RNN_ID */
584 /* Prepare common MS IOCB */ 588 /* Prepare common MS IOCB */
585 ms_pkt = ha->isp_ops.prep_ms_iocb(ha, RNN_ID_REQ_SIZE, RNN_ID_RSP_SIZE); 589 ms_pkt = ha->isp_ops->prep_ms_iocb(ha, RNN_ID_REQ_SIZE,
590 RNN_ID_RSP_SIZE);
586 591
587 /* Prepare CT request */ 592 /* Prepare CT request */
588 ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, RNN_ID_CMD, 593 ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, RNN_ID_CMD,
@@ -645,7 +650,7 @@ qla2x00_rsnn_nn(scsi_qla_host_t *ha)
645 /* Issue RSNN_NN */ 650 /* Issue RSNN_NN */
646 /* Prepare common MS IOCB */ 651 /* Prepare common MS IOCB */
647 /* Request size adjusted after CT preparation */ 652 /* Request size adjusted after CT preparation */
648 ms_pkt = ha->isp_ops.prep_ms_iocb(ha, 0, RSNN_NN_RSP_SIZE); 653 ms_pkt = ha->isp_ops->prep_ms_iocb(ha, 0, RSNN_NN_RSP_SIZE);
649 654
650 /* Prepare CT request */ 655 /* Prepare CT request */
651 ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, RSNN_NN_CMD, 656 ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, RSNN_NN_CMD,
@@ -1102,7 +1107,7 @@ qla2x00_mgmt_svr_login(scsi_qla_host_t *ha)
1102 if (ha->flags.management_server_logged_in) 1107 if (ha->flags.management_server_logged_in)
1103 return ret; 1108 return ret;
1104 1109
1105 ha->isp_ops.fabric_login(ha, ha->mgmt_svr_loop_id, 0xff, 0xff, 0xfa, 1110 ha->isp_ops->fabric_login(ha, ha->mgmt_svr_loop_id, 0xff, 0xff, 0xfa,
1106 mb, BIT_1); 1111 mb, BIT_1);
1107 if (mb[0] != MBS_COMMAND_COMPLETE) { 1112 if (mb[0] != MBS_COMMAND_COMPLETE) {
1108 DEBUG2_13(printk("%s(%ld): Failed MANAGEMENT_SERVER login: " 1113 DEBUG2_13(printk("%s(%ld): Failed MANAGEMENT_SERVER login: "
@@ -1253,7 +1258,7 @@ qla2x00_fdmi_rhba(scsi_qla_host_t *ha)
1253 /* Issue RHBA */ 1258 /* Issue RHBA */
1254 /* Prepare common MS IOCB */ 1259 /* Prepare common MS IOCB */
1255 /* Request size adjusted after CT preparation */ 1260 /* Request size adjusted after CT preparation */
1256 ms_pkt = ha->isp_ops.prep_ms_fdmi_iocb(ha, 0, RHBA_RSP_SIZE); 1261 ms_pkt = ha->isp_ops->prep_ms_fdmi_iocb(ha, 0, RHBA_RSP_SIZE);
1257 1262
1258 /* Prepare CT request */ 1263 /* Prepare CT request */
1259 ct_req = qla2x00_prep_ct_fdmi_req(&ha->ct_sns->p.req, RHBA_CMD, 1264 ct_req = qla2x00_prep_ct_fdmi_req(&ha->ct_sns->p.req, RHBA_CMD,
@@ -1373,7 +1378,7 @@ qla2x00_fdmi_rhba(scsi_qla_host_t *ha)
1373 /* Firmware version */ 1378 /* Firmware version */
1374 eiter = (struct ct_fdmi_hba_attr *) (entries + size); 1379 eiter = (struct ct_fdmi_hba_attr *) (entries + size);
1375 eiter->type = __constant_cpu_to_be16(FDMI_HBA_FIRMWARE_VERSION); 1380 eiter->type = __constant_cpu_to_be16(FDMI_HBA_FIRMWARE_VERSION);
1376 ha->isp_ops.fw_version_str(ha, eiter->a.fw_version); 1381 ha->isp_ops->fw_version_str(ha, eiter->a.fw_version);
1377 alen = strlen(eiter->a.fw_version); 1382 alen = strlen(eiter->a.fw_version);
1378 alen += (alen & 3) ? (4 - (alen & 3)) : 4; 1383 alen += (alen & 3) ? (4 - (alen & 3)) : 4;
1379 eiter->len = cpu_to_be16(4 + alen); 1384 eiter->len = cpu_to_be16(4 + alen);
@@ -1439,7 +1444,7 @@ qla2x00_fdmi_dhba(scsi_qla_host_t *ha)
1439 1444
1440 /* Issue RPA */ 1445 /* Issue RPA */
1441 /* Prepare common MS IOCB */ 1446 /* Prepare common MS IOCB */
1442 ms_pkt = ha->isp_ops.prep_ms_fdmi_iocb(ha, DHBA_REQ_SIZE, 1447 ms_pkt = ha->isp_ops->prep_ms_fdmi_iocb(ha, DHBA_REQ_SIZE,
1443 DHBA_RSP_SIZE); 1448 DHBA_RSP_SIZE);
1444 1449
1445 /* Prepare CT request */ 1450 /* Prepare CT request */
@@ -1497,7 +1502,7 @@ qla2x00_fdmi_rpa(scsi_qla_host_t *ha)
1497 /* Issue RPA */ 1502 /* Issue RPA */
1498 /* Prepare common MS IOCB */ 1503 /* Prepare common MS IOCB */
1499 /* Request size adjusted after CT preparation */ 1504 /* Request size adjusted after CT preparation */
1500 ms_pkt = ha->isp_ops.prep_ms_fdmi_iocb(ha, 0, RPA_RSP_SIZE); 1505 ms_pkt = ha->isp_ops->prep_ms_fdmi_iocb(ha, 0, RPA_RSP_SIZE);
1501 1506
1502 /* Prepare CT request */ 1507 /* Prepare CT request */
1503 ct_req = qla2x00_prep_ct_fdmi_req(&ha->ct_sns->p.req, RPA_CMD, 1508 ct_req = qla2x00_prep_ct_fdmi_req(&ha->ct_sns->p.req, RPA_CMD,
@@ -1697,7 +1702,7 @@ qla2x00_gfpn_id(scsi_qla_host_t *ha, sw_info_t *list)
1697 memset(list[i].fabric_port_name, 0, WWN_SIZE); 1702 memset(list[i].fabric_port_name, 0, WWN_SIZE);
1698 1703
1699 /* Prepare common MS IOCB */ 1704 /* Prepare common MS IOCB */
1700 ms_pkt = ha->isp_ops.prep_ms_iocb(ha, GFPN_ID_REQ_SIZE, 1705 ms_pkt = ha->isp_ops->prep_ms_iocb(ha, GFPN_ID_REQ_SIZE,
1701 GFPN_ID_RSP_SIZE); 1706 GFPN_ID_RSP_SIZE);
1702 1707
1703 /* Prepare CT request */ 1708 /* Prepare CT request */
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index dbf64bb1f3d..401a8798ce5 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++);
diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h
index 91706db1391..8e3b04464cf 100644
--- a/drivers/scsi/qla2xxx/qla_inline.h
+++ b/drivers/scsi/qla2xxx/qla_inline.h
@@ -104,7 +104,7 @@ static __inline__ void qla2x00_poll(scsi_qla_host_t *);
104static inline void 104static inline void
105qla2x00_poll(scsi_qla_host_t *ha) 105qla2x00_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
110static __inline__ void qla2x00_check_fabric_devices(scsi_qla_host_t *); 110static __inline__ void qla2x00_check_fabric_devices(scsi_qla_host_t *);
diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c
index 49208c6994f..3a5e78cb6b3 100644
--- a/drivers/scsi/qla2xxx/qla_iocb.c
+++ b/drivers/scsi/qla2xxx/qla_iocb.c
@@ -326,7 +326,7 @@ qla2x00_start_scsi(srb_t *sp)
326 tot_dsds = nseg; 326 tot_dsds = nseg;
327 327
328 /* Calculate the number of request entries needed. */ 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 if (ha->req_q_cnt < (req_cnt + 2)) { 330 if (ha->req_q_cnt < (req_cnt + 2)) {
331 cnt = RD_REG_WORD_RELAXED(ISP_REQ_Q_OUT(ha, reg)); 331 cnt = RD_REG_WORD_RELAXED(ISP_REQ_Q_OUT(ha, reg));
332 if (ha->req_ring_index < cnt) 332 if (ha->req_ring_index < cnt)
@@ -364,7 +364,7 @@ qla2x00_start_scsi(srb_t *sp)
364 cmd_pkt->byte_count = cpu_to_le32((uint32_t)scsi_bufflen(cmd)); 364 cmd_pkt->byte_count = cpu_to_le32((uint32_t)scsi_bufflen(cmd));
365 365
366 /* Build IOCB segments */ 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 /* Set total data segment count. */ 369 /* Set total data segment count. */
370 cmd_pkt->entry_count = (uint8_t)req_cnt; 370 cmd_pkt->entry_count = (uint8_t)req_cnt;
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 4a50b931ca6..259710bc98d 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -143,7 +143,7 @@ qla2300_intr_handler(int irq, void *dev_id)
143 WRT_REG_WORD(&reg->hccr, HCCR_RESET_RISC); 143 WRT_REG_WORD(&reg->hccr, HCCR_RESET_RISC);
144 RD_REG_WORD(&reg->hccr); 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 set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); 147 set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
148 break; 148 break;
149 } else if ((stat & HSR_RISC_INT) == 0) 149 } else if ((stat & HSR_RISC_INT) == 0)
@@ -334,7 +334,7 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb)
334 "ISP System Error - mbx1=%xh mbx2=%xh mbx3=%xh.\n", 334 "ISP System Error - mbx1=%xh mbx2=%xh mbx3=%xh.\n",
335 mb[1], mb[2], mb[3]); 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 if (IS_FWI2_CAPABLE(ha)) { 339 if (IS_FWI2_CAPABLE(ha)) {
340 if (mb[1] == 0 && mb[2] == 0) { 340 if (mb[1] == 0 && mb[2] == 0) {
@@ -1502,7 +1502,7 @@ qla24xx_intr_handler(int irq, void *dev_id)
1502 1502
1503 qla_printk(KERN_INFO, ha, "RISC paused -- HCCR=%x, " 1503 qla_printk(KERN_INFO, ha, "RISC paused -- HCCR=%x, "
1504 "Dumping firmware!\n", hccr); 1504 "Dumping firmware!\n", hccr);
1505 ha->isp_ops.fw_dump(ha, 1); 1505 ha->isp_ops->fw_dump(ha, 1);
1506 set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); 1506 set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
1507 break; 1507 break;
1508 } else if ((stat & HSRX_RISC_INT) == 0) 1508 } else if ((stat & HSRX_RISC_INT) == 0)
@@ -1636,7 +1636,7 @@ qla24xx_msix_default(int irq, void *dev_id)
1636 1636
1637 qla_printk(KERN_INFO, ha, "RISC paused -- HCCR=%x, " 1637 qla_printk(KERN_INFO, ha, "RISC paused -- HCCR=%x, "
1638 "Dumping firmware!\n", hccr); 1638 "Dumping firmware!\n", hccr);
1639 ha->isp_ops.fw_dump(ha, 1); 1639 ha->isp_ops->fw_dump(ha, 1);
1640 set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); 1640 set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
1641 break; 1641 break;
1642 } else if ((stat & HSRX_RISC_INT) == 0) 1642 } else if ((stat & HSRX_RISC_INT) == 0)
@@ -1791,7 +1791,7 @@ skip_msix:
1791 } 1791 }
1792skip_msi: 1792skip_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 IRQF_DISABLED|IRQF_SHARED, QLA2XXX_DRIVER_NAME, ha); 1795 IRQF_DISABLED|IRQF_SHARED, QLA2XXX_DRIVER_NAME, ha);
1796 if (!ret) { 1796 if (!ret) {
1797 ha->flags.inta_enabled = 1; 1797 ha->flags.inta_enabled = 1;
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index d19fd7978f8..e870e7cf62f 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -681,7 +681,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
681 DEBUG3(qla2x00_print_scsi_cmd(cmd)); 681 DEBUG3(qla2x00_print_scsi_cmd(cmd));
682 682
683 spin_unlock_irqrestore(&pha->hardware_lock, flags); 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 DEBUG2(printk("%s(%ld): abort_command " 685 DEBUG2(printk("%s(%ld): abort_command "
686 "mbx failed.\n", __func__, ha->host_no)); 686 "mbx failed.\n", __func__, ha->host_no));
687 } else { 687 } else {
@@ -813,7 +813,7 @@ qla2xxx_eh_device_reset(struct scsi_cmnd *cmd)
813#if defined(LOGOUT_AFTER_DEVICE_RESET) 813#if defined(LOGOUT_AFTER_DEVICE_RESET)
814 if (ret == SUCCESS) { 814 if (ret == SUCCESS) {
815 if (fcport->flags & FC_FABRIC_DEVICE) { 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 qla2x00_mark_device_lost(ha, fcport, 0, 0); 817 qla2x00_mark_device_lost(ha, fcport, 0, 0);
818 } 818 }
819 } 819 }
@@ -1105,7 +1105,7 @@ static int
1105qla2x00_device_reset(scsi_qla_host_t *ha, fc_port_t *reset_fcport) 1105qla2x00_device_reset(scsi_qla_host_t *ha, fc_port_t *reset_fcport)
1106{ 1106{
1107 /* Abort Target command will clear Reservation */ 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
1111static int 1111static int
@@ -1184,8 +1184,8 @@ qla2x00_config_dma_addressing(scsi_qla_host_t *ha)
1184 !pci_set_consistent_dma_mask(ha->pdev, DMA_64BIT_MASK)) { 1184 !pci_set_consistent_dma_mask(ha->pdev, DMA_64BIT_MASK)) {
1185 /* Ok, a 64bit DMA mask is applicable. */ 1185 /* Ok, a 64bit DMA mask is applicable. */
1186 ha->flags.enable_64bit_addressing = 1; 1186 ha->flags.enable_64bit_addressing = 1;
1187 ha->isp_ops.calc_req_entries = qla2x00_calc_iocbs_64; 1187 ha->isp_ops->calc_req_entries = qla2x00_calc_iocbs_64;
1188 ha->isp_ops.build_iocbs = qla2x00_build_scsi_iocbs_64; 1188 ha->isp_ops->build_iocbs = qla2x00_build_scsi_iocbs_64;
1189 return; 1189 return;
1190 } 1190 }
1191 } 1191 }
@@ -1194,6 +1194,160 @@ qla2x00_config_dma_addressing(scsi_qla_host_t *ha)
1194 pci_set_consistent_dma_mask(ha->pdev, DMA_32BIT_MASK); 1194 pci_set_consistent_dma_mask(ha->pdev, DMA_32BIT_MASK);
1195} 1195}
1196 1196
1197static void
1198qla2x00_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
1212static void
1213qla2x00_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
1226static void
1227qla24xx_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
1239static void
1240qla24xx_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
1252static 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
1285static 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
1318static 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};
1350
1197static inline void 1351static inline void
1198qla2x00_set_isp_flags(scsi_qla_host_t *ha) 1352qla2x00_set_isp_flags(scsi_qla_host_t *ha)
1199{ 1353{
@@ -1329,61 +1483,6 @@ iospace_error_exit:
1329} 1483}
1330 1484
1331static void 1485static void
1332qla2x00_enable_intrs(scsi_qla_host_t *ha)
1333{
1334 unsigned long flags = 0;
1335 struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
1336
1337 spin_lock_irqsave(&ha->hardware_lock, flags);
1338 ha->interrupts_on = 1;
1339 /* enable risc and host interrupts */
1340 WRT_REG_WORD(&reg->ictrl, ICR_EN_INT | ICR_EN_RISC);
1341 RD_REG_WORD(&reg->ictrl);
1342 spin_unlock_irqrestore(&ha->hardware_lock, flags);
1343
1344}
1345
1346static void
1347qla2x00_disable_intrs(scsi_qla_host_t *ha)
1348{
1349 unsigned long flags = 0;
1350 struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
1351
1352 spin_lock_irqsave(&ha->hardware_lock, flags);
1353 ha->interrupts_on = 0;
1354 /* disable risc and host interrupts */
1355 WRT_REG_WORD(&reg->ictrl, 0);
1356 RD_REG_WORD(&reg->ictrl);
1357 spin_unlock_irqrestore(&ha->hardware_lock, flags);
1358}
1359
1360static void
1361qla24xx_enable_intrs(scsi_qla_host_t *ha)
1362{
1363 unsigned long flags = 0;
1364 struct device_reg_24xx __iomem *reg = &ha->iobase->isp24;
1365
1366 spin_lock_irqsave(&ha->hardware_lock, flags);
1367 ha->interrupts_on = 1;
1368 WRT_REG_DWORD(&reg->ictrl, ICRX_EN_RISC_INT);
1369 RD_REG_DWORD(&reg->ictrl);
1370 spin_unlock_irqrestore(&ha->hardware_lock, flags);
1371}
1372
1373static void
1374qla24xx_disable_intrs(scsi_qla_host_t *ha)
1375{
1376 unsigned long flags = 0;
1377 struct device_reg_24xx __iomem *reg = &ha->iobase->isp24;
1378
1379 spin_lock_irqsave(&ha->hardware_lock, flags);
1380 ha->interrupts_on = 0;
1381 WRT_REG_DWORD(&reg->ictrl, 0);
1382 RD_REG_DWORD(&reg->ictrl);
1383 spin_unlock_irqrestore(&ha->hardware_lock, flags);
1384}
1385
1386static void
1387qla2xxx_scan_start(struct Scsi_Host *shost) 1486qla2xxx_scan_start(struct Scsi_Host *shost)
1388{ 1487{
1389 scsi_qla_host_t *ha = (scsi_qla_host_t *)shost->hostdata; 1488 scsi_qla_host_t *ha = (scsi_qla_host_t *)shost->hostdata;
@@ -1472,33 +1571,6 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
1472 ha->max_q_depth = ql2xmaxqdepth; 1571 ha->max_q_depth = ql2xmaxqdepth;
1473 1572
1474 /* Assign ISP specific operations. */ 1573 /* Assign ISP specific operations. */
1475 ha->isp_ops.pci_config = qla2100_pci_config;
1476 ha->isp_ops.reset_chip = qla2x00_reset_chip;
1477 ha->isp_ops.chip_diag = qla2x00_chip_diag;
1478 ha->isp_ops.config_rings = qla2x00_config_rings;
1479 ha->isp_ops.reset_adapter = qla2x00_reset_adapter;
1480 ha->isp_ops.nvram_config = qla2x00_nvram_config;
1481 ha->isp_ops.update_fw_options = qla2x00_update_fw_options;
1482 ha->isp_ops.load_risc = qla2x00_load_risc;
1483 ha->isp_ops.pci_info_str = qla2x00_pci_info_str;
1484 ha->isp_ops.fw_version_str = qla2x00_fw_version_str;
1485 ha->isp_ops.intr_handler = qla2100_intr_handler;
1486 ha->isp_ops.enable_intrs = qla2x00_enable_intrs;
1487 ha->isp_ops.disable_intrs = qla2x00_disable_intrs;
1488 ha->isp_ops.abort_command = qla2x00_abort_command;
1489 ha->isp_ops.abort_target = qla2x00_abort_target;
1490 ha->isp_ops.fabric_login = qla2x00_login_fabric;
1491 ha->isp_ops.fabric_logout = qla2x00_fabric_logout;
1492 ha->isp_ops.calc_req_entries = qla2x00_calc_iocbs_32;
1493 ha->isp_ops.build_iocbs = qla2x00_build_scsi_iocbs_32;
1494 ha->isp_ops.prep_ms_iocb = qla2x00_prep_ms_iocb;
1495 ha->isp_ops.prep_ms_fdmi_iocb = qla2x00_prep_ms_fdmi_iocb;
1496 ha->isp_ops.read_nvram = qla2x00_read_nvram_data;
1497 ha->isp_ops.write_nvram = qla2x00_write_nvram_data;
1498 ha->isp_ops.fw_dump = qla2100_fw_dump;
1499 ha->isp_ops.read_optrom = qla2x00_read_optrom_data;
1500 ha->isp_ops.write_optrom = qla2x00_write_optrom_data;
1501 ha->isp_ops.get_flash_version = qla2x00_get_flash_version;
1502 if (IS_QLA2100(ha)) { 1574 if (IS_QLA2100(ha)) {
1503 host->max_id = MAX_TARGETS_2100; 1575 host->max_id = MAX_TARGETS_2100;
1504 ha->mbx_count = MAILBOX_REGISTER_COUNT_2100; 1576 ha->mbx_count = MAILBOX_REGISTER_COUNT_2100;
@@ -1507,6 +1579,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
1507 ha->last_loop_id = SNS_LAST_LOOP_ID_2100; 1579 ha->last_loop_id = SNS_LAST_LOOP_ID_2100;
1508 host->sg_tablesize = 32; 1580 host->sg_tablesize = 32;
1509 ha->gid_list_info_size = 4; 1581 ha->gid_list_info_size = 4;
1582 ha->isp_ops = &qla2100_isp_ops;
1510 } else if (IS_QLA2200(ha)) { 1583 } else if (IS_QLA2200(ha)) {
1511 host->max_id = MAX_TARGETS_2200; 1584 host->max_id = MAX_TARGETS_2200;
1512 ha->mbx_count = MAILBOX_REGISTER_COUNT; 1585 ha->mbx_count = MAILBOX_REGISTER_COUNT;
@@ -1514,21 +1587,17 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
1514 ha->response_q_length = RESPONSE_ENTRY_CNT_2100; 1587 ha->response_q_length = RESPONSE_ENTRY_CNT_2100;
1515 ha->last_loop_id = SNS_LAST_LOOP_ID_2100; 1588 ha->last_loop_id = SNS_LAST_LOOP_ID_2100;
1516 ha->gid_list_info_size = 4; 1589 ha->gid_list_info_size = 4;
1590 ha->isp_ops = &qla2100_isp_ops;
1517 } else if (IS_QLA23XX(ha)) { 1591 } else if (IS_QLA23XX(ha)) {
1518 host->max_id = MAX_TARGETS_2200; 1592 host->max_id = MAX_TARGETS_2200;
1519 ha->mbx_count = MAILBOX_REGISTER_COUNT; 1593 ha->mbx_count = MAILBOX_REGISTER_COUNT;
1520 ha->request_q_length = REQUEST_ENTRY_CNT_2200; 1594 ha->request_q_length = REQUEST_ENTRY_CNT_2200;
1521 ha->response_q_length = RESPONSE_ENTRY_CNT_2300; 1595 ha->response_q_length = RESPONSE_ENTRY_CNT_2300;
1522 ha->last_loop_id = SNS_LAST_LOOP_ID_2300; 1596 ha->last_loop_id = SNS_LAST_LOOP_ID_2300;
1523 ha->isp_ops.pci_config = qla2300_pci_config;
1524 ha->isp_ops.intr_handler = qla2300_intr_handler;
1525 ha->isp_ops.fw_dump = qla2300_fw_dump;
1526 ha->isp_ops.beacon_on = qla2x00_beacon_on;
1527 ha->isp_ops.beacon_off = qla2x00_beacon_off;
1528 ha->isp_ops.beacon_blink = qla2x00_beacon_blink;
1529 ha->gid_list_info_size = 6; 1597 ha->gid_list_info_size = 6;
1530 if (IS_QLA2322(ha) || IS_QLA6322(ha)) 1598 if (IS_QLA2322(ha) || IS_QLA6322(ha))
1531 ha->optrom_size = OPTROM_SIZE_2322; 1599 ha->optrom_size = OPTROM_SIZE_2322;
1600 ha->isp_ops = &qla2300_isp_ops;
1532 } else if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { 1601 } else if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) {
1533 host->max_id = MAX_TARGETS_2200; 1602 host->max_id = MAX_TARGETS_2200;
1534 ha->mbx_count = MAILBOX_REGISTER_COUNT; 1603 ha->mbx_count = MAILBOX_REGISTER_COUNT;
@@ -1537,36 +1606,9 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
1537 ha->last_loop_id = SNS_LAST_LOOP_ID_2300; 1606 ha->last_loop_id = SNS_LAST_LOOP_ID_2300;
1538 ha->init_cb_size = sizeof(struct mid_init_cb_24xx); 1607 ha->init_cb_size = sizeof(struct mid_init_cb_24xx);
1539 ha->mgmt_svr_loop_id = 10 + ha->vp_idx; 1608 ha->mgmt_svr_loop_id = 10 + ha->vp_idx;
1540 ha->isp_ops.pci_config = qla24xx_pci_config;
1541 ha->isp_ops.reset_chip = qla24xx_reset_chip;
1542 ha->isp_ops.chip_diag = qla24xx_chip_diag;
1543 ha->isp_ops.config_rings = qla24xx_config_rings;
1544 ha->isp_ops.reset_adapter = qla24xx_reset_adapter;
1545 ha->isp_ops.nvram_config = qla24xx_nvram_config;
1546 ha->isp_ops.update_fw_options = qla24xx_update_fw_options;
1547 ha->isp_ops.load_risc = qla24xx_load_risc;
1548 ha->isp_ops.pci_info_str = qla24xx_pci_info_str;
1549 ha->isp_ops.fw_version_str = qla24xx_fw_version_str;
1550 ha->isp_ops.intr_handler = qla24xx_intr_handler;
1551 ha->isp_ops.enable_intrs = qla24xx_enable_intrs;
1552 ha->isp_ops.disable_intrs = qla24xx_disable_intrs;
1553 ha->isp_ops.abort_command = qla24xx_abort_command;
1554 ha->isp_ops.abort_target = qla24xx_abort_target;
1555 ha->isp_ops.fabric_login = qla24xx_login_fabric;
1556 ha->isp_ops.fabric_logout = qla24xx_fabric_logout;
1557 ha->isp_ops.prep_ms_iocb = qla24xx_prep_ms_iocb;
1558 ha->isp_ops.prep_ms_fdmi_iocb = qla24xx_prep_ms_fdmi_iocb;
1559 ha->isp_ops.read_nvram = qla24xx_read_nvram_data;
1560 ha->isp_ops.write_nvram = qla24xx_write_nvram_data;
1561 ha->isp_ops.fw_dump = qla24xx_fw_dump;
1562 ha->isp_ops.read_optrom = qla24xx_read_optrom_data;
1563 ha->isp_ops.write_optrom = qla24xx_write_optrom_data;
1564 ha->isp_ops.beacon_on = qla24xx_beacon_on;
1565 ha->isp_ops.beacon_off = qla24xx_beacon_off;
1566 ha->isp_ops.beacon_blink = qla24xx_beacon_blink;
1567 ha->isp_ops.get_flash_version = qla24xx_get_flash_version;
1568 ha->gid_list_info_size = 8; 1609 ha->gid_list_info_size = 8;
1569 ha->optrom_size = OPTROM_SIZE_24XX; 1610 ha->optrom_size = OPTROM_SIZE_24XX;
1611 ha->isp_ops = &qla24xx_isp_ops;
1570 } 1612 }
1571 host->can_queue = ha->request_q_length + 128; 1613 host->can_queue = ha->request_q_length + 128;
1572 1614
@@ -1634,7 +1676,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
1634 DEBUG2(printk("DEBUG: detect hba %ld at address = %p\n", 1676 DEBUG2(printk("DEBUG: detect hba %ld at address = %p\n",
1635 ha->host_no, ha)); 1677 ha->host_no, ha));
1636 1678
1637 ha->isp_ops.disable_intrs(ha); 1679 ha->isp_ops->disable_intrs(ha);
1638 1680
1639 spin_lock_irqsave(&ha->hardware_lock, flags); 1681 spin_lock_irqsave(&ha->hardware_lock, flags);
1640 reg = ha->iobase; 1682 reg = ha->iobase;
@@ -1660,7 +1702,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
1660 } 1702 }
1661 spin_unlock_irqrestore(&ha->hardware_lock, flags); 1703 spin_unlock_irqrestore(&ha->hardware_lock, flags);
1662 1704
1663 ha->isp_ops.enable_intrs(ha); 1705 ha->isp_ops->enable_intrs(ha);
1664 1706
1665 pci_set_drvdata(pdev, ha); 1707 pci_set_drvdata(pdev, ha);
1666 1708
@@ -1685,9 +1727,9 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
1685 " ISP%04X: %s @ %s hdma%c, host#=%ld, fw=%s\n", 1727 " ISP%04X: %s @ %s hdma%c, host#=%ld, fw=%s\n",
1686 qla2x00_version_str, ha->model_number, 1728 qla2x00_version_str, ha->model_number,
1687 ha->model_desc ? ha->model_desc: "", pdev->device, 1729 ha->model_desc ? ha->model_desc: "", pdev->device,
1688 ha->isp_ops.pci_info_str(ha, pci_info), pci_name(pdev), 1730 ha->isp_ops->pci_info_str(ha, pci_info), pci_name(pdev),
1689 ha->flags.enable_64bit_addressing ? '+': '-', ha->host_no, 1731 ha->flags.enable_64bit_addressing ? '+': '-', ha->host_no,
1690 ha->isp_ops.fw_version_str(ha, fw_str)); 1732 ha->isp_ops->fw_version_str(ha, fw_str));
1691 1733
1692 return 0; 1734 return 0;
1693 1735
@@ -1753,7 +1795,7 @@ qla2x00_free_device(scsi_qla_host_t *ha)
1753 1795
1754 /* turn-off interrupts on the card */ 1796 /* turn-off interrupts on the card */
1755 if (ha->interrupts_on) 1797 if (ha->interrupts_on)
1756 ha->isp_ops.disable_intrs(ha); 1798 ha->isp_ops->disable_intrs(ha);
1757 1799
1758 qla2x00_mem_free(ha); 1800 qla2x00_mem_free(ha);
1759 1801
@@ -2311,7 +2353,7 @@ qla2x00_do_dpc(void *data)
2311 if (fcport->flags & FCF_FABRIC_DEVICE) { 2353 if (fcport->flags & FCF_FABRIC_DEVICE) {
2312 if (fcport->flags & 2354 if (fcport->flags &
2313 FCF_TAPE_PRESENT) 2355 FCF_TAPE_PRESENT)
2314 ha->isp_ops.fabric_logout( 2356 ha->isp_ops->fabric_logout(
2315 ha, fcport->loop_id, 2357 ha, fcport->loop_id,
2316 fcport->d_id.b.domain, 2358 fcport->d_id.b.domain,
2317 fcport->d_id.b.area, 2359 fcport->d_id.b.area,
@@ -2391,10 +2433,10 @@ qla2x00_do_dpc(void *data)
2391 } 2433 }
2392 2434
2393 if (!ha->interrupts_on) 2435 if (!ha->interrupts_on)
2394 ha->isp_ops.enable_intrs(ha); 2436 ha->isp_ops->enable_intrs(ha);
2395 2437
2396 if (test_and_clear_bit(BEACON_BLINK_NEEDED, &ha->dpc_flags)) 2438 if (test_and_clear_bit(BEACON_BLINK_NEEDED, &ha->dpc_flags))
2397 ha->isp_ops.beacon_blink(ha); 2439 ha->isp_ops->beacon_blink(ha);
2398 2440
2399 qla2x00_do_dpc_all_vps(ha); 2441 qla2x00_do_dpc_all_vps(ha);
2400 2442
diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c
index 206bda093da..aafd6046723 100644
--- a/drivers/scsi/qla2xxx/qla_sup.c
+++ b/drivers/scsi/qla2xxx/qla_sup.c
@@ -919,7 +919,7 @@ qla2x00_beacon_off(struct scsi_qla_host *ha)
919 else 919 else
920 ha->beacon_color_state = QLA_LED_GRN_ON; 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 ha->fw_options[1] &= ~FO1_SET_EMPHASIS_SWING; 924 ha->fw_options[1] &= ~FO1_SET_EMPHASIS_SWING;
925 ha->fw_options[1] &= ~FO1_DISABLE_GPIO6_7; 925 ha->fw_options[1] &= ~FO1_DISABLE_GPIO6_7;
@@ -1031,7 +1031,7 @@ qla24xx_beacon_off(struct scsi_qla_host *ha)
1031 ha->beacon_blink_led = 0; 1031 ha->beacon_blink_led = 0;
1032 ha->beacon_color_state = QLA_LED_ALL_ON; 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 /* Give control back to firmware. */ 1036 /* Give control back to firmware. */
1037 spin_lock_irqsave(&ha->hardware_lock, flags); 1037 spin_lock_irqsave(&ha->hardware_lock, flags);
@@ -1419,7 +1419,7 @@ qla2x00_suspend_hba(struct scsi_qla_host *ha)
1419 1419
1420 /* Suspend HBA. */ 1420 /* Suspend HBA. */
1421 scsi_block_requests(ha->host); 1421 scsi_block_requests(ha->host);
1422 ha->isp_ops.disable_intrs(ha); 1422 ha->isp_ops->disable_intrs(ha);
1423 set_bit(MBX_UPDATE_FLASH_ACTIVE, &ha->mbx_cmd_flags); 1423 set_bit(MBX_UPDATE_FLASH_ACTIVE, &ha->mbx_cmd_flags);
1424 1424
1425 /* Pause RISC. */ 1425 /* Pause RISC. */
@@ -1705,7 +1705,7 @@ qla24xx_read_optrom_data(struct scsi_qla_host *ha, uint8_t *buf,
1705{ 1705{
1706 /* Suspend HBA. */ 1706 /* Suspend HBA. */
1707 scsi_block_requests(ha->host); 1707 scsi_block_requests(ha->host);
1708 ha->isp_ops.disable_intrs(ha); 1708 ha->isp_ops->disable_intrs(ha);
1709 set_bit(MBX_UPDATE_FLASH_ACTIVE, &ha->mbx_cmd_flags); 1709 set_bit(MBX_UPDATE_FLASH_ACTIVE, &ha->mbx_cmd_flags);
1710 1710
1711 /* Go with read. */ 1711 /* Go with read. */
@@ -1713,7 +1713,7 @@ qla24xx_read_optrom_data(struct scsi_qla_host *ha, uint8_t *buf,
1713 1713
1714 /* Resume HBA. */ 1714 /* Resume HBA. */
1715 clear_bit(MBX_UPDATE_FLASH_ACTIVE, &ha->mbx_cmd_flags); 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 scsi_unblock_requests(ha->host); 1717 scsi_unblock_requests(ha->host);
1718 1718
1719 return buf; 1719 return buf;
@@ -1727,7 +1727,7 @@ qla24xx_write_optrom_data(struct scsi_qla_host *ha, uint8_t *buf,
1727 1727
1728 /* Suspend HBA. */ 1728 /* Suspend HBA. */
1729 scsi_block_requests(ha->host); 1729 scsi_block_requests(ha->host);
1730 ha->isp_ops.disable_intrs(ha); 1730 ha->isp_ops->disable_intrs(ha);
1731 set_bit(MBX_UPDATE_FLASH_ACTIVE, &ha->mbx_cmd_flags); 1731 set_bit(MBX_UPDATE_FLASH_ACTIVE, &ha->mbx_cmd_flags);
1732 1732
1733 /* Go with write. */ 1733 /* Go with write. */