Messages in this thread | | | From | Arnd Bergmann <> | Subject | Re: [PATCH] [mmc] [tifm] Reduces delay in card insert/removal | Date | Thu, 26 Apr 2007 01:00:30 +0200 |
| |
On Wednesday 25 April 2007, Sergey Yanovich wrote:
> First, I tried to replace 'mdelay' with 'msleep' and put it after > 'unlock'. It gives a certain oops. > > With the delay of 50 msec driver remains stable. It has something > to do with hardware initialization, so this value should not be > affected by CPU speed. I hope so. > > Signed-off-by: Sergey Yanovich <ynvich@gmail.com>
No, 50ms is still too much, I'd consider every instance of 'mdelay' to be a bug in general, except maybe with exceptionally broken hardware, which I don't think this is.
The reason that it gave you an oops is that you call it from a tasklet. You have to convert the tasklet to a workqueue at the same time if you want to sleep inside it. In fact, it might be a good idea to convert all the tasklets in that driver to use schedule_work instead.
Arnd <>< - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |