[PATCH v2 42/85] USB: ch341: replace custom ioctl operation with tiocmiwait

2013-03-14 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 f79ea70..519eebf 100644 --- a

[PATCH v2 22/85] USB: ssu100: remove explicit initialisation of disconnect

2013-03-14 Thread Johan Hovold
The disconnect callback is set to the generic implementation by usb-serial core if NULL. Signed-off-by: Johan Hovold --- drivers/usb/serial/ssu100.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/serial/ssu100.c b/drivers/usb/serial/ssu100.c index 8891203..8bb8579 100644 --- a

[PATCH v2 65/85] USB: spcp8x5: add proper modem-status support

2013-03-14 Thread Johan Hovold
Fetch modem status on carrier_raised and tiocmget. This driver appeared to support modem-status but only read the modem status registers once at open and then used that cached value for all further enquires. Signed-off-by: Johan Hovold --- drivers/usb/serial/spcp8x5.c | 27

[PATCH v2 36/85] USB: serial: add generic get_icount implementation

2013-03-14 Thread Johan Hovold
Add generic get_icount implementation that subdrivers relying on the port interrupt counters can use. Signed-off-by: Johan Hovold --- drivers/usb/serial/generic.c | 27 +++ include/linux/usb/serial.h | 2 ++ 2 files changed, 29 insertions(+) diff --git a/drivers/usb

[PATCH v2 48/85] USB: io_ti: switch to generic TIOCMIWAIT implementation

2013-03-14 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 v2 40/85] USB: ark3116: switch to generic get_icount implementation

2013-03-14 Thread Johan Hovold
Switch to the generic get_icount implementation. Signed-off-by: Johan Hovold --- drivers/usb/serial/ark3116.c | 49 +--- 1 file changed, 14 insertions(+), 35 deletions(-) diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c index

[PATCH v2 57/85] USB: quatech2: switch to generic get_icount implementation

2013-03-14 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 v2 26/85] USB: serial: remove generic release callback

2013-03-14 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 v2 70/85] USB: cp210x: always disable uart on close

2013-03-14 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 v2 61/85] USB: spcp8x5: clean up code

2013-03-14 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 v2 15/85] USB: keyspan: remove bogus disconnect test in close

2013-03-14 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 v2 50/85] USB: mct_u232: switch to generic TIOCMIWAIT implementation

2013-03-14 Thread Johan Hovold
Switch to the generic TIOCMIWAIT implementation. Signed-off-by: Johan Hovold --- drivers/usb/serial/mct_u232.c | 60 ++- 1 file changed, 2 insertions(+), 58 deletions(-) diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c index

[PATCH v2 41/85] USB: ark3116: switch to generic TIOCMIWAIT implementation

2013-03-14 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 v2 83/85] USB: garmin_gps: remove bogus disconnect test in bulk callback

2013-03-14 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 v2 47/85] USB: io_ti: switch to generic get_icount implementation

2013-03-14 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 v2 12/85] USB: cyberjack: remove bogus disconnect test in close

2013-03-14 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 v2 51/85] USB: mos7720: remove broken get_icount and TIOCMIWAIT

2013-03-14 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 v2 73/85] USB: kl5kusb105: always disable uart on close

2013-03-14 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 v2 84/85] USB: iuu_phoenix: remove bogus disconnect test in close

2013-03-14 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 v2 62/85] USB: spcp8x5: pass usb-serial port to control functions

2013-03-14 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 v2 68/85] USB: ti_usb_3410_5052: switch to generic get_icount implementation

2013-03-14 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 v2 54/85] USB: mos7840: switch to generic TIOCMIWAIT implementation

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

[PATCH v2 75/85] USB: mos7720: always disable uart on close

2013-03-14 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 v2 21/85] USB: serial: remove bogus disconnect test in cleanup

2013-03-14 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 v2 32/85] USB: serial: use urb poison to reliably kill traffic

2013-03-14 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 v2 31/85] USB: fix urb-poison imbalance

