many serial subdrivers are clearly written as if throttle/unthrottle
cannot sleep. This leads to unneeded atomic submissions. This
patch converts affected drivers in a way to makes very clear that
throttle/unthrottle can sleep. Thus future misdesigns can be avoided
and efficiency and reliability improved.
This removes any such assumption using GFP_KERNEL and spin_lock_irq()
Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
usb:usbserial:symbolserial: fix race between unthrottle and completion handler
symbol_unthrottle() mustn't resubmit the URB unconditionally
as the URB may still be running.
the same bug as opticon.
Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
And indeed none of them use it. Clean this up as it will make moving to a
standard open method rather easier.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as1254) splits up the shutdown method of usb_serial_driver
into a disconnect and a release method.
The problem is that the usb-serial core was calling shutdown during
disconnect handling, but drivers didn't expect it to be called until
after all the open file references had been closed. The result was an
oops when the close method tried to use memory that had been
deallocated by shutdown.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This allows us to clean stuff up, but is probably also going to cause
some app breakage with buggy apps as we now implement proper POSIX behaviour
for USB ports matching all the other ports. This does also mean other apps
that break on USB will now work properly.
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
There are various bits of code here that are unfinished and instead of
being harmless either confuse or spew stuff into the logs at higher than
debug level. They can and should go away.
Also remove the bogus use of tty->lowlatency. We fixed the need for this hack
long ago (with the flip buffer rewrite) but people keep copying it into drivers.
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
We need to figure out what userspace programs are expecting from this
driver, so log them so we can try to get it right.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is for the Symbol 6608 barcode scanner in a fake "HID" mode.
Thanks to Dalibor Grgec for working with me to get this to start to work
properly.
Cc: Dalibor Grgec <dalibor.grgec@zemris.fer.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>