Re: USB Ooops PL2303 when unplug while use (linux v3.7.3)

2013-02-14 Thread Johan Hovold
[ Remembered to drop Alan Cox from Cc. ] On Wed, Feb 13, 2013 at 01:40:08PM -0500, Peter Hurley wrote: > On Wed, 2013-02-13 at 15:25 +0100, Johan Hovold wrote: > > On Fri, Feb 01, 2013 at 10:44:25AM +0800, Chris Ruehl wrote: > > > I file a report for you, please have a look

[PATCH 4/4] TTY: fix close of uninitialised ports

2013-02-20 Thread Johan Hovold
drain delay for an uninitialised port. Currently a drain delay of up to two seconds could be added when a tty fails to open. Signed-off-by: Johan Hovold --- drivers/tty/tty_port.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/tty/tty_port.c b

[PATCH 1/4] TTY: clean up port shutdown

2013-02-20 Thread Johan Hovold
Untangle port-shutdown logic and make sure the initialised flag is always cleared for non-console ports. Signed-off-by: Johan Hovold --- drivers/tty/tty_port.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c index

[PATCH 3/4] TTY: clean up port drain-delay handling

2013-02-20 Thread Johan Hovold
Move port drain-delay handling to a separate function. Signed-off-by: Johan Hovold --- drivers/tty/tty_port.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c index 506f579..fcb4ccb 100644 --- a

[PATCH 0/4] TTY: port hangup and close fixes

2013-02-20 Thread Johan Hovold
e two driver relying on tty_port_close_start directly but that did not manage DTR themselves Johan Hovold (4): TTY: clean up port shutdown TTY: fix DTR not being dropped on hang up TTY: clean up port drain-delay handling TTY: fix close of uninitialised ports drivers/tty/mxser.c

[PATCH 2/4] TTY: fix DTR not being dropped on hang up

2013-02-20 Thread Johan Hovold
dropped by tty_port_close_start in the first place. ] Signed-off-by: Johan Hovold --- drivers/tty/mxser.c| 4 drivers/tty/n_gsm.c| 4 drivers/tty/tty_port.c | 23 +-- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/drivers/tty/mxser.c b/drivers

USB: serial: port lifetimes (was: Re: USB Ooops PL2303 when unplug while use (linux v3.7.3))

2013-02-22 Thread Johan Hovold
On Thu, Feb 14, 2013 at 06:43:36PM +0100, Johan Hovold wrote: > On Wed, Feb 13, 2013 at 01:40:08PM -0500, Peter Hurley wrote: [...] > > Looks to me like a bug the usb serial mini-port interface design. > > A usb bus disconnect has the pl2303 (and every other) mini-port freeing

Re: USB: serial: port lifetimes (was: Re: USB Ooops PL2303 when unplug while use (linux v3.7.3))

2013-02-22 Thread Johan Hovold
On Fri, Feb 22, 2013 at 10:17:51AM -0500, Alan Stern wrote: > On Fri, 22 Feb 2013, Johan Hovold wrote: > > > We keep the usb-serial-port structure around until the last tty > > reference is dropped, but the port private data is freed as part of > > unregistering from the

Re: [PATCH] usb/serial: Remove unnecessary check for console

2013-02-23 Thread Johan Hovold
On Sat, Feb 23, 2013 at 10:11:35AM -0500, Peter Hurley wrote: > The tty port ops shutdown() routine is not called for console ports; > remove extra check. > > Signed-off-by: Peter Hurley Acked-by: Johan Hovold -- To unsubscribe from this list: send the line "unsubscribe linux

Re: USB: serial: port lifetimes (was: Re: USB Ooops PL2303 when unplug while use (linux v3.7.3))

2013-02-23 Thread Johan Hovold
On Fri, Feb 22, 2013 at 01:21:24PM -0500, Peter Hurley wrote: > On Fri, 2013-02-22 at 12:35 -0500, Alan Stern wrote: > > On Fri, 22 Feb 2013, Johan Hovold wrote: > ISTM the usb_serial_port private data should not be freed until > port_release(). > > If usb traffic isn't

Re: USB: serial: port lifetimes (was: Re: USB Ooops PL2303 when unplug while use (linux v3.7.3))

2013-02-23 Thread Johan Hovold
On Fri, Feb 22, 2013 at 12:35:32PM -0500, Alan Stern wrote: > On Fri, 22 Feb 2013, Johan Hovold wrote: > > > > So we end up with an unregistered device still possibly referenced by > > > > tty instead, and I suspect we can't do much else than deal with any &

