From 67b2a31f517a43631af218d146e39f4e502b3e83 Mon Sep 17 00:00:00 2001 From: Chad Dupuis Date: Fri, 8 Feb 2013 01:57:51 -0500 Subject: [SCSI] qla2xxx: Extra loopback error handling for ISP83xx. Add the following error handling for loopback diagnostic mode with ISP83xx: 1. If we do not receive an MBA_DCBX_COMPLETE after our initial set port configuration command, try to reset the port back into normal operation. If that fails, take a FCoE dump and then reset the chip. 2. After completing the loopback diagnostic operation, if the reset of the port back into normal operation fails then reset the port so we take a FCoE dump and then reset the chip. 3. When we receive an IDC notification and the requested operation is loopback extend the loop down timer so the link does not appear to down for an extended period of time. [jejb: fix checkpatch issue] Signed-off-by: Chad Dupuis Signed-off-by: Saurav Kashyap Signed-off-by: James Bottomley --- drivers/scsi/qla2xxx/qla_isr.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'drivers/scsi/qla2xxx/qla_isr.c') diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 26a3086a7e3..9380d961616 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -985,13 +985,21 @@ skip_rio: mb[1], mb[2], mb[3]); break; case MBA_IDC_NOTIFY: - /* See if we need to quiesce any I/O */ - if (IS_QLA8031(vha->hw)) - if ((mb[2] & 0x7fff) == MBC_PORT_RESET || - (mb[2] & 0x7fff) == MBC_SET_PORT_CONFIG) { + if (IS_QLA8031(vha->hw)) { + mb[4] = RD_REG_WORD(®24->mailbox4); + if (((mb[2] & 0x7fff) == MBC_PORT_RESET || + (mb[2] & 0x7fff) == MBC_SET_PORT_CONFIG) && + (mb[4] & INTERNAL_LOOPBACK_MASK) != 0) { set_bit(ISP_QUIESCE_NEEDED, &vha->dpc_flags); + /* + * Extend loop down timer since port is active. + */ + if (atomic_read(&vha->loop_state) == LOOP_DOWN) + atomic_set(&vha->loop_down_timer, + LOOP_DOWN_TIME); qla2xxx_wake_dpc(vha); } + } case MBA_IDC_COMPLETE: case MBA_IDC_TIME_EXT: if (IS_QLA81XX(vha->hw) || IS_QLA8031(vha->hw)) -- cgit v1.2.3