public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian King <brking@us.ibm.com>
To: James.Bottomley@steeleye.com
Cc: linux-scsi@vger.kernel.org
Subject: [PATCH 2/3] ipr duplicate ioa reset fix
Date: Mon, 24 May 2004 09:39:24 -0500	[thread overview]
Message-ID: <40B2091C.70107@us.ibm.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 64 bytes --]


-- 
Brian King
eServer Storage I/O
IBM Linux Technology Center

[-- Attachment #2: ipr_duplicate_ioa_reset_fix.patch --]
[-- Type: text/plain, Size: 1058 bytes --]


This patch closes a window where if a device had a cancel all
outstanding as a result of a check condition and the adapter
was reset for some reason, a request sense would still be issued,
which would end up timing out and issuing an additional adapter
reset. It could also result in a leak of command blocks, depending
on when it timed out.


---

 linux-2.6.6-bjking1/drivers/scsi/ipr.c |    6 ++++++
 1 files changed, 6 insertions(+)

diff -puN drivers/scsi/ipr.c~ipr_duplicate_ioa_reset_fix drivers/scsi/ipr.c
--- linux-2.6.6/drivers/scsi/ipr.c~ipr_duplicate_ioa_reset_fix	2004-05-23 21:43:35.000000000 -0500
+++ linux-2.6.6-bjking1/drivers/scsi/ipr.c	2004-05-23 21:43:47.000000000 -0500
@@ -3482,6 +3482,12 @@ static void ipr_reinit_ipr_cmnd_for_erp(
 static void ipr_erp_request_sense(struct ipr_cmnd *ipr_cmd)
 {
 	struct ipr_cmd_pkt *cmd_pkt = &ipr_cmd->ioarcb.cmd_pkt;
+	u32 ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc);
+
+	if (IPR_IOASC_SENSE_KEY(ioasc) > 0) {
+		ipr_erp_done(ipr_cmd);
+		return;
+	}
 
 	ipr_reinit_ipr_cmnd_for_erp(ipr_cmd);
 

_

                 reply	other threads:[~2004-05-24 14:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=40B2091C.70107@us.ibm.com \
    --to=brking@us.ibm.com \
    --cc=James.Bottomley@steeleye.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