Re: USB: serial: port lifetimes (was: Re: USB Ooops PL2303 when unplug while use (linux v3.7.3))

2013-02-23 Thread Johan Hovold
On Sat, Feb 23, 2013 at 05:23:43PM +0100, Johan Hovold wrote: > On Fri, Feb 22, 2013 at 12:35:32PM -0500, Alan Stern wrote: > > > Yes, Peter noticed that one too. Changing the order shouldn't cause any > > > new issues as far as I can see. I'll cook up a patch for t

Re: USB: serial: port lifetimes (was: Re: USB Ooops PL2303 when unplug while use (linux v3.7.3))

2013-02-23 Thread Johan Hovold
On Sat, Feb 23, 2013 at 12:31:47PM -0500, Alan Stern wrote: > On Sat, 23 Feb 2013, Johan Hovold wrote: > > I'm not primarily concerned with deallocation, and perhaps my choice of > > wording was misleading when I use "pinning" in reference to the device > >

Re: [PATCH 2/4] TTY: fix DTR not being dropped on hang up

2013-02-26 Thread Johan Hovold
On Sat, Feb 23, 2013 at 09:18:02AM -0500, Peter Hurley wrote: > On Wed, 2013-02-20 at 17:02 +0100, Johan Hovold wrote: > > Move HUPCL handling to port shutdown so that DTR is dropped also on hang > > up (tty_port_close is a noop for hung-up ports). > > > > Also

[PATCH v2 4/4] TTY: fix close of uninitialised ports

2013-02-26 Thread Johan Hovold
drain delay for an uninitialised port. Currently a drain delay of up to two seconds could be added when a tty fails to open. Signed-off-by: Johan Hovold --- drivers/tty/tty_port.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/tty/tty_port.c b

[PATCH v2 1/4] TTY: clean up port shutdown

2013-02-26 Thread Johan Hovold
Untangle port-shutdown logic and make sure the initialised flag is always cleared for non-console ports. Signed-off-by: Johan Hovold --- drivers/tty/tty_port.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c index

[PATCH v2 0/4] TTY: port hangup and close fixes

2013-02-26 Thread Johan Hovold
p and close in shutdown. Both call sites guarantee tty is either NULL or has a kref. Changes since RFC-series: - fix up the two driver relying on tty_port_close_start directly but that did not manage DTR themselves Johan Hovold (4): TTY: clean up port shutdown TTY: fix DTR not being dropp

[PATCH v2 2/4] TTY: fix DTR not being dropped on hang up

2013-02-26 Thread Johan Hovold
dropped by tty_port_close_start in the first place. ] Signed-off-by: Johan Hovold --- drivers/tty/mxser.c| 4 drivers/tty/n_gsm.c| 4 drivers/tty/tty_port.c | 24 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/drivers/tty/mxser.c b

[PATCH v2 3/4] TTY: clean up port drain-delay handling

2013-02-26 Thread Johan Hovold
Move port drain-delay handling to a separate function. Signed-off-by: Johan Hovold --- drivers/tty/tty_port.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c index 2c4fea6..ce4b591 100644 --- a

[PATCH 002/103] USB: ftdi_sio: fix use after free in TIOCMIWAIT

2013-02-26 Thread Johan Hovold
s sleeping on modem-status changes and thus cannot be relied on to detect disconnects when woken up. Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/ftdi_sio.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/

[PATCH 000/103] USB: serial/cdc-acm: disconnect-related patches

2013-02-26 Thread Johan Hovold
inal patch updates some copyright information. All patches have been compile tested, while the cdc-acm, usb-serial, ftdi_sio and pl2303 ones have been tested on actual hardware. Johan Johan Hovold (103): USB: cdc-acm: fix device unregistration USB: ftdi_sio: fix use after free in TIOCMI

[PATCH 003/103] USB: garmin_gps: fix memory leak on disconnect

2013-02-26 Thread Johan Hovold
Remove bogus disconnect test introduced by 95bef012e ("USB: more serial drivers writing after disconnect") which prevented queued data from being freed on disconnect. The possible IO it was supposed to prevent is long gone. Cc: stable Signed-off-by: Johan Hovold --- drivers/

[PATCH 006/103] USB: ark3116: fix TIOCMIWAIT and disconnect

2013-02-26 Thread Johan Hovold
when woken up. Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/ark3116.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c index cbd904b..dd78fa3 100644 --- a/drivers/usb/serial/ark3116.c +++ b

[PATCH 001/103] USB: cdc-acm: fix device unregistration

