Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1300178

[PATCH v4 23/78] ncr5380: Always retry arbitration and selection

From Finn Thain <fthain@telegraphics.com.au>
Newsgroups linux.kernel
Subject [PATCH v4 23/78] ncr5380: Always retry arbitration and selection
Date 2016-01-03 06:20 +0100
Message-ID <qMJfb-148-1@gated-at.bofh.it> (permalink)
References <qMJfb-148-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


If NCR5380_select() returns -1, it means arbitration was lost or selection
failed and should be retried. If the main loop simply terminates when there
are still commands on the issue queue, they will remain queued until they
expire.

Fix this by clearing the 'done' flag after selection failure or lost
arbitration.

The "else break" clause in NCR5380_main() that gets removed here appears
to be a vestige of a long-gone loop that iterated over host instances.
See commit 491447e1fcff ("[PATCH] next NCR5380 updates") in
history/history.git.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Tested-by: Ondrej Zary <linux@rainbow-software.org>
Tested-by: Michael Schmitz <schmitzmic@gmail.com>

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

Index: linux/drivers/scsi/NCR5380.c
===================================================================
--- linux.orig/drivers/scsi/NCR5380.c	2016-01-03 16:03:28.000000000 +1100
+++ linux/drivers/scsi/NCR5380.c	2016-01-03 16:03:30.000000000 +1100
@@ -1052,8 +1052,7 @@ static void NCR5380_main(struct work_str
 			NCR5380_information_transfer(instance);
 			dprintk(NDEBUG_MAIN, "scsi%d : main() : done set false\n", instance->host_no);
 			done = 0;
-		} else
-			break;
+		}
 	} while (!done);
 	
 	spin_unlock_irq(instance->host_lock);
Index: linux/drivers/scsi/atari_NCR5380.c
===================================================================
--- linux.orig/drivers/scsi/atari_NCR5380.c	2016-01-03 16:03:28.000000000 +1100
+++ linux/drivers/scsi/atari_NCR5380.c	2016-01-03 16:03:30.000000000 +1100
@@ -1181,6 +1181,7 @@ static void NCR5380_main(struct work_str
 #endif
 						hostdata->retain_dma_intr--;
 						local_irq_restore(flags);
+						done = 0;
 						dprintk(NDEBUG_MAIN, "scsi%d: main(): select() failed, "
 							    "returned to issue_queue\n", HOSTNO);
 					}


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH v4 23/78] ncr5380: Always retry arbitration and selection Finn Thain <fthain@telegraphics.com.au> - 2016-01-03 06:20 +0100

csiph-web