On Fri, Dec 04, 2020 at 10:08:08AM +1100, Finn Thain wrote: ... > > You've put your finger on a known problem with certain > NCR5380_poll_politely() call sites. That is, the nominal timeout, HZ / 64, > is meaningless because it is ignored in atomic context. So you may as well > specify 0 jiffies at these call sites. (There will be a 1 jiffy timeout > applied regardless.) ... > > However, I can see the value in your approach, i.e. passing a zero timeout > to NCR5380_poll_politely() whenever that argument is unused. And I agree > that this could then be used to inhibit sleeping, rather than testing > irqs_disabled(). > > So if you really don't like irqs_disabled(), perhaps you can just keep the > better parts of your two attempts, i.e. passing 0 to > NCR5380_poll_politely() where appropriate and facilitating that by adding > a new can_sleep parameter to do_abort() and NCR5380_transfer_pio(), as in, ... > > Does that sound like a reasonable compromise? > Yes, of course. Thanks a lot. I've sent a v2. -- Ahmed S. Darwish Linutronix GmbH