summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/NCR5380.h
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2016-01-03 16:05:22 +1100
committerMartin K. Petersen <martin.petersen@oracle.com>2016-01-06 21:42:56 -0500
commit2f854b82b001b5d05b4e1c81acb947f7bd9cee9f (patch)
treee0efdc6bc54882856e8e5631336cdb2b96676570 /drivers/scsi/NCR5380.h
parent0ad0eff98fec3c940ec199047ff580abaaa5bb1a (diff)
downloadlinux-2f854b82b001b5d05b4e1c81acb947f7bd9cee9f.tar.gz
linux-2f854b82b001b5d05b4e1c81acb947f7bd9cee9f.tar.bz2
linux-2f854b82b001b5d05b4e1c81acb947f7bd9cee9f.zip
ncr5380: Sleep when polling, if possible
When in process context, sleep during polling if doing so won't add significant latency. In interrupt context or if the lock is held, poll briefly then give up. Keep both core drivers in sync. Calibrate busy-wait iterations to allow for variation in chip register access times between different 5380 hardware implementations. 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>
Diffstat (limited to 'drivers/scsi/NCR5380.h')
-rw-r--r--drivers/scsi/NCR5380.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/NCR5380.h b/drivers/scsi/NCR5380.h
index f9c861d083d0..412a344ac676 100644
--- a/drivers/scsi/NCR5380.h
+++ b/drivers/scsi/NCR5380.h
@@ -285,6 +285,7 @@ struct NCR5380_hostdata {
unsigned spin_max_w;
#endif
struct workqueue_struct *work_q;
+ unsigned long accesses_per_ms; /* chip register accesses per ms */
};
#ifdef __KERNEL__