All of lore.kernel.org
 help / color / mirror / Atom feed
From: Himanshu Madhani <himanshu.madhani@qlogic.com>
To: jbottomley@parallels.com
Cc: hch@lst.de, giridhar.malavali@qlogic.com,
	himanshu.madhani@qlogic.com, andrew.vasquez@qlogic.com,
	linux-scsi@vger.kernel.org
Subject: [PATCH  06/14] qla2xxx: Do not crash system for sp ref count zero
Date: Tue, 4 Aug 2015 13:37:56 -0400	[thread overview]
Message-ID: <1438709884-623-7-git-send-email-himanshu.madhani@qlogic.com> (raw)
In-Reply-To: <1438709884-623-1-git-send-email-himanshu.madhani@qlogic.com>

From: Hiral Patel <hiral.patel@qlogic.com>

Aovid crashing the system in the scenario where firmware
just completes the command and it can not find the command
during abort mailbox processing. This scenario can lead to
sp reference counter being zero. Instead of crashing the
system, use WARN_ON to print warning in log file.

Signed-off-by: Hiral Patel <hiral.patel@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_os.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 8a5cac8..070f2a1 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -656,7 +656,7 @@ qla2x00_sp_compl(void *data, void *ptr, int res)
 		    "SP reference-count to ZERO -- sp=%p cmd=%p.\n",
 		    sp, GET_CMD_SP(sp));
 		if (ql2xextended_error_logging & ql_dbg_io)
-			BUG();
+			WARN_ON(atomic_read(&sp->ref_count) == 0);
 		return;
 	}
 	if (!atomic_dec_and_test(&sp->ref_count))
-- 
1.7.7


  parent reply	other threads:[~2015-08-04 18:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-04 17:37 [PATCH 00/14] qla2xxx: Patches for scsi "misc" branch Himanshu Madhani
2015-08-04 17:37 ` [PATCH 01/14] qla2xxx: Add serdes register read/write support for ISP25xx Himanshu Madhani
2015-08-04 17:37 ` [PATCH 02/14] qla2xxx: Handle AEN8014 incoming port logout Himanshu Madhani
2015-08-04 17:37 ` [PATCH 03/14] qla2xxx: Use ssdid to gate semaphore manipulation Himanshu Madhani
2015-08-04 17:37 ` [PATCH 04/14] qla2xxx: Pause risc before manipulating risc semaphore Himanshu Madhani
2015-08-04 17:37 ` [PATCH 05/14] qla2xxx: Add adapter checks for FAWWN functionality Himanshu Madhani
2015-08-04 17:37 ` Himanshu Madhani [this message]
2015-08-04 17:37 ` [PATCH 07/14] qla2xxx: Do not reset adapter if SRB handle is in range Himanshu Madhani
2015-08-04 17:37 ` [PATCH 08/14] qla2xxx: Do not reset ISP for error entry with an out of range handle Himanshu Madhani
2015-08-04 17:37 ` [PATCH 09/14] qla2xxx: Add support to show MPI and PEP FW version for ISP27xx Himanshu Madhani
2015-08-04 17:38 ` [PATCH 10/14] qla2xxx: Remove decrement of sp reference count in abort handler Himanshu Madhani
2015-08-04 17:38 ` [PATCH 11/14] qla2xxx: do not clear slot in outstanding cmd array Himanshu Madhani
2015-08-04 17:38 ` [PATCH 12/14] qla2xxx: Fix missing device login retries Himanshu Madhani
2015-08-04 17:38 ` [PATCH 13/14] qla2xxx: Add pci device id 0x2261 Himanshu Madhani
2015-08-04 17:38 ` [PATCH 14/14] qla2xxx: Update driver version to 8.07.00.26-k Himanshu Madhani

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=1438709884-623-7-git-send-email-himanshu.madhani@qlogic.com \
    --to=himanshu.madhani@qlogic.com \
    --cc=andrew.vasquez@qlogic.com \
    --cc=giridhar.malavali@qlogic.com \
    --cc=hch@lst.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.