2013-03-14 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. Cc: Alan Stern Acked-by: Alan Stern Signed-off-by: Johan Hovold --- drivers/usb/core/urb.c | 5 - 1 file changed, 4 insertions

[PATCH v2 33/85] USB: serial: clean up usb-serial bus device removal

2013-03-14 Thread Johan Hovold
also after the device has been unregistered. This is handled in usb-serial core using the disconnected flag, which is already set when usb-serial bus device remove is called. Cc: Peter Hurley Reported-by: Peter Hurley Signed-off-by: Johan Hovold --- drivers/usb/serial/bus.c | 5 +++-- 1 file

[PATCH v2 44/85] USB: f81232: add custom tiocmiwait operation

2013-03-14 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 v2 37/85] USB: ftdi_sio: use port icount

2013-03-14 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 v2 20/85] USB: usb_wwan: remove bogus disconnect test in close

2013-03-14 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/usb_wwan.c | 25 - 1 file changed, 12 inserti

[PATCH v2 29/85] USB: serial: fix port release

2013-03-14 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 v2 82/85] USB: garmin_gps: remove bogus disconnect test in close

2013-03-14 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 v2 38/85] USB: ftio_sio: switch to generic TIOCMIWAIT implementation

2013-03-14 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/ftdi_sio.c | 39 ++- 1 file changed, 2 insertions(+), 37 deletions

[PATCH v2 05/85] USB: pl2303: make set_control_lines a port operation

2013-03-14 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 v2 30/85] USB: serial: rename port release

2013-03-14 Thread Johan Hovold
Rename port_release so that all usb_serial_port functions have a common prefix. Signed-off-by: Johan Hovold --- drivers/usb/serial/usb-serial.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 2c32f84

[PATCH v2 81/85] USB: visor: always disable uart on close

2013-03-14 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 v2 18/85] USB: mos7840: remove bogus disconnect test in close

2013-03-14 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 v2 09/85] USB: serial: remove redundant allocation error messages

2013-03-14 Thread Johan Hovold
Failed allocations already get an OOM message and a stack dump. Signed-off-by: Johan Hovold --- drivers/usb/serial/usb-serial.c | 37 + 1 file changed, 9 insertions(+), 28 deletions(-) diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb

[PATCH v2 49/85] USB: mct_u232: switch to generic get_icount implementation

2013-03-14 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 v2 66/85] USB: ssu100: switch to generic get_icount implementation

2013-03-14 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 v2 28/85] USB: cyberjack: fix disconnect handling

2013-03-14 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 v2 25/85] USB: serial: remove generic disconnect callback

2013-03-14 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 v2 72/85] USB: io_ti: always disable uart on close

2013-03-14 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

Re: [PATCH v2 33/85] USB: serial: clean up usb-serial bus device removal

2013-03-14 Thread Johan Hovold
On Thu, Mar 14, 2013 at 01:39:39PM -0400, Peter Hurley wrote: > On Thu, 2013-03-14 at 16:23 +0100, Johan Hovold wrote: > > Make sure to unregister the tty-device before calling subdriver > > port_remove. > > > > This way remove will reverse probe, and specifically an

Re: [PATCH v2 73/85] USB: kl5kusb105: always disable uart on close

2013-03-14 Thread Johan Hovold
On Thu, Mar 14, 2013 at 10:30:02PM +0400, Sergei Shtylyov wrote: > Hello. > > On 14-03-2013 19:24, Johan Hovold wrote: > > > Always try to disable the uart on close. > > > Since the switch to tty ports, close will be called as part of shutdown > > before disc

Re: [PATCH v3 2/7] USB: serial: comments on suspend failure

2013-03-15 Thread Johan Hovold
0 in system sleep context. > > Cc: Johan Hovold > Signed-off-by: Ming Lei > --- > drivers/usb/serial/usb-serial.c |5 + > 1 file changed, 5 insertions(+) > > diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c > index a19ed74..

Re: [PATCH v3 3/6] TTY: fix DTR being raised on hang up

