aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_os.c
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 /drivers/scsi/qla2xxx/qla_os.c
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>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c300
1 files changed, 171 insertions, 129 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index d19fd7978f83..e870e7cf62fe 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