|
@@ -292,6 +292,14 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
|
|
if (time_after(jiffies, wait_time))
|
|
if (time_after(jiffies, wait_time))
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * Check if it's UNLOADING, cause we cannot poll in
|
|
|
|
+ * this case, or else a NULL pointer dereference
|
|
|
|
+ * is triggered.
|
|
|
|
+ */
|
|
|
|
+ if (unlikely(test_bit(UNLOADING, &base_vha->dpc_flags)))
|
|
|
|
+ return QLA_FUNCTION_TIMEOUT;
|
|
|
|
+
|
|
/* Check for pending interrupts. */
|
|
/* Check for pending interrupts. */
|
|
qla2x00_poll(ha->rsp_q_map[0]);
|
|
qla2x00_poll(ha->rsp_q_map[0]);
|
|
|
|
|