2013-03-15 Thread Johan Hovold
On Wed, Mar 13, 2013 at 03:43:43PM -0400, Peter Hurley wrote: > On Thu, 2013-03-07 at 15:55 +0100, Johan Hovold wrote: > > Make sure to check ASYNC_INITIALISED before raising DTR when waking up > > from blocked open in tty_port_block_til_ready. > > > > Currently DTR cou

Re: [PATCH v3 0/6] TTY: port hangup and close fixes

2013-03-15 Thread Johan Hovold
On Wed, Mar 13, 2013 at 03:50:32PM -0400, Peter Hurley wrote: > On Thu, 2013-03-07 at 15:55 +0100, Johan Hovold wrote: > > These patches against 3.9-rc1 fix a few issues with tty-port hangup and > > close. > > > > The first and fifth patch are essentially clean ups. &g

Re: [PATCH v3 3/6] TTY: fix DTR being raised on hang up

2013-03-15 Thread Johan Hovold
On Fri, Mar 15, 2013 at 07:03:08AM -0400, Peter Hurley wrote: > On Fri, 2013-03-15 at 10:24 +0100, Johan Hovold wrote: > > On Wed, Mar 13, 2013 at 03:43:43PM -0400, Peter Hurley wrote: > > > On Thu, 2013-03-07 at 15:55 +0100, Johan Hovold wrote: > > > > Make sure to

Re: [PATCH v2 33/85] USB: serial: clean up usb-serial bus device removal

2013-03-15 Thread Johan Hovold
On Fri, Mar 15, 2013 at 08:02:45AM -0400, Peter Hurley wrote: > On Thu, 2013-03-14 at 19:30 +0100, Johan Hovold wrote: > > On Thu, Mar 14, 2013 at 01:39:39PM -0400, Peter Hurley wrote: > > > On Thu, 2013-03-14 at 16:23 +0100, Johan Hovold wrote: > > > > Make sur

Re: [PATCH 2/5] USB: ftdi_sio: fix use after free in TIOCMIWAIT

2013-03-15 Thread Johan Hovold
On Wed, Feb 27, 2013 at 01:52:27PM +0100, Johan Hovold wrote: > Make sure to check the serial disconnected flag before accessing port > private data after waking up. > > This fixes a use after free in the ftdi_sio introduced by commit > 876ae50d94b ("USB: ftdi_sio: f

Re: [PATCH 2/5] USB: ftdi_sio: fix use after free in TIOCMIWAIT

2013-03-15 Thread Johan Hovold
On Fri, Mar 15, 2013 at 12:04:34PM -0700, Greg KH wrote: > On Fri, Mar 15, 2013 at 06:16:07PM +0100, Johan Hovold wrote: > > On Wed, Feb 27, 2013 at 01:52:27PM +0100, Johan Hovold wrote: > > > Make sure to check the serial disconnected flag before accessing port > > > p

Re: [PATCH v3 0/6] TTY: port hangup and close fixes

2013-03-15 Thread Johan Hovold
On Fri, Mar 15, 2013 at 12:05:58PM -0700, Greg KH wrote: > On Thu, Mar 07, 2013 at 03:55:47PM +0100, Johan Hovold wrote: > > These patches against 3.9-rc1 fix a few issues with tty-port hangup and > > close. > > Are these for 3.9-final? I'd say it can wait for 3.10

[PATCH 00/21] USB: fixes for 3.9-final

2013-03-19 Thread Johan Hovold
a may be gone when waking up after a disconnect. I decided to fix the use-after-free separately from the issue of processes not waking up at disconnect, which I'm holding back until 3.10. Thanks, Johan Johan Hovold (21): USB: cdc-acm: fix device unregistration USB: garmin_gps: fix memo

[PATCH 19/21] USB: spcp8x5: fix use-after-free in TIOCMIWAIT

2013-03-19 Thread Johan Hovold
Use the port wait queue and make sure to check the serial disconnected flag before accessing private port data after waking up. This is is needed as the private port data (including the wait queue itself) can be gone when waking up after a disconnect. Cc: stable Signed-off-by: Johan Hovold

[PATCH 14/21] USB: mos7840: fix broken TIOCMIWAIT

2013-03-19 Thread Johan Hovold
Make sure waiting processes are woken on modem-status changes. Currently processes are only woken on termios changes regardless of whether the modem status has changed. Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/mos7840.c | 5 +++-- 1 file changed, 3 insertions(+), 2

[PATCH 01/21] USB: cdc-acm: fix device unregistration

2013-03-19 Thread Johan Hovold
flag. Specifically, further opens must be prevented and this is already implemented. Cc: stable Cc: Oliver Neukum Acked-by: Oliver Neukum 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

[PATCH 03/21] USB: io_ti: fix get_icount for two port adapters

2013-03-19 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 07/21] USB: ch341: fix use-after-free in TIOCMIWAIT

