public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
From: Finn Thain <fthain@telegraphics.com.au>
To: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Michael Schmitz <schmitzmic@gmail.com>,
	linux-m68k@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: [PATCH] ncr5380: Don't re-enter NCR5380_select() when aborting a command
Date: Tue, 26 Jan 2016 13:31:14 +1100	[thread overview]
Message-ID: <20160126023113.571639451@telegraphics.com.au> (raw)

[-- Attachment #1: ncr5380-dont-reenter-NCR5380_select --]
[-- Type: text/plain, Size: 1544 bytes --]

Fixes: 707d62b37fbb ("ncr5380: Fix EH during arbitration and selection")
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>

---
 drivers/scsi/NCR5380.c       |    2 +-
 drivers/scsi/atari_NCR5380.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Index: linux/drivers/scsi/NCR5380.c
===================================================================
--- linux.orig/drivers/scsi/NCR5380.c	2016-01-26 13:31:10.000000000 +1100
+++ linux/drivers/scsi/NCR5380.c	2016-01-26 13:31:10.000000000 +1100
@@ -2337,7 +2337,7 @@ static int NCR5380_abort(struct scsi_cmn
 		dsprintk(NDEBUG_ABORT, instance,
 		         "abort: removed %p from disconnected list\n", cmd);
 		cmd->result = DID_ERROR << 16;
-		if (!hostdata->connected)
+		if (!hostdata->connected && !hostdata->selecting)
 			NCR5380_select(instance, cmd);
 		if (hostdata->connected != cmd) {
 			complete_cmd(instance, cmd);
Index: linux/drivers/scsi/atari_NCR5380.c
===================================================================
--- linux.orig/drivers/scsi/atari_NCR5380.c	2016-01-26 13:31:10.000000000 +1100
+++ linux/drivers/scsi/atari_NCR5380.c	2016-01-26 13:31:10.000000000 +1100
@@ -2532,7 +2532,7 @@ static int NCR5380_abort(struct scsi_cmn
 		dsprintk(NDEBUG_ABORT, instance,
 		         "abort: removed %p from disconnected list\n", cmd);
 		cmd->result = DID_ERROR << 16;
-		if (!hostdata->connected)
+		if (!hostdata->connected && !hostdata->selecting)
 			NCR5380_select(instance, cmd);
 		if (hostdata->connected != cmd) {
 			complete_cmd(instance, cmd);

             reply	other threads:[~2016-01-26  4:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-26  2:31 Finn Thain [this message]
2016-02-22 23:01 ` [PATCH] ncr5380: Don't re-enter NCR5380_select() when aborting a command Finn Thain

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=20160126023113.571639451@telegraphics.com.au \
    --to=fthain@telegraphics.com.au \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-m68k@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=schmitzmic@gmail.com \
    /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