diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2016-01-03 06:05:22 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-01-07 03:42:56 +0100 |
commit | 2f854b82b001b5d05b4e1c81acb947f7bd9cee9f (patch) | |
tree | e0efdc6bc54882856e8e5631336cdb2b96676570 /drivers/scsi/NCR5380.h | |
parent | ncr5380: Introduce unbound workqueue (diff) | |
download | linux-2f854b82b001b5d05b4e1c81acb947f7bd9cee9f.tar.xz 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.h | 1 |
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__ |