Re: Irq context wrong for USB ACM serial driver calling PPP?

From: Paul Mackerras (paulus@linuxcare.com)
Date: Wed Mar 08 2000 - 19:01:46 EST


On Tue, 07 Mar 2000, Jamie Lokier wrote:

> The problem with USB ACM is that it queues the data from its irq
> handler, and calls the line discipline's write_wakeup from irq context.
> The standard PC serial driver calls write_wakeup from BH context.
>
> PPP's write_wakeup then does some complicated stuff which isn't quite
> irq safe, but could probably be made so.

The PPP driver's write_wakeup routine will typically want to do things
like compressing the next packet and sending it out. We could do this
at hw interrupt level but it would be very undesirable because it would
mean there was a relatively long time when the serial interrupts were
disabled.

If the PPP driver had to cope with the write_wakeup being called from hw
interrupt context, it would be necessary for the PPP driver to have code
to schedule a bottom half (or tasklet or whatever) so it could do the
transmit-side processing at BH level.

This code is already in all the other serial drivers in the kernel. I
would be loath to put it into the PPP driver just to cope with the USB ACM
driver.

I guess ultimately it's a question of whether the code goes in all of the
serial drivers or alternatively in all of the line disciplines. At the
moment it is in the serial drivers. Ultimately it could probably be
pulled out into a serial driver support library of some kind.

Paul.

--
Paul Mackerras, Senior Open Source Researcher, Linuxcare, Inc.
+61 2 6262 8990 tel, +61 2 6262 8991 fax
paulus@linuxcare.com.au, http://www.linuxcare.com.au/
Linuxcare.  Support for the revolution.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Mar 15 2000 - 21:00:14 EST