2013-02-26 Thread Johan Hovold
flag. Specifically, further opens must be prevented and this is already implemented. Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/class/cdc-acm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 8ac25ad

[PATCH 010/103] USB: io_edgeport: fix TIOCMIWAIT and disconnect

2013-02-26 Thread Johan Hovold
been freed when woken up. Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/io_edgeport.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c index b00e5cb..c81b682 100644 --- a/drivers

[PATCH 004/103] USB: io_ti: fix get_icount for two port adapters

2013-02-26 Thread Johan Hovold
Add missing get_icount field to two-port driver. The two-port driver was not updated when switching to the new icount interface in commit 0bca1b913aff ("tty: Convert the USB drivers to the new icount interface"). Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/io_ti.

[PATCH 092/103] USB: metro-usb: always disable uart on close

2013-02-26 Thread Johan Hovold
Always try to disable the uart on close. Since the switch to tty ports, close will be called as part of shutdown before disconnect returns. Hence there is no need to check the disconnected flag, and we can put devices in disabled states also on driver unbind. Signed-off-by: Johan Hovold

[PATCH 073/103] USB: oti6858: replace custom ioctl operation with tiocmiwait

2013-02-26 Thread Johan Hovold
Replace custom ioctl operation with tiocmiwait. Signed-off-by: Johan Hovold --- drivers/usb/serial/oti6858.c | 26 -- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c index 9dbd64d..cc65967 100644

[PATCH 016/103] USB: quatech2: fix TIOCMIWAIT and disconnect

2013-02-26 Thread Johan Hovold
been freed when woken up. Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/quatech2.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/usb/serial/quatech2.c b/drivers/usb/serial/quatech2.c index 00e6c9b..89709bd 100644 --- a/drivers/usb

[PATCH 008/103] USB: cypress_m8: fix TIOCMIWAIT and disconnect

2013-02-26 Thread Johan Hovold
been freed when woken up. Also remove bogus test for private data pointer being NULL as it is never assigned in the loop. Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/cypress_m8.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/usb

[PATCH 011/103] USB: io_ti: fix TIOCMIWAIT and disconnect

2013-02-26 Thread Johan Hovold
been freed when woken up. Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/io_ti.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c index d7d3c0e..ada2d22 100644 --- a/drivers/usb/serial/io_ti.c

[PATCH 012/103] USB: mct_u232: fix TIOCMIWAIT and disconnect

2013-02-26 Thread Johan Hovold
been freed when woken up. Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/mct_u232.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c index a64d420..6a2957d 100644 --- a/drivers/usb/serial

[PATCH 005/103] USB: serial: fix interface refcounting

2013-02-26 Thread Johan Hovold
Make sure the interface is not released before our serial device. Note that drivers are still not allowed to access the interface in any way that may interfere with another driver that may have gotten bound to the same interface after disconnect returns. Cc: stable Signed-off-by: Johan Hovold

[PATCH 007/103] USB: ch341: fix TIOCMIWAIT and disconnect

2013-02-26 Thread Johan Hovold
t set). Note that we need to use the disconnected flag to detect disconnect as the port private data may have been freed when woken up. Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/ch341.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/ch34

[PATCH v2 99/103] USB: visor: always disable uart on close

2013-02-26 Thread Johan Hovold
Always try to disable the uart on close. Since the switch to tty ports, close will be called as part of shutdown before disconnect returns. Hence there is no need to check the disconnected flag, and we can put devices in disabled states also on driver unbind. Signed-off-by: Johan Hovold --- v2

[PATCH 085/103] USB: ssu100: switch to generic TIOCMIWAIT implementation

2013-02-26 Thread Johan Hovold
Switch to the generic TIOCMIWAIT implementation. Signed-off-by: Johan Hovold --- drivers/usb/serial/ssu100.c | 47 ++--- 1 file changed, 2 insertions(+), 45 deletions(-) diff --git a/drivers/usb/serial/ssu100.c b/drivers/usb/serial/ssu100.c index 0965b02

[PATCH 036/103] USB: mos7840: remove bogus disconnect test in close

2013-02-26 Thread Johan Hovold
Remove bogus (and unnecessary) test for serial->dev being NULL in close. The device is never cleared, and close is never called after a completed disconnect anyway. Simplify urb killing, and remove some related debug and dead code while at it. Signed-off-by: Johan Hovold --- drivers/

[PATCH 078/103] USB: spcp8x5: remove broken uart-error handling

