scsi: ncr5380: Simplify register polling limit
authorFinn Thain <fthain@telegraphics.com.au>
Mon, 10 Oct 2016 04:46:52 +0000 (00:46 -0400)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 8 Nov 2016 22:29:47 +0000 (17:29 -0500)
commitd4408dd7ecff6ed3561f155923738474c585f31d
treed5b2e08ec4d80487519d6016ad329ae551b52dd5
parentabd12b09292cc87a75f7c3e3c3f2b12589560bb1
scsi: ncr5380: Simplify register polling limit

When polling a device register under irq lock the polling loop terminates
after a given number of jiffies. Make this timeout independent of the HZ
setting.

All 5380 drivers benefit from this patch, which optimizes the PIO fast
path, because they all use PIO transfers (for phases other than DATA IN
and DATA OUT). Some cards support only PIO transfers (even for DATA
phases). CPU cycles are scarce on some of these systems, so a small
improvement here makes a big difference.

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>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/NCR5380.c
drivers/scsi/NCR5380.h