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>
This commit is contained in:
committed by
Martin K. Petersen
parent
0ad0eff98f
commit
2f854b82b0
@@ -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__
|
||||
|
||||
Reference in New Issue
Block a user