2013-02-26 Thread Johan Hovold
Remove broken uart-error handling. This driver appears to implement uart-error handling but does not receive status interrupts or status information with bulk in transfers. Instead status was retrieved at open and used to flag only the first bulk in transfer. Signed-off-by: Johan Hovold

[PATCH 059/103] USB: ark3116: switch to generic TIOCMIWAIT implementation

2013-02-26 Thread Johan Hovold
Switch to the generic TIOCMIWAIT implementation which does not suffer from the races involved when using the deprecated sleep_on functions. Signed-off-by: Johan Hovold --- drivers/usb/serial/ark3116.c | 30 ++ 1 file changed, 2 insertions(+), 28 deletions(-) diff

[PATCH 023/103] USB: pl2303: make set_control_lines a port operation

2013-02-26 Thread Johan Hovold
Pass usb-serial port rather than usb device to set_control_lines, and make sure port device is used for all port related debugging. Signed-off-by: Johan Hovold --- drivers/usb/serial/pl2303.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/usb/serial

[PATCH 101/103] USB: garmin_gps: remove bogus disconnect test in bulk callback

2013-02-26 Thread Johan Hovold
Remove bogus disconnect test for serial device being NULL in read bulk callback. This can never happen as the port read urb is killed (and poisoned) at close, which in turn is guaranteed to be called before the last tty reference is dropped (and port->serial is cleared). Signed-off-by: Jo

[PATCH 043/103] USB: serial: remove generic disconnect callback

2013-02-26 Thread Johan Hovold
Remove the now empty generic disconnect callback and make the disconnect callback non-mandatory. Signed-off-by: Johan Hovold --- drivers/usb/serial/generic.c| 6 -- drivers/usb/serial/usb-serial.c | 4 ++-- include/linux/usb/serial.h | 1 - 3 files changed, 2 insertions(+), 9

[PATCH 033/103] USB: keyspan: remove bogus disconnect test in close

2013-02-26 Thread Johan Hovold
Remove bogus (and unnecessary) test for serial->dev being NULL in close. The device is never cleared, and close is never called after a completed disconnect anyway. Remove some out-commented bogus code while at it. Signed-off-by: Johan Hovold --- drivers/usb/serial/keyspan.c |

[PATCH 009/103] USB: f81232: fix TIOCMIWAIT and disconnect

2013-02-26 Thread Johan Hovold
been freed when woken up. Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/f81232.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index b1b2dc6..2885cd4 100644 --- a/drivers/usb/serial/f81232.c +++ b/drivers/usb

[PATCH 097/103] USB: pl2303: remove disconnect test from tiocmset

2013-02-26 Thread Johan Hovold
Remove unnecessary disconnect test in tiocmset. No ioctls will be made after disconnect returns. Signed-off-by: Johan Hovold --- drivers/usb/serial/pl2303.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial

[PATCH 055/103] USB: ftdi_sio: use port icount

2013-02-26 Thread Johan Hovold
Use the port-data icount for interrupt counters. Signed-off-by: Johan Hovold --- drivers/usb/serial/ftdi_sio.c | 30 ++ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index cbe439c

[PATCH 039/103] USB: serial: remove bogus disconnect test in cleanup

2013-02-26 Thread Johan Hovold
Remove bogus (and unnecessary) test for serial->dev being NULL in cleanup. The device is never cleared, and cleanup is never called after a completed disconnect anyway. Signed-off-by: Johan Hovold --- drivers/usb/serial/generic.c | 24 ++-- 1 file changed, 10 inserti

[PATCH 017/103] USB: ssu100: fix TIOCMIWAIT and disconnect

2013-02-26 Thread Johan Hovold
been freed when woken up. Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/ssu100.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/usb/serial/ssu100.c b/drivers/usb/serial/ssu100.c index b57cf84..8891203 100644 --- a/drivers/usb/serial

[PATCH 088/103] USB: cp210x: always disable uart on close

2013-02-26 Thread Johan Hovold
Always try to disable the uart on close. Since the switch to tty ports, close will be called as part of shutdown before disconnect returns. Hence there is no need to check the disconnected flag, and we can put devices in disabled states also on driver unbind. Signed-off-by: Johan Hovold

[PATCH 013/103] USB: mos7840: fix TIOCMIWAIT and disconnect

2013-02-26 Thread Johan Hovold
as the port private data may have been freed when woken up. Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/mos7840.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index 809fb32

[PATCH 024/103] USB: serial: rename tty-port callbacks

