linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/13] qla4xxx: cleanup qla4xxx_initialize_ddb_list()
@ 2011-03-21 10:34 vikas.chaudhary
  2011-03-21 10:34 ` [PATCH 02/13] qla4xxx: Do not send mbox command if FW is in failed state vikas.chaudhary
                   ` (11 more replies)
  0 siblings, 12 replies; 15+ messages in thread
From: vikas.chaudhary @ 2011-03-21 10:34 UTC (permalink / raw)
  To: James.Bottomley; +Cc: linux-scsi, ravi.anand, lalit.chandivade, vikas.chaudhary

From: Vikas Chaudhary <vikas.chaudhary@qlogic.com>

Remove process all aen code from qla4xxx_initialize_ddb_list()
as DPC activities should be done in DPC only.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
---
 drivers/scsi/qla4xxx/ql4_init.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c
index 1629c48..22fc57e 100644
--- a/drivers/scsi/qla4xxx/ql4_init.c
+++ b/drivers/scsi/qla4xxx/ql4_init.c
@@ -1013,13 +1013,6 @@ static int qla4xxx_initialize_ddb_list(struct scsi_qla_host *ha)
 	if ((status = qla4xxx_build_ddb_list(ha)) == QLA_ERROR)
 		return status;
 
-	/*
-	 * Targets can come online after the inital discovery, so processing
-	 * the aens here will catch them.
-	 */
-	if (test_and_clear_bit(DPC_AEN, &ha->dpc_flags))
-		qla4xxx_process_aen(ha, PROCESS_ALL_AENS);
-
 	return status;
 }
 
-- 
1.7.3.2


^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [PATCH 02/13] qla4xxx: Do not send mbox command if FW is in failed state
@ 2011-03-14  5:24 Vikas Chaudhary
  0 siblings, 0 replies; 15+ messages in thread
From: Vikas Chaudhary @ 2011-03-14  5:24 UTC (permalink / raw)
  To: James Bottomley
  Cc: linux-scsi@vger.kernel.org, Vikas Chaudhary, Ravi Anand,
	Lalit Chandivade, Prasanna Mumbai, Mike Christie

From: Prasanna Mumbai <prasanna.mumbai@qlogic.com>

FW is not able to process mbox command if FW state is failed. This will cause
mbox command to timeout and adapter reset. We have separate function to detect
FW failed state and do adapter reset. So to avoid mbox command timeout, do not
process mbox command in case of FW state failed.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Prasanna Mumbai <prasanna.mumbai@qlogic.com>
---
 drivers/scsi/qla4xxx/ql4_mbx.c |   24 ++++++++++++++++++------
 1 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c
index f65626a..47b2591 100644
--- a/drivers/scsi/qla4xxx/ql4_mbx.c
+++ b/drivers/scsi/qla4xxx/ql4_mbx.c
@@ -32,6 +32,7 @@ int qla4xxx_mailbox_command(struct scsi_qla_host *ha, uint8_t inCount,
        u_long wait_count;
        uint32_t intr_status;
        unsigned long flags = 0;
+       uint32_t dev_state;

        /* Make sure that pointers are valid */
        if (!mbx_cmd || !mbx_sts) {
@@ -40,12 +41,23 @@ int qla4xxx_mailbox_command(struct scsi_qla_host *ha, uint8_t inCount,
                return status;
        }

-       if (is_qla8022(ha) &&
-           test_bit(AF_FW_RECOVERY, &ha->flags)) {
-               DEBUG2(ql4_printk(KERN_WARNING, ha, "scsi%ld: %s: prematurely "
-                   "completing mbx cmd as firmware recovery detected\n",
-                   ha->host_no, __func__));
-               return status;
+       if (is_qla8022(ha)) {
+               if (test_bit(AF_FW_RECOVERY, &ha->flags)) {
+                       DEBUG2(ql4_printk(KERN_WARNING, ha, "scsi%ld: %s: "
+                           "prematurely completing mbx cmd as firmware "
+                           "recovery detected\n", ha->host_no, __func__));
+                       return status;
+               }
+               /* Do not send any mbx cmd if h/w is in failed state*/
+               qla4_8xxx_idc_lock(ha);
+               dev_state = qla4_8xxx_rd_32(ha, QLA82XX_CRB_DEV_STATE);
+               qla4_8xxx_idc_unlock(ha);
+               if (dev_state == QLA82XX_DEV_FAILED) {
+                       ql4_printk(KERN_WARNING, ha, "scsi%ld: %s: H/W is in "
+                           "failed state, do not send any mailbox commands\n",
+                           ha->host_no, __func__);
+                       return status;
+               }
        }

        if ((is_aer_supported(ha)) &&
--
1.7.3.2


This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-03-23 15:10 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-21 10:34 [PATCH 01/13] qla4xxx: cleanup qla4xxx_initialize_ddb_list() vikas.chaudhary
2011-03-21 10:34 ` [PATCH 02/13] qla4xxx: Do not send mbox command if FW is in failed state vikas.chaudhary
2011-03-21 10:34 ` [PATCH 03/13] qla4xxx: Do not retry ISP82XX initialization if H/W state is failed vikas.chaudhary
2011-03-21 10:34 ` [PATCH 04/13] qla4xxx: cleanup DDB relogin logic during initialization vikas.chaudhary
2011-03-21 10:34 ` [PATCH 05/13] qla4xxx: remove unused ddb flag DF_NO_RELOGIN vikas.chaudhary
2011-03-21 10:34 ` [PATCH 06/13] qla4xxx: Prevent other port reinitialization during remove_adapter vikas.chaudhary
2011-03-21 10:34 ` [PATCH 07/13] qla4xxx: cleanup function qla4xxx_process_ddb_changed vikas.chaudhary
2011-03-21 10:34 ` [PATCH 08/13] qla4xxx: Add support for ql4xmaxqdepth command line parameter vikas.chaudhary
2011-03-21 10:34 ` [PATCH 09/13] qla4xxx: add support for ql4xsess_recovery_tmo cmd line param vikas.chaudhary
2011-03-21 10:34 ` [PATCH 10/13] qla4xxx: added new function qla4xxx_relogin_all_devices vikas.chaudhary
2011-03-21 10:34 ` [PATCH 12/13] qla4xxx: masking required bits of add_fw_options during initialization vikas.chaudhary
2011-03-21 10:34 ` [PATCH 13/13] qla4xxx: Update driver version to 5.02.00-k6 vikas.chaudhary
2011-03-23 14:44 ` [PATCH 01/13] qla4xxx: cleanup qla4xxx_initialize_ddb_list() James Bottomley
2011-03-23 15:10   ` Vikas Chaudhary
  -- strict thread matches above, loose matches on Subject: below --
2011-03-14  5:24 [PATCH 02/13] qla4xxx: Do not send mbox command if FW is in failed state Vikas Chaudhary

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).