2013-03-19 Thread Johan Hovold
Use the port wait queue and make sure to check the serial disconnected flag before accessing private port data after waking up. This is is needed as the private port data (including the wait queue itself) can be gone when waking up after a disconnect. Cc: stable Signed-off-by: Johan Hovold

[PATCH 12/21] USB: io_ti: fix use-after-free in TIOCMIWAIT

2013-03-19 Thread Johan Hovold
Use the port wait queue and make sure to check the serial disconnected flag before accessing private port data after waking up. This is is needed as the private port data (including the wait queue itself) can be gone when waking up after a disconnect. Cc: stable Signed-off-by: Johan Hovold

[PATCH 05/21] USB: serial: add modem-status-change wait queue

2013-03-19 Thread Johan Hovold
e tty-port one as we do not want to get woken up at hangup (yet). Cc: stable Signed-off-by: Johan Hovold --- include/linux/usb/serial.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index ef9be7e..1819b59 100644 --- a/include/linu

[PATCH 09/21] USB: f81232: fix use-after-free in TIOCMIWAIT

2013-03-19 Thread Johan Hovold
Use the port wait queue and make sure to check the serial disconnected flag before accessing private port data after waking up. This is is needed as the private port data (including the wait queue itself) can be gone when waking up after a disconnect. Cc: stable Signed-off-by: Johan Hovold

[PATCH 02/21] USB: garmin_gps: fix memory leak on disconnect

2013-03-19 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 16/21] USB: oti6858: fix use-after-free in TIOCMIWAIT

2013-03-19 Thread Johan Hovold
Use the port wait queue and make sure to check the serial disconnected flag before accessing private port data after waking up. This is is needed as the private port data (including the wait queue itself) can be gone when waking up after a disconnect. Cc: stable Signed-off-by: Johan Hovold

[PATCH 08/21] USB: cypress_m8: fix use-after-free in TIOCMIWAIT

2013-03-19 Thread Johan Hovold
pointer being NULL as it is never assigned in the loop. Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/cypress_m8.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index 8efa19d

[PATCH 06/21] USB: ark3116: fix use-after-free in TIOCMIWAIT

2013-03-19 Thread Johan Hovold
Use the port wait queue and make sure to check the serial disconnected flag before accessing private port data after waking up. This is is needed as the private port data (including the wait queue itself) can be gone when waking up after a disconnect. Cc: stable Signed-off-by: Johan Hovold

[PATCH 04/21] USB: serial: fix interface refcounting

2013-03-19 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 21/21] USB: ti_usb_3410_5052: fix use-after-free in TIOCMIWAIT

2013-03-19 Thread Johan Hovold
Use the port wait queue and make sure to check the serial disconnected flag before accessing private port data after waking up. This is is needed as the private port data (including the wait queue itself) can be gone when waking up after a disconnect. Cc: stable Signed-off-by: Johan Hovold

[PATCH 18/21] USB: quatech2: fix use-after-free in TIOCMIWAIT

