Commit 1d3db59d authored by Finn Thain's avatar Finn Thain Committed by Martin K. Petersen

ncr5380: Always retry arbitration and selection

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 491447e1 ("[PATCH] next NCR5380 updates") in
history/history.git.
Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Tested-by: default avatarOndrej Zary <linux@rainbow-software.org>
Tested-by: default avatarMichael Schmitz <schmitzmic@gmail.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent ae753a33
...@@ -1052,8 +1052,7 @@ static void NCR5380_main(struct work_struct *work) ...@@ -1052,8 +1052,7 @@ static void NCR5380_main(struct work_struct *work)
NCR5380_information_transfer(instance); NCR5380_information_transfer(instance);
dprintk(NDEBUG_MAIN, "scsi%d : main() : done set false\n", instance->host_no); dprintk(NDEBUG_MAIN, "scsi%d : main() : done set false\n", instance->host_no);
done = 0; done = 0;
} else }
break;
} while (!done); } while (!done);
spin_unlock_irq(instance->host_lock); spin_unlock_irq(instance->host_lock);
......
...@@ -1181,6 +1181,7 @@ static void NCR5380_main(struct work_struct *work) ...@@ -1181,6 +1181,7 @@ static void NCR5380_main(struct work_struct *work)
#endif #endif
hostdata->retain_dma_intr--; hostdata->retain_dma_intr--;
local_irq_restore(flags); local_irq_restore(flags);
done = 0;
dprintk(NDEBUG_MAIN, "scsi%d: main(): select() failed, " dprintk(NDEBUG_MAIN, "scsi%d: main(): select() failed, "
"returned to issue_queue\n", HOSTNO); "returned to issue_queue\n", HOSTNO);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment