Re: [PATCH] [mmc] [tifm] Reduces delay in card insert/removal
From: Arnd Bergmann
Date: Wed Apr 25 2007 - 19:01:07 EST
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@xxxxxxxxx>
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.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/