2013-02-26 Thread Johan Hovold
Rename the tty-port callbacks using a common prefix to more clearly separate them from the tty and usb driver callbacks. Rename serial_down to serial_tty_shutdown to match the callback name. Signed-off-by: Johan Hovold --- drivers/usb/serial/usb-serial.c | 18 +- 1 file changed

[PATCH 102/103] USB: iuu_phoenix: remove bogus disconnect test in close

2013-02-26 Thread Johan Hovold
Remove bogus disconnect test for serial device being NULL in close. This can never happen as close is guaranteed to be called before the last tty reference is dropped (and port->serial is cleared). Signed-off-by: Johan Hovold --- drivers/usb/serial/iuu_phoenix.c | 5 - 1 file changed

[PATCH 076/103] USB: quatech2: switch to generic TIOCMIWAIT implementation

2013-02-26 Thread Johan Hovold
Switch to the generic TIOCMIWAIT implementation. Signed-off-by: Johan Hovold --- drivers/usb/serial/quatech2.c | 48 ++- 1 file changed, 2 insertions(+), 46 deletions(-) diff --git a/drivers/usb/serial/quatech2.c b/drivers/usb/serial/quatech2.c index

[PATCH 066/103] USB: io_ti: switch to generic TIOCMIWAIT implementation

2013-02-26 Thread Johan Hovold
Switch to the generic TIOCMIWAIT implementation which does not suffer from the races involved when using the deprecated sleep_on functions. Signed-off-by: Johan Hovold --- drivers/usb/serial/io_ti.c | 38 -- 1 file changed, 4 insertions(+), 34 deletions

[PATCH 053/103] USB: serial: add generic TIOCMIWAIT implementation

2013-02-26 Thread Johan Hovold
fields and wake up any process sleeping on the port modem-status-change wait queue on changes. Signed-off-by: Johan Hovold --- drivers/usb/serial/generic.c| 45 + drivers/usb/serial/usb-serial.c | 2 ++ include/linux/usb/serial.h | 7 +++ 3 files

[PATCH 096/103] USB: pl2303: fix return value of tiocmset

2013-02-26 Thread Johan Hovold
Make sure we return 0 or a negative error number appropriate for userspace on errors. Signed-off-by: Johan Hovold --- drivers/usb/serial/pl2303.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 4b709585

[PATCH 082/103] USB: spcp8x5: reimplement device type detection

2013-02-26 Thread Johan Hovold
Reimplement device type detection using the device id table and quirks. Device type was used to detect one device type which did not support to control functions. Add quirks to the device table and store them in the private port data at probe instead. Signed-off-by: Johan Hovold --- drivers

[PATCH 079/103] USB: spcp8x5: clean up code

2013-02-26 Thread Johan Hovold
Clean up this driver somewhat. Signed-off-by: Johan Hovold --- drivers/usb/serial/spcp8x5.c | 72 +++- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/drivers/usb/serial/spcp8x5.c b/drivers/usb/serial/spcp8x5.c index f34930c..a5c3a36

[PATCH 100/103] USB: garmin_gps: remove bogus disconnect test in close

2013-02-26 Thread Johan Hovold
Remove bogus disconnect test for serial device being NULL in close. This can never happen as close is guaranteed to be called before the last tty reference is dropped (and port->serial is cleared). Signed-off-by: Johan Hovold --- drivers/usb/serial/garmin_gps.c | 4 1 file changed

[PATCH 061/103] USB: cypress_m8: replace custom ioctl operation with tiocmiwait

2013-02-26 Thread Johan Hovold
Replace custom ioctl operation with tiocmiwait. Signed-off-by: Johan Hovold --- drivers/usb/serial/cypress_m8.c | 81 + 1 file changed, 34 insertions(+), 47 deletions(-) diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index

[PATCH 084/103] USB: ssu100: switch to generic get_icount implementation

2013-02-26 Thread Johan Hovold
Switch to the generic get_icount implementation. Signed-off-by: Johan Hovold --- drivers/usb/serial/ssu100.c | 55 + 1 file changed, 15 insertions(+), 40 deletions(-) diff --git a/drivers/usb/serial/ssu100.c b/drivers/usb/serial/ssu100.c index

[PATCH 044/103] USB: serial: remove generic release callback

2013-02-26 Thread Johan Hovold
Remove empty generic release implementation and make the release callback non-mandatory (like attach, probe and disconnect). Signed-off-by: Johan Hovold --- drivers/usb/serial/generic.c| 5 - drivers/usb/serial/usb-serial.c | 3 +-- include/linux/usb/serial.h | 1 - 3 files changed

