diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_isr.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_isr.c | 44 |
1 files changed, 29 insertions, 15 deletions
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 349843ea32f6..18e7d961aa09 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c | |||
@@ -289,7 +289,7 @@ qla81xx_idc_event(scsi_qla_host_t *vha, uint16_t aen, uint16_t descr) | |||
289 | mb[cnt] = RD_REG_WORD(wptr); | 289 | mb[cnt] = RD_REG_WORD(wptr); |
290 | 290 | ||
291 | ql_dbg(ql_dbg_async, vha, 0x5021, | 291 | ql_dbg(ql_dbg_async, vha, 0x5021, |
292 | "Inter-Driver Commucation %s -- " | 292 | "Inter-Driver Communication %s -- " |
293 | "%04x %04x %04x %04x %04x %04x %04x.\n", | 293 | "%04x %04x %04x %04x %04x %04x %04x.\n", |
294 | event[aen & 0xff], mb[0], mb[1], mb[2], mb[3], | 294 | event[aen & 0xff], mb[0], mb[1], mb[2], mb[3], |
295 | mb[4], mb[5], mb[6]); | 295 | mb[4], mb[5], mb[6]); |
@@ -318,7 +318,7 @@ void | |||
318 | qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) | 318 | qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) |
319 | { | 319 | { |
320 | #define LS_UNKNOWN 2 | 320 | #define LS_UNKNOWN 2 |
321 | static char *link_speeds[] = { "1", "2", "?", "4", "8", "10" }; | 321 | static char *link_speeds[] = { "1", "2", "?", "4", "8", "16", "10" }; |
322 | char *link_speed; | 322 | char *link_speed; |
323 | uint16_t handle_cnt; | 323 | uint16_t handle_cnt; |
324 | uint16_t cnt, mbx; | 324 | uint16_t cnt, mbx; |
@@ -333,7 +333,7 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) | |||
333 | 333 | ||
334 | /* Setup to process RIO completion. */ | 334 | /* Setup to process RIO completion. */ |
335 | handle_cnt = 0; | 335 | handle_cnt = 0; |
336 | if (IS_QLA8XXX_TYPE(ha)) | 336 | if (IS_CNA_CAPABLE(ha)) |
337 | goto skip_rio; | 337 | goto skip_rio; |
338 | switch (mb[0]) { | 338 | switch (mb[0]) { |
339 | case MBA_SCSI_COMPLETION: | 339 | case MBA_SCSI_COMPLETION: |
@@ -405,7 +405,8 @@ skip_rio: | |||
405 | break; | 405 | break; |
406 | 406 | ||
407 | case MBA_SYSTEM_ERR: /* System Error */ | 407 | case MBA_SYSTEM_ERR: /* System Error */ |
408 | mbx = IS_QLA81XX(ha) ? RD_REG_WORD(®24->mailbox7) : 0; | 408 | mbx = (IS_QLA81XX(ha) || IS_QLA83XX(ha)) ? |
409 | RD_REG_WORD(®24->mailbox7) : 0; | ||
409 | ql_log(ql_log_warn, vha, 0x5003, | 410 | ql_log(ql_log_warn, vha, 0x5003, |
410 | "ISP System Error - mbx1=%xh mbx2=%xh mbx3=%xh " | 411 | "ISP System Error - mbx1=%xh mbx2=%xh mbx3=%xh " |
411 | "mbx7=%xh.\n", mb[1], mb[2], mb[3], mbx); | 412 | "mbx7=%xh.\n", mb[1], mb[2], mb[3], mbx); |
@@ -418,6 +419,7 @@ skip_rio: | |||
418 | "Unrecoverable Hardware Error: adapter " | 419 | "Unrecoverable Hardware Error: adapter " |
419 | "marked OFFLINE!\n"); | 420 | "marked OFFLINE!\n"); |
420 | vha->flags.online = 0; | 421 | vha->flags.online = 0; |
422 | vha->device_flags |= DFLG_DEV_FAILED; | ||
421 | } else { | 423 | } else { |
422 | /* Check to see if MPI timeout occurred */ | 424 | /* Check to see if MPI timeout occurred */ |
423 | if ((mbx & MBX_3) && (ha->flags.port0)) | 425 | if ((mbx & MBX_3) && (ha->flags.port0)) |
@@ -431,6 +433,7 @@ skip_rio: | |||
431 | "Unrecoverable Hardware Error: adapter marked " | 433 | "Unrecoverable Hardware Error: adapter marked " |
432 | "OFFLINE!\n"); | 434 | "OFFLINE!\n"); |
433 | vha->flags.online = 0; | 435 | vha->flags.online = 0; |
436 | vha->device_flags |= DFLG_DEV_FAILED; | ||
434 | } else | 437 | } else |
435 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); | 438 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); |
436 | break; | 439 | break; |
@@ -482,10 +485,10 @@ skip_rio: | |||
482 | ha->link_data_rate = PORT_SPEED_1GB; | 485 | ha->link_data_rate = PORT_SPEED_1GB; |
483 | } else { | 486 | } else { |
484 | link_speed = link_speeds[LS_UNKNOWN]; | 487 | link_speed = link_speeds[LS_UNKNOWN]; |
485 | if (mb[1] < 5) | 488 | if (mb[1] < 6) |
486 | link_speed = link_speeds[mb[1]]; | 489 | link_speed = link_speeds[mb[1]]; |
487 | else if (mb[1] == 0x13) | 490 | else if (mb[1] == 0x13) |
488 | link_speed = link_speeds[5]; | 491 | link_speed = link_speeds[6]; |
489 | ha->link_data_rate = mb[1]; | 492 | ha->link_data_rate = mb[1]; |
490 | } | 493 | } |
491 | 494 | ||
@@ -497,7 +500,8 @@ skip_rio: | |||
497 | break; | 500 | break; |
498 | 501 | ||
499 | case MBA_LOOP_DOWN: /* Loop Down Event */ | 502 | case MBA_LOOP_DOWN: /* Loop Down Event */ |
500 | mbx = IS_QLA81XX(ha) ? RD_REG_WORD(®24->mailbox4) : 0; | 503 | mbx = (IS_QLA81XX(ha) || IS_QLA8031(ha)) |
504 | ? RD_REG_WORD(®24->mailbox4) : 0; | ||
501 | mbx = IS_QLA82XX(ha) ? RD_REG_WORD(®82->mailbox_out[4]) : mbx; | 505 | mbx = IS_QLA82XX(ha) ? RD_REG_WORD(®82->mailbox_out[4]) : mbx; |
502 | ql_dbg(ql_dbg_async, vha, 0x500b, | 506 | ql_dbg(ql_dbg_async, vha, 0x500b, |
503 | "LOOP DOWN detected (%x %x %x %x).\n", | 507 | "LOOP DOWN detected (%x %x %x %x).\n", |
@@ -547,7 +551,7 @@ skip_rio: | |||
547 | if (IS_QLA2100(ha)) | 551 | if (IS_QLA2100(ha)) |
548 | break; | 552 | break; |
549 | 553 | ||
550 | if (IS_QLA8XXX_TYPE(ha)) { | 554 | if (IS_QLA81XX(ha) || IS_QLA82XX(ha) || IS_QLA8031(ha)) { |
551 | ql_dbg(ql_dbg_async, vha, 0x500d, | 555 | ql_dbg(ql_dbg_async, vha, 0x500d, |
552 | "DCBX Completed -- %04x %04x %04x.\n", | 556 | "DCBX Completed -- %04x %04x %04x.\n", |
553 | mb[1], mb[2], mb[3]); | 557 | mb[1], mb[2], mb[3]); |
@@ -809,6 +813,10 @@ skip_rio: | |||
809 | case MBA_IDC_TIME_EXT: | 813 | case MBA_IDC_TIME_EXT: |
810 | qla81xx_idc_event(vha, mb[0], mb[1]); | 814 | qla81xx_idc_event(vha, mb[0], mb[1]); |
811 | break; | 815 | break; |
816 | default: | ||
817 | ql_dbg(ql_dbg_async, vha, 0x5057, | ||
818 | "Unknown AEN:%04x %04x %04x %04x\n", | ||
819 | mb[0], mb[1], mb[2], mb[3]); | ||
812 | } | 820 | } |
813 | 821 | ||
814 | if (!vha->vp_idx && ha->num_vhosts) | 822 | if (!vha->vp_idx && ha->num_vhosts) |
@@ -2127,7 +2135,7 @@ qla2xxx_check_risc_status(scsi_qla_host_t *vha) | |||
2127 | struct qla_hw_data *ha = vha->hw; | 2135 | struct qla_hw_data *ha = vha->hw; |
2128 | struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; | 2136 | struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; |
2129 | 2137 | ||
2130 | if (!IS_QLA25XX(ha) && !IS_QLA81XX(ha)) | 2138 | if (!IS_QLA25XX(ha) && !IS_QLA81XX(ha) && !IS_QLA83XX(ha)) |
2131 | return; | 2139 | return; |
2132 | 2140 | ||
2133 | rval = QLA_SUCCESS; | 2141 | rval = QLA_SUCCESS; |
@@ -2168,7 +2176,7 @@ done: | |||
2168 | } | 2176 | } |
2169 | 2177 | ||
2170 | /** | 2178 | /** |
2171 | * qla24xx_intr_handler() - Process interrupts for the ISP23xx and ISP63xx. | 2179 | * qla24xx_intr_handler() - Process interrupts for the ISP23xx and ISP24xx. |
2172 | * @irq: | 2180 | * @irq: |
2173 | * @dev_id: SCSI driver HA context | 2181 | * @dev_id: SCSI driver HA context |
2174 | * | 2182 | * |
@@ -2530,8 +2538,14 @@ msix_failed: | |||
2530 | } | 2538 | } |
2531 | 2539 | ||
2532 | /* Enable MSI-X vector for response queue update for queue 0 */ | 2540 | /* Enable MSI-X vector for response queue update for queue 0 */ |
2533 | if (ha->mqiobase && (ha->max_rsp_queues > 1 || ha->max_req_queues > 1)) | 2541 | if (IS_QLA83XX(ha)) { |
2534 | ha->mqenable = 1; | 2542 | if (ha->msixbase && ha->mqiobase && |
2543 | (ha->max_rsp_queues > 1 || ha->max_req_queues > 1)) | ||
2544 | ha->mqenable = 1; | ||
2545 | } else | ||
2546 | if (ha->mqiobase | ||
2547 | && (ha->max_rsp_queues > 1 || ha->max_req_queues > 1)) | ||
2548 | ha->mqenable = 1; | ||
2535 | ql_dbg(ql_dbg_multiq, vha, 0xc005, | 2549 | ql_dbg(ql_dbg_multiq, vha, 0xc005, |
2536 | "mqiobase=%p, max_rsp_queues=%d, max_req_queues=%d.\n", | 2550 | "mqiobase=%p, max_rsp_queues=%d, max_req_queues=%d.\n", |
2537 | ha->mqiobase, ha->max_rsp_queues, ha->max_req_queues); | 2551 | ha->mqiobase, ha->max_rsp_queues, ha->max_req_queues); |
@@ -2552,8 +2566,8 @@ qla2x00_request_irqs(struct qla_hw_data *ha, struct rsp_que *rsp) | |||
2552 | scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); | 2566 | scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); |
2553 | 2567 | ||
2554 | /* If possible, enable MSI-X. */ | 2568 | /* If possible, enable MSI-X. */ |
2555 | if (!IS_QLA2432(ha) && !IS_QLA2532(ha) && | 2569 | if (!IS_QLA2432(ha) && !IS_QLA2532(ha) && !IS_QLA8432(ha) && |
2556 | !IS_QLA8432(ha) && !IS_QLA8XXX_TYPE(ha)) | 2570 | !IS_CNA_CAPABLE(ha) && !IS_QLA2031(ha)) |
2557 | goto skip_msi; | 2571 | goto skip_msi; |
2558 | 2572 | ||
2559 | if (ha->pdev->subsystem_vendor == PCI_VENDOR_ID_HP && | 2573 | if (ha->pdev->subsystem_vendor == PCI_VENDOR_ID_HP && |
@@ -2615,7 +2629,7 @@ clear_risc_ints: | |||
2615 | * FIXME: Noted that 8014s were being dropped during NK testing. | 2629 | * FIXME: Noted that 8014s were being dropped during NK testing. |
2616 | * Timing deltas during MSI-X/INTa transitions? | 2630 | * Timing deltas during MSI-X/INTa transitions? |
2617 | */ | 2631 | */ |
2618 | if (IS_QLA81XX(ha) || IS_QLA82XX(ha)) | 2632 | if (IS_QLA81XX(ha) || IS_QLA82XX(ha) || IS_QLA83XX(ha)) |
2619 | goto fail; | 2633 | goto fail; |
2620 | spin_lock_irq(&ha->hardware_lock); | 2634 | spin_lock_irq(&ha->hardware_lock); |
2621 | if (IS_FWI2_CAPABLE(ha)) { | 2635 | if (IS_FWI2_CAPABLE(ha)) { |