diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2009-01-05 14:18:11 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-01-07 16:51:44 -0500 |
commit | 3a03eb797ce76ae8868a1497e9e746ad0add1e3b (patch) | |
tree | 2dc17c39b7c1e35248b35f7433de8711f0b6656a /drivers/scsi/qla2xxx/qla_isr.c | |
parent | 444786d7fdd770f67e29a068ec8ee981d323f7a7 (diff) |
[SCSI] qla2xxx: Add ISP81XX support.
Codes to support new FCoE boards.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_isr.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_isr.c | 60 |
1 files changed, 53 insertions, 7 deletions
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index dcfec7429cc7..789fc576f222 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c | |||
@@ -275,7 +275,7 @@ void | |||
275 | qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) | 275 | qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) |
276 | { | 276 | { |
277 | #define LS_UNKNOWN 2 | 277 | #define LS_UNKNOWN 2 |
278 | static char *link_speeds[5] = { "1", "2", "?", "4", "8" }; | 278 | static char *link_speeds[] = { "1", "2", "?", "4", "8", "10" }; |
279 | char *link_speed; | 279 | char *link_speed; |
280 | uint16_t handle_cnt; | 280 | uint16_t handle_cnt; |
281 | uint16_t cnt; | 281 | uint16_t cnt; |
@@ -288,6 +288,8 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) | |||
288 | 288 | ||
289 | /* Setup to process RIO completion. */ | 289 | /* Setup to process RIO completion. */ |
290 | handle_cnt = 0; | 290 | handle_cnt = 0; |
291 | if (IS_QLA81XX(ha)) | ||
292 | goto skip_rio; | ||
291 | switch (mb[0]) { | 293 | switch (mb[0]) { |
292 | case MBA_SCSI_COMPLETION: | 294 | case MBA_SCSI_COMPLETION: |
293 | handles[0] = le32_to_cpu((uint32_t)((mb[2] << 16) | mb[1])); | 295 | handles[0] = le32_to_cpu((uint32_t)((mb[2] << 16) | mb[1])); |
@@ -339,7 +341,7 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) | |||
339 | default: | 341 | default: |
340 | break; | 342 | break; |
341 | } | 343 | } |
342 | 344 | skip_rio: | |
343 | switch (mb[0]) { | 345 | switch (mb[0]) { |
344 | case MBA_SCSI_COMPLETION: /* Fast Post */ | 346 | case MBA_SCSI_COMPLETION: /* Fast Post */ |
345 | if (!vha->flags.online) | 347 | if (!vha->flags.online) |
@@ -433,6 +435,8 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) | |||
433 | link_speed = link_speeds[LS_UNKNOWN]; | 435 | link_speed = link_speeds[LS_UNKNOWN]; |
434 | if (mb[1] < 5) | 436 | if (mb[1] < 5) |
435 | link_speed = link_speeds[mb[1]]; | 437 | link_speed = link_speeds[mb[1]]; |
438 | else if (mb[1] == 0x13) | ||
439 | link_speed = link_speeds[5]; | ||
436 | ha->link_data_rate = mb[1]; | 440 | ha->link_data_rate = mb[1]; |
437 | } | 441 | } |
438 | 442 | ||
@@ -492,12 +496,17 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) | |||
492 | qla2x00_post_aen_work(vha, FCH_EVT_LIPRESET, mb[1]); | 496 | qla2x00_post_aen_work(vha, FCH_EVT_LIPRESET, mb[1]); |
493 | break; | 497 | break; |
494 | 498 | ||
499 | /* case MBA_DCBX_COMPLETE: */ | ||
495 | case MBA_POINT_TO_POINT: /* Point-to-Point */ | 500 | case MBA_POINT_TO_POINT: /* Point-to-Point */ |
496 | if (IS_QLA2100(ha)) | 501 | if (IS_QLA2100(ha)) |
497 | break; | 502 | break; |
498 | 503 | ||
499 | DEBUG2(printk("scsi(%ld): Asynchronous P2P MODE received.\n", | 504 | if (IS_QLA81XX(ha)) |
500 | vha->host_no)); | 505 | DEBUG2(printk("scsi(%ld): DCBX Completed -- %04x %04x " |
506 | "%04x\n", vha->host_no, mb[1], mb[2], mb[3])); | ||
507 | else | ||
508 | DEBUG2(printk("scsi(%ld): Asynchronous P2P MODE " | ||
509 | "received.\n", vha->host_no)); | ||
501 | 510 | ||
502 | /* | 511 | /* |
503 | * Until there's a transition from loop down to loop up, treat | 512 | * Until there's a transition from loop down to loop up, treat |
@@ -692,6 +701,35 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) | |||
692 | } | 701 | } |
693 | spin_unlock_irqrestore(&ha->cs84xx->access_lock, flags); | 702 | spin_unlock_irqrestore(&ha->cs84xx->access_lock, flags); |
694 | break; | 703 | break; |
704 | case MBA_DCBX_START: | ||
705 | DEBUG2(printk("scsi(%ld): DCBX Started -- %04x %04x %04x\n", | ||
706 | vha->host_no, mb[1], mb[2], mb[3])); | ||
707 | break; | ||
708 | case MBA_DCBX_PARAM_UPDATE: | ||
709 | DEBUG2(printk("scsi(%ld): DCBX Parameters Updated -- " | ||
710 | "%04x %04x %04x\n", vha->host_no, mb[1], mb[2], mb[3])); | ||
711 | break; | ||
712 | case MBA_FCF_CONF_ERR: | ||
713 | DEBUG2(printk("scsi(%ld): FCF Configuration Error -- " | ||
714 | "%04x %04x %04x\n", vha->host_no, mb[1], mb[2], mb[3])); | ||
715 | break; | ||
716 | case MBA_IDC_COMPLETE: | ||
717 | DEBUG2(printk("scsi(%ld): Inter-Driver Commucation " | ||
718 | "Complete -- %04x %04x %04x\n", vha->host_no, mb[1], mb[2], | ||
719 | mb[3])); | ||
720 | break; | ||
721 | case MBA_IDC_NOTIFY: | ||
722 | DEBUG2(printk("scsi(%ld): Inter-Driver Commucation " | ||
723 | "Request Notification -- %04x %04x %04x\n", vha->host_no, | ||
724 | mb[1], mb[2], mb[3])); | ||
725 | /**** Mailbox registers 4 - 7 valid!!! */ | ||
726 | break; | ||
727 | case MBA_IDC_TIME_EXT: | ||
728 | DEBUG2(printk("scsi(%ld): Inter-Driver Commucation " | ||
729 | "Time Extension -- %04x %04x %04x\n", vha->host_no, mb[1], | ||
730 | mb[2], mb[3])); | ||
731 | /**** Mailbox registers 4 - 7 valid!!! */ | ||
732 | break; | ||
695 | } | 733 | } |
696 | 734 | ||
697 | if (!vha->vp_idx && ha->num_vhosts) | 735 | if (!vha->vp_idx && ha->num_vhosts) |
@@ -1504,7 +1542,7 @@ qla2xxx_check_risc_status(scsi_qla_host_t *vha) | |||
1504 | struct qla_hw_data *ha = vha->hw; | 1542 | struct qla_hw_data *ha = vha->hw; |
1505 | struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; | 1543 | struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; |
1506 | 1544 | ||
1507 | if (!IS_QLA25XX(ha)) | 1545 | if (!IS_QLA25XX(ha) && !IS_QLA81XX(ha)) |
1508 | return; | 1546 | return; |
1509 | 1547 | ||
1510 | rval = QLA_SUCCESS; | 1548 | rval = QLA_SUCCESS; |
@@ -1926,7 +1964,8 @@ qla2x00_request_irqs(struct qla_hw_data *ha, struct rsp_que *rsp) | |||
1926 | device_reg_t __iomem *reg = ha->iobase; | 1964 | device_reg_t __iomem *reg = ha->iobase; |
1927 | 1965 | ||
1928 | /* If possible, enable MSI-X. */ | 1966 | /* If possible, enable MSI-X. */ |
1929 | if (!IS_QLA2432(ha) && !IS_QLA2532(ha) && !IS_QLA8432(ha)) | 1967 | if (!IS_QLA2432(ha) && !IS_QLA2532(ha) && |
1968 | !IS_QLA8432(ha) && !IS_QLA8001(ha)) | ||
1930 | goto skip_msix; | 1969 | goto skip_msix; |
1931 | 1970 | ||
1932 | if (IS_QLA2432(ha) && (ha->pdev->revision < QLA_MSIX_CHIP_REV_24XX || | 1971 | if (IS_QLA2432(ha) && (ha->pdev->revision < QLA_MSIX_CHIP_REV_24XX || |
@@ -1961,7 +2000,8 @@ qla2x00_request_irqs(struct qla_hw_data *ha, struct rsp_que *rsp) | |||
1961 | "MSI-X: Falling back-to INTa mode -- %d.\n", ret); | 2000 | "MSI-X: Falling back-to INTa mode -- %d.\n", ret); |
1962 | skip_msix: | 2001 | skip_msix: |
1963 | 2002 | ||
1964 | if (!IS_QLA24XX(ha) && !IS_QLA2532(ha) && !IS_QLA8432(ha)) | 2003 | if (!IS_QLA24XX(ha) && !IS_QLA2532(ha) && !IS_QLA8432(ha) && |
2004 | !IS_QLA8001(ha)) | ||
1965 | goto skip_msi; | 2005 | goto skip_msi; |
1966 | 2006 | ||
1967 | ret = pci_enable_msi(ha->pdev); | 2007 | ret = pci_enable_msi(ha->pdev); |
@@ -1982,6 +2022,12 @@ skip_msi: | |||
1982 | ha->flags.inta_enabled = 1; | 2022 | ha->flags.inta_enabled = 1; |
1983 | clear_risc_ints: | 2023 | clear_risc_ints: |
1984 | 2024 | ||
2025 | /* | ||
2026 | * FIXME: Noted that 8014s were being dropped during NK testing. | ||
2027 | * Timing deltas during MSI-X/INTa transitions? | ||
2028 | */ | ||
2029 | if (IS_QLA81XX(ha)) | ||
2030 | goto fail; | ||
1985 | spin_lock_irq(&ha->hardware_lock); | 2031 | spin_lock_irq(&ha->hardware_lock); |
1986 | if (IS_FWI2_CAPABLE(ha)) { | 2032 | if (IS_FWI2_CAPABLE(ha)) { |
1987 | WRT_REG_DWORD(®->isp24.hccr, HCCRX_CLR_HOST_INT); | 2033 | WRT_REG_DWORD(®->isp24.hccr, HCCRX_CLR_HOST_INT); |