[PATCH 052/103] USB: serial: add tiocmiwait subdriver operation

2013-02-26 Thread Johan Hovold
Add tiocmiwait operation to struct usb_serial_driver. Signed-off-by: Johan Hovold --- drivers/usb/serial/usb-serial.c | 15 +++ include/linux/usb/serial.h | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb

[PATCH 050/103] USB: serial: use urb poison to reliably kill traffic

2013-02-26 Thread Johan Hovold
Use usb_poison_urb to reliably kill all urbs on disconnect and suspend. This way there will be no question that the urbs cannot be resubmitted by buggy subdrivers. Signed-off-by: Johan Hovold --- drivers/usb/serial/usb-serial.c | 55 +++-- 1 file changed, 37

[PATCH 049/103] USB: fix urb-poison imbalance

2013-02-26 Thread Johan Hovold
be decremented to a negative value, effectively preventing the urb from being submitted. Note that there are currently no in-kernel drivers affected by this. Signed-off-by: Johan Hovold --- drivers/usb/core/urb.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers

[PATCH 080/103] USB: spcp8x5: pass usb-serial port to control functions

2013-02-26 Thread Johan Hovold
Pass usb-serial port to the control functions for uart status and work mode. Use port device for debugging and use dev_err to report errors. Signed-off-by: Johan Hovold --- drivers/usb/serial/spcp8x5.c | 54 +++- 1 file changed, 28 insertions(+), 26

[PATCH 103/103] USB: serial: update copyright information

2013-02-26 Thread Johan Hovold
Update copyright information. Signed-off-by: Johan Hovold --- drivers/usb/serial/ftdi_sio.c | 2 +- drivers/usb/serial/generic.c| 2 +- drivers/usb/serial/usb-serial.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial

[PATCH 029/103] USB: ark3116: remove bogus disconnect test in close

2013-02-26 Thread Johan Hovold
Remove bogus (and unnecessary) test for serial->dev being NULL in close. The device is never cleared, and close is never called after a completed disconnect anyway. Signed-off-by: Johan Hovold --- drivers/usb/serial/ark3116.c | 17 +++-- 1 file changed, 7 insertions(+),

[PATCH 030/103] USB: cyberjack: remove bogus disconnect test in close

2013-02-26 Thread Johan Hovold
Remove bogus (and unnecessary) test for serial->dev being NULL in close. The device is never cleared, and close is never called after a completed disconnect anyway. Signed-off-by: Johan Hovold --- drivers/usb/serial/cyberjack.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) d

[PATCH 065/103] USB: io_ti: switch to generic get_icount implementation

2013-02-26 Thread Johan Hovold
Switch to the generic get_icount implementation. Note that the interrupt counters will no longer be reset at open which is in accordance with which how the other drivers work. Signed-off-by: Johan Hovold --- drivers/usb/serial/io_ti.c | 39 --- 1 file

[PATCH 046/103] USB: cyberjack: fix disconnect handling

2013-02-26 Thread Johan Hovold
non-private urb). Signed-off-by: Johan Hovold --- drivers/usb/serial/cyberjack.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c index de9253d..7814262 100644 --- a/drivers/usb/serial/cyberjack.c +++ b

[PATCH 087/103] USB: ti_usb_3410_5052: switch to generic TIOCMIWAIT implementation

2013-02-26 Thread Johan Hovold
Switch to the generic TIOCMIWAIT implementation which does not suffer from the races involved when using the deprecated sleep_on functions. Signed-off-by: Johan Hovold --- drivers/usb/serial/ti_usb_3410_5052.c | 30 +++--- 1 file changed, 3 insertions(+), 27 deletions

[PATCH 034/103] USB: keyspan_pda: remove bogus disconnect test from dtr_rts

2013-02-26 Thread Johan Hovold
Remove bogus (and unnecessary) test for serial->dev being NULL in dtr_rts. The device is never cleared, and disconnect is handled for dtr_rts in usb-serial core anyway. Signed-off-by: Johan Hovold --- drivers/usb/serial/keyspan_pda.c | 10 -- 1 file changed, 4 insertions(+)

[PATCH 020/103] USB: kl5kusb105: remove unnecessary urb kill on close

2013-02-26 Thread Johan Hovold
Remove kill of interrupt-in urb on close as it has never been submitted. Signed-off-by: Johan Hovold --- drivers/usb/serial/kl5kusb105.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c index 769d910..57fd001 100644 --- a

[PATCH 067/103] USB: mct_u232: switch to generic get_icount implementation