2013-03-19 Thread Johan Hovold
Use the port wait queue and make sure to check the serial disconnected flag before accessing private port data after waking up. This is is needed as the private port data (including the wait queue itself) can be gone when waking up after a disconnect. Cc: stable Signed-off-by: Johan Hovold

[PATCH 10/21] USB: ftdi_sio: fix use-after-free in TIOCMIWAIT

2013-03-19 Thread Johan Hovold
cannot be relied on to detect disconnects when woken up. Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/ftdi_sio.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index edd162d

[PATCH 13/21] USB: mct_u232: fix use-after-free in TIOCMIWAIT

2013-03-19 Thread Johan Hovold
Use the port wait queue and make sure to check the serial disconnected flag before accessing private port data after waking up. This is is needed as the private port data (including the wait queue itself) can be gone when waking up after a disconnect. Cc: stable Signed-off-by: Johan Hovold

[PATCH 17/21] USB: pl2303: fix use-after-free in TIOCMIWAIT

2013-03-19 Thread Johan Hovold
Use the port wait queue and make sure to check the serial disconnected flag before accessing private port data after waking up. This is is needed as the private port data (including the wait queue itself) can be gone when waking up after a disconnect. Cc: stable Signed-off-by: Johan Hovold

[PATCH 11/21] USB: io_edgeport: fix use-after-free in TIOCMIWAIT

2013-03-19 Thread Johan Hovold
Use the port wait queue and make sure to check the serial disconnected flag before accessing private port data after waking up. This is is needed as the private port data (including the wait queue itself) can be gone when waking up after a disconnect. Cc: stable Signed-off-by: Johan Hovold

[PATCH 15/21] USB: mos7840: fix use-after-free in TIOCMIWAIT

2013-03-19 Thread Johan Hovold
Use the port wait queue and make sure to check the serial disconnected flag before accessing private port data after waking up. This is is needed as the private port data (including the wait queue itself) can be gone when waking up after a disconnect. Cc: stable Signed-off-by: Johan Hovold

[PATCH 20/21] USB: ssu100: fix use-after-free in TIOCMIWAIT

2013-03-19 Thread Johan Hovold
Use the port wait queue and make sure to check the serial disconnected flag before accessing private port data after waking up. This is is needed as the private port data (including the wait queue itself) can be gone when waking up after a disconnect. Cc: stable Signed-off-by: Johan Hovold

Re: What driver for generic bulk to tty?

2013-03-20 Thread Johan Hovold
On Wed, Mar 20, 2013 at 11:04:14AM -0400, Alan Stern wrote: > On Wed, 20 Mar 2013, Sergei Organov wrote: > > > > > >> What is recomended driver to use for a USB device that provides just > > >> 2 bulk end-points, in and out, to create a TTY to talk to it? Exact > > >> data formats that are used a

Re: What driver for generic bulk to tty?

2013-03-20 Thread Johan Hovold
On Wed, Mar 20, 2013 at 4:13 PM, Johan Hovold wrote: > The reason why one shouldn't use the generic driver for a "real" > usb-serial device is that you cannot control baudrates, etc, and of > course that the device-driver matching isn't automatic. > > For

Re: What driver for generic bulk to tty?

2013-03-20 Thread Johan Hovold
Please make sure to keep all parties CCed in your replies. On Wed, Mar 20, 2013 at 07:18:16PM +0400, Sergei Organov wrote: > Alan Stern > writes: > > > On Wed, 20 Mar 2013, Sergei Organov wrote: > > > >> > >> >> What is recomended driver to use for a USB device that provides just > >> >> 2 bulk

Re: What driver for generic bulk to tty?

2013-03-20 Thread Johan Hovold
On Wed, Mar 20, 2013 at 10:31:04PM +0400, Sergei Organov wrote: > Johan Hovold writes: > > > Please make sure to keep all parties CCed in your replies. > > I've originally posted through gmane and continue to follow-up through > gmane. Is there something wrong w

Re: What driver for generic bulk to tty?

