PATCH: Fix ftdi_sio oops in 2.4 (applicable to 2.6 too?)

From: Nigel Cunningham
Date: Fri Jul 16 2004 - 00:21:57 EST


Hi.

I used to get an oopses when disconnecting my serial console, which runs
via the ftdi_sio driver. The cause turned out to be that the
ASYNC_LOW_LATENCY flag being set causes the driver to schedule while in
an interrupt handler (because it tries to take a spinlock). This little
patch against 2.4.26 removes the setting of the LOW_LATENCY flag and
thus the oops. There may well be a better solution, but I send this for
your consideration (please excuse the source tree names).

Regards,

Nigel

diff -ruN software-suspend-core-2.0.0.99/drivers/usb/serial/ftdi_sio.c software-suspend-core-2.0.0.99A/drivers/usb/serial/ftdi_sio.c
--- software-suspend-core-2.0.0.99/drivers/usb/serial/ftdi_sio.c 2004-04-16 23:46:16.000000000 +1000
+++ software-suspend-core-2.0.0.99A/drivers/usb/serial/ftdi_sio.c 2004-07-11 15:25:12.000000000 +1000
@@ -1038,7 +1038,7 @@
init_waitqueue_head(&priv->delta_msr_wait);
/* This will push the characters through immediately rather
than queue a task to deliver them */
- priv->flags = ASYNC_LOW_LATENCY;
+ //priv->flags = ASYNC_LOW_LATENCY;

/* Increase the size of read buffers */
if (port->bulk_in_buffer) {


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