2013-02-26 Thread Johan Hovold
Switch to the generic get_icount implementation. Signed-off-by: Johan Hovold --- drivers/usb/serial/mct_u232.c | 40 1 file changed, 4 insertions(+), 36 deletions(-) diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c index

[PATCH 042/103] USB: serial: fix generic disconnect implementation

2013-02-26 Thread Johan Hovold
There is no need for the generic disconnect callback to stop the read and write urbs a second time as this has already been taken care of by close (which is called from hangup as part of disconnect). Signed-off-by: Johan Hovold --- drivers/usb/serial/generic.c | 12 +--- 1 file changed

[PATCH 051/103] USB: serial: fix usb-serial bus device removal

2013-02-26 Thread Johan Hovold
Make sure to unregister the tty device before calling subdriver port_remove. This way remove will reverse probe, and specifically any port data released in port_remove will be available throughout tty unregister. Reported-by: Peter Hurley Signed-off-by: Johan Hovold --- drivers/usb/serial

[PATCH 091/103] USB: kl5kusb105: always disable uart on close

2013-02-26 Thread Johan Hovold
Always try to disable the uart on close. Since the switch to tty ports, close will be called as part of shutdown before disconnect returns. Hence there is no need to check the disconnected flag, and we can put devices in disabled states also on driver unbind. Signed-off-by: Johan Hovold

[PATCH 035/103] USB: keyspan_pda: remove bogus disconnect test in close

2013-02-26 Thread Johan Hovold
Remove bogus (and unnecessary) test for serial->dev being NULL in close. The device is never cleared, and close is never called after a completed disconnect anyway. Signed-off-by: Johan Hovold --- drivers/usb/serial/keyspan_pda.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deleti

[PATCH 025/103] USB: serial: remove redundant comments

2013-02-26 Thread Johan Hovold
Remove redundant comments and fix some minor coding style issues. Signed-off-by: Johan Hovold --- drivers/usb/serial/usb-serial.c | 20 +--- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index

[PATCH 063/103] USB: io_edgeport: switch to generic get_icount implementation

2013-02-26 Thread Johan Hovold
Switch to the generic get_icount implementation. Note that the interrupt counters will no longer be reset at open which is in accordance with which how the other drivers work. Signed-off-by: Johan Hovold --- drivers/usb/serial/io_edgeport.c | 45

[PATCH 064/103] USB: io_edgeport: switch to generic TIOCMIWAIT implementation

2013-02-26 Thread Johan Hovold
Switch to the generic TIOCMIWAIT implementation. Signed-off-by: Johan Hovold --- drivers/usb/serial/io_edgeport.c | 37 + drivers/usb/serial/io_tables.h | 4 2 files changed, 5 insertions(+), 36 deletions(-) diff --git a/drivers/usb/serial

[PATCH 093/103] USB: mos7720: always disable uart on close

2013-02-26 Thread Johan Hovold
Always try to disable the uart on close. Since the switch to tty ports, close will be called as part of shutdown before disconnect returns. Hence there is no need to check the disconnected flag, and we can put devices in disabled states also on driver unbind. Signed-off-by: Johan Hovold

[PATCH 069/103] USB: mos7720: remove broken get_icount and TIOCMIWAIT

2013-02-26 Thread Johan Hovold
support was added as it does not wait for the modem status to change (does not use a work queue at all). Signed-off-by: Johan Hovold --- drivers/usb/serial/mos7720.c | 55 1 file changed, 55 deletions(-) diff --git a/drivers/usb/serial/mos7720.c b

[PATCH 032/103] USB: iuu_phoenix: remove bogus disconnect test in close

2013-02-26 Thread Johan Hovold
Remove bogus (and unnecessary) test for serial->dev being NULL in close. The device is never cleared, and close is never called after a completed disconnect anyway. Signed-off-by: Johan Hovold --- drivers/usb/serial/iuu_phoenix.c | 13 + 1 file changed, 5 insertions(+), 8 deleti

[PATCH 047/103] USB: serial: fix port release

2013-02-26 Thread Johan Hovold
We should not call kill_traffic (and usb_kill_urb) once disconnect returns. Any pending urbs are killed at disconnect and new submissions are prevented by usb_unbind_interface (and usb_disable_interface). Signed-off-by: Johan Hovold --- drivers/usb/serial/usb-serial.c | 7 --- 1 file

[PATCH 086/103] USB: ti_usb_3410_5052: switch to generic get_icount implementation

