From 2f854b82b001b5d05b4e1c81acb947f7bd9cee9f Mon Sep 17 00:00:00 2001 From: Finn Thain Date: Sun, 3 Jan 2016 16:05:22 +1100 Subject: 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 Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen --- drivers/scsi/NCR5380.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/scsi/NCR5380.h') 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__ -- cgit v1.2.3