Re: [PATCH 5/5] usb_debug: EXPERIMENTAL - poll hcd device to force writes

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jason Wessel
Date: Wednesday, May 6, 2009 - 1:24 pm

Oliver Neukum wrote:

This conversion is done in the tty layer "the high level".  By the time
the low level driver gets it character stream via the tty call backs
everything is already processed.


In the scheme originally posted with the cap of 42 "in flight" urbs, I
had not seen it run out while using the standard tty driver.   The tty
driver really is not really the key problem I was after with the forced
poll patch.

The console driver is where all the character loss is going on.  There
is no tty interface, and there are no "write room" checks.  The present
kernel interface to the uart console callbacks is synchronous.

Here is a back trace to illustrate the typical 8250 driver.

#0  serial8250_console_putchar at drivers/serial/8250.c:2690
#1  0xc03977d4 in uart_console_write at drivers/serial/serial_core.c:1810
#2  0xc039cbb8 in serial8250_console_write at drivers/serial/8250.c:2729
#3  0xc022802b in __call_console_drivers at kernel/printk.c:419
#4  0xc022808b in _call_console_drivers at kernel/printk.c:449
#5  0xc0228269 in call_console_drivers at kernel/printk.c:499
#6  release_console_sem at kernel/printk.c:1020
#7  0xc022872b in vprintk at kernel/printk.c:749
#8  0xc022889b in printk at kernel/printk.c:582

Doing enough printk's such as in register_console() will cause loss
because you run out of URBs unless you can force them to complete.

Is there a valid way we can force the urbs to complete short of "polling
the heck out of the host controller" or have a synchronous interface in
the case of the console write call back?

There are two different call paths into the USB serial drivers just like
the uart drivers.  One is for the tty callbacks and other is for the
console call backs.  I am most interested how to fix the console writes
(with respect to the original experimental patch).

Jason.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/5] usb_debug driver improvements, Jason Wessel, (Tue May 5, 7:00 pm)
[PATCH 1/5] usb_debug: implement multi urb write, Jason Wessel, (Tue May 5, 7:00 pm)
Re: [PATCH 1/5] usb_debug: implement multi urb write, Oliver Neukum, (Wed May 6, 12:16 am)
Re: [PATCH 1/5] usb_debug: implement multi urb write, Jason Wessel, (Wed May 6, 4:57 am)
Re: [PATCH 1/5] usb_debug: implement multi urb write, Oliver Neukum, (Wed May 6, 5:31 am)
Re: [PATCH 5/5] usb_debug: EXPERIMENTAL - poll hcd device ..., Jason Wessel, (Wed May 6, 1:24 pm)