Re: Little rework of usbserial in 2.4\

From: Marcelo Tosatti
Date: Wed Dec 22 2004 - 14:49:16 EST


On Wed, Dec 22, 2004 at 11:07:08AM -0500, Nish Aravamudan wrote:
> On Tue, 21 Dec 2004 12:52:22 -0800, Pete Zaitcev <zaitcev@xxxxxxxxxx> wrote:
> > On Sun, 12 Dec 2004 15:47:44 -0800, Nish Aravamudan <nish.aravamudan@xxxxxxxxx> wrote:
> >
> > > > diff -urpN -X dontdiff linux-2.4.28-bk3/drivers/usb/serial/usbserial.c linux-2.4.28-bk3-sx4/drivers/usb/serial/usbserial.c
> > > > --- linux-2.4.28-bk3/drivers/usb/serial/usbserial.c 2004-11-22 23:04:19.000000000 -0800
> >
> > > > @@ -1803,6 +1820,12 @@ static void __exit usb_serial_exit(void)
> > > >
> > > > usb_deregister(&usb_serial_driver);
> > > > tty_unregister_driver(&serial_tty_driver);
> > > > +
> > > > + while (!list_empty(&usb_serial_driver_list)) {
> > > > + err("%s - module is in use, hanging...\n", __FUNCTION__);
> > > > + set_current_state(TASK_UNINTERRUPTIBLE);
> > > > + schedule_timeout(5*HZ);
> > > > + }
> >
> > > Please consider using msleep() here instead of schedule_timeout().
> >
> > No, Nish, it's 2.4. There's no msleep here. I can create something like
> > "drivers/usb/serial/compat26.h", similar to include/linux/libata-compat.h,
> > but I do not think it's worth the trouble at present juncture.
>
> I agree that it's not worth the trouble. Sorry, I was under the
> impression that Kernel-Janitors had pushed a series of patches to
> backport msleep(). Maybe they haven't made it to mainline yet. Sorry
> for the noise.

Nish, Pete,

msleep() is now in the generic headers, megaraid2 wants it to fix a EH busywait
condition which triggers the NMI watchdog (the EH path doesnt yield the CPU as it should),
plus libata and forcedeth already had their own msleep() definitions which now have
been removed.

Patches to change current handcoded yields to msleep() wont be accepted (cleanups), those
belong to v2.6.

Thanks
-
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/