linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saurav Kashyap <saurav.kashyap@qlogic.com>
To: jbottomley@parallels.com
Cc: giridhar.malavali@qlogic.com, saurav.kashyap@qlogic.com,
	andrew.vasquez@qlogic.com, linux-scsi@vger.kernel.org
Subject: [PATCH 04/16] qla2xxx: Do not query FC statistics during chip reset.
Date: Tue, 25 Jun 2013 11:27:19 -0400	[thread overview]
Message-ID: <1372174051-4211-5-git-send-email-saurav.kashyap@qlogic.com> (raw)
In-Reply-To: <1372174051-4211-1-git-send-email-saurav.kashyap@qlogic.com>

From: Chad Dupuis <chad.dupuis@qlogic.com>

During a chip reset, the mailbox call to get FC statistics from the ISP will
not work resulting in needless mailbox accesses and errors printing out:

qla2xxx [0000:05:00.0]-00af:11: Performing ISP error recovery - ha=ffff881fad044800.
qla2xxx [0000:05:00.0]-1020:11: **** Failed mbx[0]=4001, mb[1]=4953, mb[2]=5020, mb[3]=b100, cmd=6d ****.
qla2xxx [0000:05:00.0]-1020:11: **** Failed mbx[0]=4001, mb[1]=4953, mb[2]=5020, mb[3]=b100, cmd=6d ****.
qla2xxx [0000:05:00.0]-1020:11: **** Failed mbx[0]=4001, mb[1]=4953, mb[2]=5020, mb[3]=b100, cmd=6d ****.
qla2xxx [0000:05:00.0]-1020:11: **** Failed mbx[0]=4001, mb[1]=4953, mb[2]=5020, mb[3]=b100, cmd=6d ****.
qla2xxx [0000:05:00.0]-1020:11: **** Failed mbx[0]=4001, mb[1]=4953, mb[2]=5020, mb[3]=b100, cmd=6d ****.

To prevent this, check for a chip reset when an application queries for FC
stats and return immediately if a chip reset is occurring.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_attr.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index bf60c63..d7a99ae 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -1691,6 +1691,9 @@ qla2x00_get_fc_host_stats(struct Scsi_Host *shost)
 	if (unlikely(pci_channel_offline(ha->pdev)))
 		goto done;
 
+	if (qla2x00_reset_active(vha))
+		goto done;
+
 	stats = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &stats_dma);
 	if (stats == NULL) {
 		ql_log(ql_log_warn, vha, 0x707d,
@@ -1703,7 +1706,7 @@ qla2x00_get_fc_host_stats(struct Scsi_Host *shost)
 	if (IS_FWI2_CAPABLE(ha)) {
 		rval = qla24xx_get_isp_stats(base_vha, stats, stats_dma);
 	} else if (atomic_read(&base_vha->loop_state) == LOOP_READY &&
-	    !qla2x00_reset_active(vha) && !ha->dpc_active) {
+	    !ha->dpc_active) {
 		/* Must be in a 'READY' state for statistics retrieval. */
 		rval = qla2x00_get_link_status(base_vha, base_vha->loop_id,
 						stats, stats_dma);
-- 
1.7.7



  parent reply	other threads:[~2013-06-25 15:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25 15:27 [PATCH 00/16] qla2xxx: Patches for scsi "misc" branch Saurav Kashyap
2013-06-25 15:27 ` [PATCH 01/16] qla2xxx: Clear the MBX_INTR_WAIT flag when the mailbox time-out happens Saurav Kashyap
2013-06-25 15:27 ` [PATCH 02/16] qla2xxx: Set the index in outstanding command array to NULL when cmd is aborted when the request timeout Saurav Kashyap
2013-06-25 15:27 ` [PATCH 03/16] qla2xxx: Move qla2x00_free_device to the correct location Saurav Kashyap
2013-06-25 15:27 ` Saurav Kashyap [this message]
2013-06-25 15:27 ` [PATCH 05/16] qla2xxx: Do not take a second firmware dump when intentionally generating one Saurav Kashyap
2013-06-25 15:27 ` [PATCH 06/16] qla2xxx: Fix sparse warning from qla_mr.c and qla_iocb.c Saurav Kashyap
2013-06-25 15:27 ` [PATCH 07/16] qla2xxx: Clean up qla24xx_iidma() Saurav Kashyap
2013-06-25 15:27 ` [PATCH 08/16] qla2xxx: Clean up qla84xx_mgmt_cmd() Saurav Kashyap
2013-06-25 15:27 ` [PATCH 09/16] qla2xxx: Remove dead code in qla2x00_configure_hba() Saurav Kashyap
2013-06-25 15:27 ` [PATCH 10/16] qla2xxx: Remove two superfluous tests Saurav Kashyap
2013-06-25 15:27 ` [PATCH 11/16] qla2xxx: Remove a dead assignment in qla24xx_build_scsi_crc_2_iocbs() Saurav Kashyap
2013-06-25 15:27 ` [PATCH 12/16] qla2xxx: Remove redundant assignments Saurav Kashyap
2013-06-25 15:27 ` [PATCH 13/16] qla2xxx: Help Coverity with analyzing ct_sns_pkt initialization Saurav Kashyap
2013-06-25 15:27 ` [PATCH 14/16] qla2xxx: Fix qla2xxx_check_risc_status() Saurav Kashyap
2013-06-25 15:27 ` [PATCH 15/16] qla2xxx: Remove an unused variable from qla2x00_remove_one() Saurav Kashyap
2013-06-25 15:27 ` [PATCH 16/16] qla2xxx: Fix a memory leak in an error path of qla2x00_process_els() Saurav Kashyap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1372174051-4211-5-git-send-email-saurav.kashyap@qlogic.com \
    --to=saurav.kashyap@qlogic.com \
    --cc=andrew.vasquez@qlogic.com \
    --cc=giridhar.malavali@qlogic.com \
    --cc=jbottomley@parallels.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).