diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_isr.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_isr.c | 82 |
1 files changed, 55 insertions, 27 deletions
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index d5fb79a88001..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) |
@@ -362,7 +364,6 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) | |||
362 | "ISP System Error - mbx1=%xh mbx2=%xh mbx3=%xh.\n", | 364 | "ISP System Error - mbx1=%xh mbx2=%xh mbx3=%xh.\n", |
363 | mb[1], mb[2], mb[3]); | 365 | mb[1], mb[2], mb[3]); |
364 | 366 | ||
365 | qla2x00_post_hwe_work(vha, mb[0], mb[1], mb[2], mb[3]); | ||
366 | ha->isp_ops->fw_dump(vha, 1); | 367 | ha->isp_ops->fw_dump(vha, 1); |
367 | 368 | ||
368 | if (IS_FWI2_CAPABLE(ha)) { | 369 | if (IS_FWI2_CAPABLE(ha)) { |
@@ -387,7 +388,6 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) | |||
387 | vha->host_no)); | 388 | vha->host_no)); |
388 | qla_printk(KERN_WARNING, ha, "ISP Request Transfer Error.\n"); | 389 | qla_printk(KERN_WARNING, ha, "ISP Request Transfer Error.\n"); |
389 | 390 | ||
390 | qla2x00_post_hwe_work(vha, mb[0], mb[1], mb[2], mb[3]); | ||
391 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); | 391 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); |
392 | break; | 392 | break; |
393 | 393 | ||
@@ -396,7 +396,6 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) | |||
396 | vha->host_no)); | 396 | vha->host_no)); |
397 | qla_printk(KERN_WARNING, ha, "ISP Response Transfer Error.\n"); | 397 | qla_printk(KERN_WARNING, ha, "ISP Response Transfer Error.\n"); |
398 | 398 | ||
399 | qla2x00_post_hwe_work(vha, mb[0], mb[1], mb[2], mb[3]); | ||
400 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); | 399 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); |
401 | break; | 400 | break; |
402 | 401 | ||
@@ -436,6 +435,8 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) | |||
436 | link_speed = link_speeds[LS_UNKNOWN]; | 435 | link_speed = link_speeds[LS_UNKNOWN]; |
437 | if (mb[1] < 5) | 436 | if (mb[1] < 5) |
438 | 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]; | ||
439 | ha->link_data_rate = mb[1]; | 440 | ha->link_data_rate = mb[1]; |
440 | } | 441 | } |
441 | 442 | ||
@@ -495,12 +496,17 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) | |||
495 | qla2x00_post_aen_work(vha, FCH_EVT_LIPRESET, mb[1]); | 496 | qla2x00_post_aen_work(vha, FCH_EVT_LIPRESET, mb[1]); |
496 | break; | 497 | break; |
497 | 498 | ||
499 | /* case MBA_DCBX_COMPLETE: */ | ||
498 | case MBA_POINT_TO_POINT: /* Point-to-Point */ | 500 | case MBA_POINT_TO_POINT: /* Point-to-Point */ |
499 | if (IS_QLA2100(ha)) | 501 | if (IS_QLA2100(ha)) |
500 | break; | 502 | break; |
501 | 503 | ||
502 | DEBUG2(printk("scsi(%ld): Asynchronous P2P MODE received.\n", | 504 | if (IS_QLA81XX(ha)) |
503 | 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)); | ||
504 | 510 | ||
505 | /* | 511 | /* |
506 | * 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 |
@@ -641,10 +647,7 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) | |||
641 | 647 | ||
642 | /* case MBA_RIO_RESPONSE: */ | 648 | /* case MBA_RIO_RESPONSE: */ |
643 | case MBA_ZIO_RESPONSE: | 649 | case MBA_ZIO_RESPONSE: |
644 | DEBUG2(printk("scsi(%ld): [R|Z]IO update completion.\n", | 650 | DEBUG3(printk("scsi(%ld): [R|Z]IO update completion.\n", |
645 | vha->host_no)); | ||
646 | DEBUG(printk(KERN_INFO | ||
647 | "scsi(%ld): [R|Z]IO update completion.\n", | ||
648 | vha->host_no)); | 651 | vha->host_no)); |
649 | 652 | ||
650 | if (IS_FWI2_CAPABLE(ha)) | 653 | if (IS_FWI2_CAPABLE(ha)) |
@@ -698,6 +701,35 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) | |||
698 | } | 701 | } |
699 | spin_unlock_irqrestore(&ha->cs84xx->access_lock, flags); | 702 | spin_unlock_irqrestore(&ha->cs84xx->access_lock, flags); |
700 | 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; | ||
701 | } | 733 | } |
702 | 734 | ||
703 | if (!vha->vp_idx && ha->num_vhosts) | 735 | if (!vha->vp_idx && ha->num_vhosts) |
@@ -1510,7 +1542,7 @@ qla2xxx_check_risc_status(scsi_qla_host_t *vha) | |||
1510 | struct qla_hw_data *ha = vha->hw; | 1542 | struct qla_hw_data *ha = vha->hw; |
1511 | struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; | 1543 | struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; |
1512 | 1544 | ||
1513 | if (!IS_QLA25XX(ha)) | 1545 | if (!IS_QLA25XX(ha) && !IS_QLA81XX(ha)) |
1514 | return; | 1546 | return; |
1515 | 1547 | ||
1516 | rval = QLA_SUCCESS; | 1548 | rval = QLA_SUCCESS; |
@@ -1590,12 +1622,6 @@ qla24xx_intr_handler(int irq, void *dev_id) | |||
1590 | if (pci_channel_offline(ha->pdev)) | 1622 | if (pci_channel_offline(ha->pdev)) |
1591 | break; | 1623 | break; |
1592 | 1624 | ||
1593 | if (ha->hw_event_pause_errors == 0) | ||
1594 | qla2x00_post_hwe_work(vha, HW_EVENT_PARITY_ERR, | ||
1595 | 0, MSW(stat), LSW(stat)); | ||
1596 | else if (ha->hw_event_pause_errors < 0xffffffff) | ||
1597 | ha->hw_event_pause_errors++; | ||
1598 | |||
1599 | hccr = RD_REG_DWORD(®->hccr); | 1625 | hccr = RD_REG_DWORD(®->hccr); |
1600 | 1626 | ||
1601 | qla_printk(KERN_INFO, ha, "RISC paused -- HCCR=%x, " | 1627 | qla_printk(KERN_INFO, ha, "RISC paused -- HCCR=%x, " |
@@ -1740,12 +1766,6 @@ qla24xx_msix_default(int irq, void *dev_id) | |||
1740 | if (pci_channel_offline(ha->pdev)) | 1766 | if (pci_channel_offline(ha->pdev)) |
1741 | break; | 1767 | break; |
1742 | 1768 | ||
1743 | if (ha->hw_event_pause_errors == 0) | ||
1744 | qla2x00_post_hwe_work(vha, HW_EVENT_PARITY_ERR, | ||
1745 | 0, MSW(stat), LSW(stat)); | ||
1746 | else if (ha->hw_event_pause_errors < 0xffffffff) | ||
1747 | ha->hw_event_pause_errors++; | ||
1748 | |||
1749 | hccr = RD_REG_DWORD(®->hccr); | 1769 | hccr = RD_REG_DWORD(®->hccr); |
1750 | 1770 | ||
1751 | qla_printk(KERN_INFO, ha, "RISC paused -- HCCR=%x, " | 1771 | qla_printk(KERN_INFO, ha, "RISC paused -- HCCR=%x, " |
@@ -1944,7 +1964,8 @@ qla2x00_request_irqs(struct qla_hw_data *ha, struct rsp_que *rsp) | |||
1944 | device_reg_t __iomem *reg = ha->iobase; | 1964 | device_reg_t __iomem *reg = ha->iobase; |
1945 | 1965 | ||
1946 | /* If possible, enable MSI-X. */ | 1966 | /* If possible, enable MSI-X. */ |
1947 | 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)) | ||
1948 | goto skip_msix; | 1969 | goto skip_msix; |
1949 | 1970 | ||
1950 | 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 || |
@@ -1979,7 +2000,8 @@ qla2x00_request_irqs(struct qla_hw_data *ha, struct rsp_que *rsp) | |||
1979 | "MSI-X: Falling back-to INTa mode -- %d.\n", ret); | 2000 | "MSI-X: Falling back-to INTa mode -- %d.\n", ret); |
1980 | skip_msix: | 2001 | skip_msix: |
1981 | 2002 | ||
1982 | 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)) | ||
1983 | goto skip_msi; | 2005 | goto skip_msi; |
1984 | 2006 | ||
1985 | ret = pci_enable_msi(ha->pdev); | 2007 | ret = pci_enable_msi(ha->pdev); |
@@ -2000,6 +2022,12 @@ skip_msi: | |||
2000 | ha->flags.inta_enabled = 1; | 2022 | ha->flags.inta_enabled = 1; |
2001 | clear_risc_ints: | 2023 | clear_risc_ints: |
2002 | 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; | ||
2003 | spin_lock_irq(&ha->hardware_lock); | 2031 | spin_lock_irq(&ha->hardware_lock); |
2004 | if (IS_FWI2_CAPABLE(ha)) { | 2032 | if (IS_FWI2_CAPABLE(ha)) { |
2005 | WRT_REG_DWORD(®->isp24.hccr, HCCRX_CLR_HOST_INT); | 2033 | WRT_REG_DWORD(®->isp24.hccr, HCCRX_CLR_HOST_INT); |
@@ -2044,7 +2072,7 @@ qla2x00_get_rsp_host(struct rsp_que *rsp) | |||
2044 | if (pkt && pkt->handle < MAX_OUTSTANDING_COMMANDS) { | 2072 | if (pkt && pkt->handle < MAX_OUTSTANDING_COMMANDS) { |
2045 | sp = req->outstanding_cmds[pkt->handle]; | 2073 | sp = req->outstanding_cmds[pkt->handle]; |
2046 | if (sp) | 2074 | if (sp) |
2047 | vha = sp->vha; | 2075 | vha = sp->fcport->vha; |
2048 | } | 2076 | } |
2049 | } | 2077 | } |
2050 | if (!vha) | 2078 | if (!vha) |