|
@@ -581,6 +581,33 @@ exit_prq_error:
|
|
|
set_bit(DPC_RESET_HA, &ha->dpc_flags);
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * qla4_83xx_loopback_in_progress: Is loopback in progress?
|
|
|
+ * @ha: Pointer to host adapter structure.
|
|
|
+ * @ret: 1 = loopback in progress, 0 = loopback not in progress
|
|
|
+ **/
|
|
|
+static int qla4_83xx_loopback_in_progress(struct scsi_qla_host *ha)
|
|
|
+{
|
|
|
+ int rval = 1;
|
|
|
+
|
|
|
+ if (is_qla8032(ha)) {
|
|
|
+ if ((ha->idc_info.info2 & ENABLE_INTERNAL_LOOPBACK) ||
|
|
|
+ (ha->idc_info.info2 & ENABLE_EXTERNAL_LOOPBACK)) {
|
|
|
+ DEBUG2(ql4_printk(KERN_INFO, ha,
|
|
|
+ "%s: Loopback diagnostics in progress\n",
|
|
|
+ __func__));
|
|
|
+ rval = 1;
|
|
|
+ } else {
|
|
|
+ DEBUG2(ql4_printk(KERN_INFO, ha,
|
|
|
+ "%s: Loopback diagnostics not in progress\n",
|
|
|
+ __func__));
|
|
|
+ rval = 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return rval;
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* qla4xxx_isr_decode_mailbox - decodes mailbox status
|
|
|
* @ha: Pointer to host adapter structure.
|
|
@@ -676,8 +703,10 @@ static void qla4xxx_isr_decode_mailbox(struct scsi_qla_host * ha,
|
|
|
|
|
|
case MBOX_ASTS_LINK_DOWN:
|
|
|
clear_bit(AF_LINK_UP, &ha->flags);
|
|
|
- if (test_bit(AF_INIT_DONE, &ha->flags))
|
|
|
+ if (test_bit(AF_INIT_DONE, &ha->flags)) {
|
|
|
set_bit(DPC_LINK_CHANGED, &ha->dpc_flags);
|
|
|
+ qla4xxx_wake_dpc(ha);
|
|
|
+ }
|
|
|
|
|
|
ql4_printk(KERN_INFO, ha, "%s: LINK DOWN\n", __func__);
|
|
|
qla4xxx_post_aen_work(ha, ISCSI_EVENT_LINKDOWN,
|
|
@@ -840,6 +869,11 @@ static void qla4xxx_isr_decode_mailbox(struct scsi_qla_host * ha,
|
|
|
DEBUG2(ql4_printk(KERN_INFO, ha,
|
|
|
"scsi:%ld: AEN %04x IDC Complete notification\n",
|
|
|
ha->host_no, mbox_sts[0]));
|
|
|
+
|
|
|
+ if (qla4_83xx_loopback_in_progress(ha))
|
|
|
+ set_bit(AF_LOOPBACK, &ha->flags);
|
|
|
+ else
|
|
|
+ clear_bit(AF_LOOPBACK, &ha->flags);
|
|
|
}
|
|
|
break;
|
|
|
|