-
Stuart MacDonald authored
1-fix-lowlat: QA found that running all four ports at 460800 would drop data. I traced it to data being dropped in the read callback because the flip buffers were full. Turning on the low latency flag fixed things. 2-fix-taint A side-effect of turning on low latency; the interrupt context from the callback is now passed through to the tty layer, passing it on to calls back into usb-serial.c. Which causes deadlocks when trying to re-acquire the per-port semaphore. We've already talked about this. This patch is my work-around for the usb-serial.c brokenness. Basically, implemement a buffering scheme, and schedule a software interrupt to handle the data handoff to the tty layer sometime later. urb_pool_size defaults to 8, but is a module parameter and can be modified at runtime. The buffering is needed so that the driver can run while data is waiting to be processed, but I could have used the tty layer scheduling instead of doing my own by turning off low latency. However, I looked at the tty layer and it seems to me that there's nothing preventing a really fast device from flipping one buffer, flipping the next, and flipping back to the still full buffer from before (actually, the flip just gets scheduled for later), so my driver needs to be able to hold onto buffered data and schedule them for processing later anyway. So, might as well leave low_latency on. diff -Naur linux-2.5.49-0-virgin/drivers/usb/serial/whiteheat.c linux-2.5.49-1-fix- lowlat/drivers/usb/serial/whiteheat.c
b6f5eb6a