[ 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
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
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
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
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
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
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
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
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
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
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
&
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
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
> >
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
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
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
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
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
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
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/
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
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/
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
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/
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
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
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
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
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
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 |
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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(+),
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
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
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
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
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(+)
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
701 - 800 of 3156 matches
Mail list logo