2013-02-26 Thread Johan Hovold
Switch to the generic get_icount implementation. Signed-off-by: Johan Hovold --- drivers/usb/serial/ti_usb_3410_5052.c | 44 ++- 1 file changed, 7 insertions(+), 37 deletions(-) diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial

[PATCH 094/103] USB: opticon: fix return value of tiocmset

2013-02-26 Thread Johan Hovold
Make sure we return 0 or a negative error number appropriate for userspace on errors. Currently 1 rather than 0 is returned on successful operation. Signed-off-by: Johan Hovold --- drivers/usb/serial/opticon.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a

[PATCH 095/103] USB: opticon: remove disconnect test from tiocmset

2013-02-26 Thread Johan Hovold
Remove unnecessary disconnect test in tiocmset. No ioctls will be made after disconnect returns. Signed-off-by: Johan Hovold --- drivers/usb/serial/opticon.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial

[PATCH 099/103] USB: visor: always disable uart on close

2013-02-26 Thread Johan Hovold
Always try to disable the uart on close. Since the switch to tty ports, close will be called as part of shutdown before disconnect returns. Hence there is no need to check the disconnected flag, and we can put devices in disabled states also on driver unbind. Signed-off-by: Johan Hovold

[PATCH 045/103] USB: serial: clean up generic-operation handling

2013-02-26 Thread Johan Hovold
initialisation to after the initial sanity checks. Signed-off-by: Johan Hovold --- drivers/usb/serial/usb-serial.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 628a386..b9f460b 100644 --- a

[PATCH 090/103] USB: io_ti: always disable uart on close

2013-02-26 Thread Johan Hovold
Always try to disable the uart on close. Since the switch to tty ports, close will be called as part of shutdown before disconnect returns. Hence there is no need to check the disconnected flag, and we can put devices in disabled states also on driver unbind. Signed-off-by: Johan Hovold

[PATCH 062/103] USB: f81232: add custom tiocmiwait operation

2013-02-26 Thread Johan Hovold
Break out TIOCMIWAIT handling from custom ioctl operation and use tiocmiwait operation field instead. Signed-off-by: Johan Hovold --- drivers/usb/serial/f81232.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232

[PATCH 075/103] USB: quatech2: switch to generic get_icount implementation

2013-02-26 Thread Johan Hovold
Switch to the generic get_icount implementation. Signed-off-by: Johan Hovold --- drivers/usb/serial/quatech2.c | 50 +++ 1 file changed, 12 insertions(+), 38 deletions(-) diff --git a/drivers/usb/serial/quatech2.c b/drivers/usb/serial/quatech2.c index

[PATCH 015/103] USB: pl2303: fix TIOCMIWAIT and disconnect

2013-02-26 Thread Johan Hovold
when woken up. Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/pl2303.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 54adc91..3e2dd2c 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303

[PATCH 057/103] USB: ftdi_sio: switch to generic get_icount implementation

2013-02-26 Thread Johan Hovold
Switch to the generic get_icount implementation. Signed-off-by: Johan Hovold --- drivers/usb/serial/ftdi_sio.c | 24 +--- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 478f2b4..4f9bfe5 100644

[PATCH 026/103] USB: serial: clean up debug info

2013-02-26 Thread Johan Hovold
Remove redundant port number from debug output (already printed as part of device name). Signed-off-by: Johan Hovold --- drivers/usb/serial/usb-serial.c | 39 --- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/drivers/usb/serial/usb-serial.c

[PATCH 031/103] USB: digi_acceleport: remove bogus disconnect test in close

2013-02-26 Thread Johan Hovold
Remove bogus (and unnecessary) test for serial->dev being NULL in close. The device is never cleared, and close is never called after a completed disconnect anyway. Signed-off-by: Johan Hovold --- drivers/usb/serial/digi_acceleport.c | 92 ++-- 1 file chan

[PATCH 089/103] USB: cypress_m8: remove bogus disconnect test from close

2013-02-26 Thread Johan Hovold
Remove disconnected test from close which did not protect any device IO at all. Signed-off-by: Johan Hovold --- drivers/usb/serial/cypress_m8.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index 23b77eb..f6a7d88

[PATCH 060/103] USB: ch341: replace custom ioctl operation with tiocmiwait

2013-02-26 Thread Johan Hovold
Replace custom ioctl operation with tiocmiwait. Signed-off-by: Johan Hovold --- drivers/usb/serial/ch341.c | 25 +++-- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index 7acb155..d556c94 100644 --- a

<    3   4   5   6   7   8   9   10   11   12   >