This is a resend of the remaining part of the USB-disconnect series
[ Greg, you said you could handle it. ;) ] rebased on Linus tree of
today (c41b3810c09) and the two since then broken-out series:
USB: fixes for 3.9-rc
USB: serial: fix TIOCMIWAIT and disconnect
Apart from a typo-fix in one patch and two updated commit message the
series is otherwise unchanged.
I retained Alan's ack on the urb-poison patch.
This series fixes a bunch of issues related to device disconnect. As
the diffstat shows:
35 files changed, 573 insertions(+), 1554 deletions(-)
a lot of boilerplate and broken code is removed in the process.
I've tried to group related patches and the empty lines in the patch
list below are supposed to indicate this.
The first set contains various clean-ups and minor fixes.
The second set removes legacy disconnect tests which are both broken and
unnecessary.
The third set cleans up disconnect handling in usb-serial core. It also
reimplements the stopping of I/O at disconnect and suspend using URB-
poisoning, which, it turns out, appears to have broken since first added
to USB core. The included fix is not marked for stable as the bug did
not affect any in-kernel drivers (until now).
The fourth set adds generic icount and TIOCMIWAIT support to usb-serial,
and replaces most current implementations with the generic one, thereby
fixing a bunch of races and other odd behaviour as well. Some drivers
with incomplete icount-support are simply moved over to use the new
tiocmiwait usb-serial operation, while TIOCMIWAIT is removed from the
two drivers which appeared to support the required interrupts but in
fact did not (copy-paste, I guess). I basically rewrote parts of spcp8x5
(and fixed its modem-status handling) in the process.
The fifth set gets rid of the no longer needed disconnect checks in
subdriver close and tiocmset callbacks. This can be done as the tty-port
implementation guarantees (and has for some time) that close is never
called after tty_vhangup returns (as long as we prevent new activations,
which we do). This has the added benefit of allowing us to do clean
shutdowns and put devices in any low-power modes also on driver unbind.
The sixth set removes another unnecessary and broken legacy disconnect
test from two drivers.
The final patch updates some copyright information.
All patches have been compile tested, while the usb-serial, ftdi_sio and
pl2303 ones have been tested on actual hardware.
Johan
v2:
- rebase on c41b3810c09 and two previously posted series
- fix typo in one commit message
- expand usb-serial-bus-remove patch commit message
- fix typo in visor patch (already posted once)
Johan Hovold (85):
USB: ftdi_sio: remove obsolete port data refcounting
USB: kl5kusb105: remove unnecessary urb kill on close
USB: iuu_phoenix: remove unnecessary urb kill on close
USB: pl2303: use interface device for debug
USB: pl2303: make set_control_lines a port operation
USB: serial: rename tty-port callbacks
USB: serial: remove redundant comments
USB: serial: clean up debug info
USB: serial: remove redundant allocation error messages
USB: serial: remove port number from generic-driver debug
USB: ark3116: remove bogus disconnect test in close
USB: cyberjack: remove bogus disconnect test in close
USB: digi_acceleport: remove bogus disconnect test in close
USB: iuu_phoenix: remove bogus disconnect test in close
USB: keyspan: remove bogus disconnect test in close
USB: keyspan_pda: remove bogus disconnect test from dtr_rts
USB: keyspan_pda: remove bogus disconnect test in close
USB: mos7840: remove bogus disconnect test in close
USB: sierra: remove bogus disconnect test in close
USB: usb_wwan: remove bogus disconnect test in close
USB: serial: remove bogus disconnect test in cleanup
USB: ssu100: remove explicit initialisation of disconnect
USB: ssu100: remove custom close operation
USB: serial: fix generic disconnect implementation
USB: serial: remove generic disconnect callback
USB: serial: remove generic release callback
USB: serial: clean up generic-operation handling
USB: cyberjack: fix disconnect handling
USB: serial: fix port release
USB: serial: rename port release
USB: fix urb-poison imbalance
USB: serial: use urb poison to reliably kill traffic
USB: serial: clean up usb-serial bus device removal
USB: serial: add tiocmiwait subdriver operation
USB: serial: add generic TIOCMIWAIT implementation
USB: serial: add generic get_icount implementation
USB: ftdi_sio: use port icount
USB: ftio_sio: switch to generic TIOCMIWAIT implementation
USB: ftdi_sio: switch to generic get_icount implementation
USB: ark3116: switch to generic get_icount implementation
USB: ark3116: switch to generic TIOCMIWAIT implementation
USB: ch341: replace custom ioctl operation with tiocmiwait
USB: cypress_m8: replace custom ioctl operation with tiocmiwait
USB: f81232: add custom tiocmiwait operation
USB: io_edgeport: switch to generic get_icount implementation
USB: io_edgeport: switch to generic TIOCMIWAIT implementation
USB: io_ti: switch to generic get_icount implementation
USB: io_ti: switch to generic TIOCMIWAIT implementation
USB: mct_u232: switch to generic get_icount implementation
USB: mct_u232: switch to generic TIOCMIWAIT implementation
USB: mos7720: remove broken get_icount and TIOCMIWAIT
USB: mos7840: remove smp barriers from icount handling
USB: mos7840: switch to generic get_icount implementation
USB: mos7840: switch to generic TIOCMIWAIT implementation
USB: oti6858: replace custom ioctl operation with tiocmiwait
USB: pl2303: add custom tiocmiwait operation
USB: quatech2: switch to generic get_icount implementation
USB: quatech2: switch to generic TIOCMIWAIT implementation
USB: spcp8x5: remove broken TIOCMIWAIT support
USB: spcp8x5: remove broken uart-error handling
USB: spcp8x5: clean up code
USB: spcp8x5: pass usb-serial port to control functions
USB: spcp8x5: clean up modem status retrieval
USB: spcp8x5: reimplement device type detection
USB: spcp8x5: add proper modem-status support
USB: ssu100: switch to generic get_icount implementation
USB: ssu100: switch to generic TIOCMIWAIT implementation
USB: ti_usb_3410_5052: switch to generic get_icount implementation
USB: ti_usb_3410_5052: switch to generic TIOCMIWAIT implementation
USB: cp210x: always disable uart on close
USB: cypress_m8: remove bogus disconnect test from close
USB: io_ti: always disable uart on close
USB: kl5kusb105: always disable uart on close
USB: metro-usb: always disable uart on close
USB: mos7720: always disable uart on close
USB: opticon: fix return value of tiocmset
USB: opticon: remove disconnect test from tiocmset
USB: pl2303: fix return value of tiocmset
USB: pl2303: remove disconnect test from tiocmset
USB: quatech2: always disable uart on close
USB: visor: always disable uart on close
USB: garmin_gps: remove bogus disconnect test in close
USB: garmin_gps: remove bogus disconnect test in bulk callback
USB: iuu_phoenix: remove bogus disconnect test in close
USB: serial: update copyright information
drivers/usb/core/urb.c | 5 +-
drivers/usb/serial/ark3116.c | 86 ++--------
drivers/usb/serial/bus.c | 5 +-
drivers/usb/serial/ch341.c | 25 +--
drivers/usb/serial/cp210x.c | 6 +-
drivers/usb/serial/cyberjack.c | 19 +--
drivers/usb/serial/cypress_m8.c | 88 ++++------
drivers/usb/serial/digi_acceleport.c | 92 +++++-----
drivers/usb/serial/f81232.c | 9 +-
drivers/usb/serial/ftdi_sio.c | 123 ++------------
drivers/usb/serial/garmin_gps.c | 10 --
drivers/usb/serial/generic.c | 131 ++++++++++-----
drivers/usb/serial/io_edgeport.c | 77 +--------
drivers/usb/serial/io_tables.h | 12 +-
drivers/usb/serial/io_ti.c | 88 ++--------
drivers/usb/serial/iuu_phoenix.c | 19 +--
drivers/usb/serial/keyspan.c | 26 +--
drivers/usb/serial/keyspan_pda.c | 19 +--
drivers/usb/serial/kl5kusb105.c | 16 +-
drivers/usb/serial/mct_u232.c | 96 +----------
drivers/usb/serial/metro-usb.c | 5 +-
drivers/usb/serial/mos7720.c | 68 +-------
drivers/usb/serial/mos7840.c | 155 +++--------------
drivers/usb/serial/opticon.c | 18 +-
drivers/usb/serial/oti6858.c | 26 +--
drivers/usb/serial/pl2303.c | 33 ++--
drivers/usb/serial/quatech2.c | 94 +----------
drivers/usb/serial/sierra.c | 39 ++---
drivers/usb/serial/spcp8x5.c | 304 ++++++++--------------------------
drivers/usb/serial/ssu100.c | 97 ++---------
drivers/usb/serial/ti_usb_3410_5052.c | 70 +-------
drivers/usb/serial/usb-serial.c | 213 ++++++++++++------------
drivers/usb/serial/usb_wwan.c | 25 ++-
drivers/usb/serial/visor.c | 16 +-
include/linux/usb/serial.h | 12 +-
35 files changed, 573 insertions(+), 1554 deletions(-)
--
1.8.1.5
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html