Skip to contentSkip to conversation

ncr5380: Don't re-enter NCR5380_select() when aborting a command

PATCH In review Finn Thain 1 participant 2 messages Jan 26, 2016 – Feb 22, 2016

Subsystems (2)
lore
Share & tools
lore

Finn Thain

author
#0 lore raw

PATCH 1/1 ncr5380: Don't re-enter NCR5380_select() when aborting a command

Fixes 707d62b37fbb ("ncr5380: Fix EH during arbitration and selection")
---
 drivers/scsi/NCR5380.c       |    2 +-
 drivers/scsi/atari_NCR5380.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/NCR5380.c +1 -1
Index: linux/drivers/scsi/NCR5380.c
===================================================================
@@ -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);
drivers/scsi/atari_NCR5380.c +1 -1
Index: linux/drivers/scsi/atari_NCR5380.c
===================================================================
@@ -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);
author
#1 lore raw

Please ignore this patch. It isn't sufficient to fix the problem. I'll send another patch that does fix it.

Quoted 41 lines · Finn Thain
Fixes 707d62b37fbb ("ncr5380: Fix EH during arbitration and selection")
---
 drivers/scsi/NCR5380.c       |    2 +-
 drivers/scsi/atari_NCR5380.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Index: linux/drivers/scsi/NCR5380.c
===================================================================

drivers/scsi/NCR5380.c +1 -1
@@ -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
===================================================================

drivers/scsi/atari_NCR5380.c +1 -2
@@ -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);
 
 
--

To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html