2013-03-20 Thread Johan Hovold
On Wed, Mar 20, 2013 at 10:42:50PM +0400, Sergei Organov wrote: > Johan Hovold writes: > [...] > > Just for the record, there's really nothing wrong with the usb-serial > > throughput. The days of a single read and write urb are long gone > > (2.6.32 if I remember c

[PATCH v3 07/94] USB: serial: remove redundant comments

2013-03-21 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 v3 05/94] USB: pl2303: make set_control_lines a port operation

2013-03-21 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 v3 00/94] USB: serial: disconnect-related patches for 3.10

2013-03-21 Thread Johan Hovold
tation of kl5kusb105-close patch v2: - rebase on c41b3810c09 and two previously posted series - expand usb-serial-bus-remove patch commit message - fix typo in visor patch (already posted once) Johan Hovold (94): USB: ftdi_sio: remove obsolete port data refcounting USB: kl5kusb105: remove unn

[PATCH v3 88/94] USB: pl2303: remove disconnect test from tiocmset

2013-03-21 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 v3 82/94] USB: kl5kusb105: always disable uart on close

2013-03-21 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 v3 84/94] USB: mos7720: always disable uart on close

2013-03-21 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 v3 06/94] USB: serial: rename tty-port callbacks

2013-03-21 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_port_shutdown to match the callback name. Signed-off-by: Johan Hovold --- drivers/usb/serial/usb-serial.c | 18 +- 1 file

[PATCH v3 81/94] USB: io_ti: always disable uart on close

2013-03-21 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 v3 83/94] USB: metro-usb: always disable uart on close

2013-03-21 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 v3 53/94] USB: io_ti: switch to generic TIOCMIWAIT implementation

2013-03-21 Thread Johan Hovold
Switch to the generic TIOCMIWAIT implementation which does not suffer from the races involved when using the deprecated sleep_on functions. This also fixes the issue with processes waiting for modem-status-changes not being woken up at disconnect. Signed-off-by: Johan Hovold --- drivers/usb

[PATCH v3 15/94] USB: keyspan: remove bogus disconnect test in close

2013-03-21 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 v3 03/94] USB: iuu_phoenix: remove unnecessary urb kill on close

2013-03-21 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/iuu_phoenix.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c index ff77027..a3bfcb3 100644 --- a

[PATCH v3 02/94] USB: kl5kusb105: remove unnecessary urb kill on close

2013-03-21 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 v3 04/94] USB: pl2303: use interface device for debug

2013-03-21 Thread Johan Hovold
Use interface rather than usb-serial device for debugging interface related operations. This gives more descriptive messages, such as [ 905.669436] pl2303 1-4.1:1.0: 0x40:0x1:0x8:0x0 0 rather than [ 341.943535] usb 1-4.1: 0x40:0x1:0x8:0x0 0 Signed-off-by: Johan Hovold --- drivers/usb

[PATCH v3 09/94] USB: serial: remove redundant allocation error messages

2013-03-21 Thread Johan Hovold
Failed allocations already get an OOM message and a stack dump. Signed-off-by: Johan Hovold --- drivers/usb/serial/usb-serial.c | 37 + 1 file changed, 9 insertions(+), 28 deletions(-) diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb

[PATCH v3 10/94] USB: serial: remove port number from generic-driver debug

2013-03-21 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/generic.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index

[PATCH v3 01/94] USB: ftdi_sio: remove obsolete port data refcounting

2013-03-21 Thread Johan Hovold
now called as part of tty port shutdown, which can occur before the final tty reference is dropped on device disconnect. This means that the private port data refcounting is now completely useless, as the last reference will always be dropped on port_remove. Signed-off-by: Johan Hovold

[PATCH v3 08/94] USB: serial: clean up debug info

2013-03-21 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 v3 34/94] USB: serial: add tiocmiwait subdriver operation

2013-03-21 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 v3 91/94] USB: garmin_gps: remove bogus disconnect test in close

2013-03-21 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

<    5   6   7   8   9   10   11   12   13   14   >