summaryrefslogtreecommitdiff
path: root/include/linux/usb/serial.h
AgeCommit message (Collapse)Author
2021-06-24Merge tag 'usb-serial-5.14-rc1' of ↵Greg Kroah-Hartman
https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for 5.14-rc1 Here are the USB-serial updates for 5.14-rc1, including: - gpio support for CP2108 - chars_in_buffer and write_room return-value updates - chars_in_buffer and write_room clean ups Included are also various clean ups. All have been in linux-next with no reported issues. * tag 'usb-serial-5.14-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: cp210x: add support for GPIOs on CP2108 USB: serial: drop irq-flags initialisations USB: serial: mos7840: drop buffer-callback return-value comments USB: serial: mos7720: drop buffer-callback sanity checks USB: serial: io_edgeport: drop buffer-callback sanity checks USB: serial: digi_acceleport: add chars_in_buffer locking USB: serial: digi_acceleport: reduce chars_in_buffer over-reporting USB: serial: make usb_serial_driver::chars_in_buffer return uint USB: serial: make usb_serial_driver::write_room return uint
2021-05-21usb: fix spelling mistakes in header filesZhen Lei
Fix some spelling mistakes in comments: trasfer ==> transfer consumtion ==> consumption endoint ==> endpoint sharable ==> shareable contraints ==> constraints Auxilary ==> Auxiliary correspondig ==> corresponding interupt ==> interrupt inifinite ==> infinite assignement ==> assignment Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Link: https://lore.kernel.org/r/20210517094020.7310-1-thunder.leizhen@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-19USB: serial: make usb_serial_driver::chars_in_buffer return uintJiri Slaby
tty_operations::chars_in_buffer is being switched to return uint. Do the same for usb_serial_driver's chars_in_buffer. Signed-off-by: Jiri Slaby <jslaby@suse.cz> [ johan: amend commit message ] Signed-off-by: Johan Hovold <johan@kernel.org>
2021-05-19USB: serial: make usb_serial_driver::write_room return uintJiri Slaby
Line disciplines expect a positive value or zero returned from tty->ops->write_room (invoked by tty_write_room). Both of them are being updated to return an unsigned int. Switch also usb_serial_driver::write_room and all its users. Signed-off-by: Jiri Slaby <jslaby@suse.cz> [ johan: amend commit message, drop unrelated comment change ] Signed-off-by: Johan Hovold <johan@kernel.org>
2021-04-08USB: serial: add generic support for TIOCSSERIALJohan Hovold
TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. The closing_wait parameter determines how long to wait for the transfer buffers to drain during close and the default timeout of 30 seconds may not be sufficient at low line speeds. In other cases, when for example flow is stopped, the default timeout may instead be too long. Add generic support for TIOCSSERIAL and TIOCGSERIAL with handling of the three common parameters close_delay, closing_wait and line for the benefit of all USB serial drivers while still allowing drivers to implement further functionality through the existing callbacks. This currently includes a few drivers that report their base baud clock rate even if that is really only of interest when setting custom divisors through the deprecated ASYNC_SPD_CUST interface; an interface which only the FTDI driver actually implements. Some drivers have also been reporting back a fake UART type, something which should no longer be needed and will be dropped by a follow-on patch. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
2021-04-01USB: serial: add support for multi-interface functionsJohan Hovold
A single USB function can be implemented using a group of interfaces and this is for example commonly used for Communication Class devices. Add support for multi-interface functions to USB serial core and export an interface that allows drivers to claim a second sibling interface. The interface could easily be extended to allow claiming further interfaces if ever needed. When a driver claims a sibling interface in probe(), core allocates resources for any bulk in, bulk out, interrupt in and interrupt out endpoints found also on the sibling interface. Disconnect is implemented so that unbinding either interface will release the other interface while disconnect() is called precisely once. Similarly, suspend() is called when the first sibling interface is suspended and resume() is called when the last sibling interface is resumed by USB core. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
2021-04-01USB: serial: drop unused suspending flagJohan Hovold
The suspending flag was added back in 2009 but no users ever followed. Remove it. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
2021-02-09USB: serial: make remove callback return voidUwe Kleine-König
All usb_serial drivers return 0 in their remove callbacks and driver core ignores the value returned by usb_serial_device_remove(). So change the remove callback to return void and return 0 unconditionally in usb_serial_device_remove(). Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> Link: https://lore.kernel.org/r/20210208143149.963644-2-uwe@kleine-koenig.org Signed-off-by: Johan Hovold <johan@kernel.org>
2020-11-04USB: serial: remove write wait queueJohan Hovold
The digi_acceleport driver is the only driver still using the port write wake queue so move it to that driver's port data. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
2020-07-28Merge tag 'usb-serial-5.9-rc1' of ↵Greg Kroah-Hartman
https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for 5.9-rc1 Here are the USB-serial updates for 5.9-rc1, including: - console flow-control support - simulated line-breaks on some ch341 - hardware flow-control fixes for cp210x - break-detection and sysrq fixes for ftdi_sio - sysrq optimisations - input parity checking for cp210x Included are also some new device ids and various clean ups. All have been in linux-next with no reported issues. * tag 'usb-serial-5.9-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: (31 commits) USB: serial: qcserial: add EM7305 QDL product ID USB: serial: iuu_phoenix: fix led-activity helpers USB: serial: sierra: clean up special-interface handling USB: serial: cp210x: use in-kernel types in port data USB: serial: cp210x: drop unnecessary packed attributes USB: serial: cp210x: add support for TIOCGICOUNT USB: serial: cp210x: add support for line-status events USB: serial: cp210x: disable interface on errors in open USB: serial: drop redundant transfer-buffer casts USB: serial: drop extern keyword from function declarations USB: serial: drop unnecessary sysrq include USB: serial: add sysrq break-handler dummy USB: serial: inline sysrq dummy function USB: serial: only process sysrq when enabled USB: serial: only set sysrq timestamp for consoles USB: serial: ftdi_sio: fix break and sysrq handling USB: serial: ftdi_sio: clean up receive processing USB: serial: ftdi_sio: make process-packet buffer unsigned USB: serial: use fallthrough pseudo-keyword USB: serial: ch341: fix missing simulated-break margin ...
2020-07-15usb: linux/usb/serial.h: drop duplicated word in commentRandy Dunlap
Drop the doubled word "set" in a comment. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Link: https://lore.kernel.org/r/20200715045701.22949-4-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-09USB: serial: drop extern keyword from function declarationsJohan Hovold
Drop the redundant extern keyword from function declarations in the subsystem header file to improve readability (and make it easier to spot the global variables). Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
2020-07-09USB: serial: drop unnecessary sysrq includeJohan Hovold
There's no need to include sysrq.h in the subsystem header. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
2020-07-09USB: serial: add sysrq break-handler dummyJohan Hovold
Add inline sysrq break-handler dummy to allow the compiler to eliminate further code when either console or sysrq support isn't enabled and to clearly mark the two sysrq functions as belonging together. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
2020-07-09USB: serial: inline sysrq dummy functionJohan Hovold
Inline the dummy sysrq character handling when either console support or magic-sysrq support isn't enabled to allow the compiler to eliminate unused code. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
2019-04-30USB: serial: drop unused iflag macroJohan Hovold
Drop the RELEVANT_IFLAG() macro which essentially hasn't been used for over a decade except in some remnant debug printks that were recently removed. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
2019-04-30USB: serial: clean up throttle handlingJohan Hovold
Clean up the throttle implementation by dropping the redundant throttle_req flag which was a remnant from back when there was only a single read URB. Also convert the throttled flag to an atomic bit flag. Signed-off-by: Johan Hovold <johan@kernel.org>
2018-10-13usb-serial: begin switching to ->[sg]et_serial()Al Viro
add such methods for usb_serial_driver, provide tty_operations ->[sg]et_serial() calling those. For now the lack of methods in driver means ENOIOCTLCMD from usb-serial ->[sg]et_serial(), making tty_ioctl() fall back to calling ->ioctl(). Once all drivers are converted, we'll be returning -ENOTTY instead, completing the switchover. Reviewed-by: Johan Hovold <johan@kernel.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2017-11-04USB: add SPDX identifiers to all remaining files in drivers/usb/Greg Kroah-Hartman
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/usb/ and include/linux/usb* files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Acked-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-28USB: serial: add calc_num_ports callback to generic driverJohan Hovold
Add a calc_num_ports callback to the generic driver and verify that the device has the required endpoints there instead of in core. Note that the generic driver num_ports field was never used. Signed-off-by: Johan Hovold <johan@kernel.org>
2017-03-28USB: serial: allow subdrivers to modify port-endpoint mappingJohan Hovold
Allow subdrivers to modify the port-endpoint mapping by passing the endpoint descriptors to calc_num_ports. The callback can now also be used to verify that the required endpoints exists and abort probing otherwise. This will allow us to get rid of a few hacks in subdrivers that are already modifying the port-endpoint mapping (or aborting probe due to missing endpoints), but only after the port structures have been setup. Signed-off-by: Johan Hovold <johan@kernel.org>
2017-03-16USB: serial: add endpoint sanity check to coreJohan Hovold
Allow drivers to specify a minimum number of endpoints per type, which USB serial core will verify after subdriver probe has returned (where the current alternate setting may have been changed). Signed-off-by: Johan Hovold <johan@kernel.org>
2017-03-16USB: serial: allow up to 16 ports per deviceJohan Hovold
Raise the arbitrary limit of how many ports a single device can claim from eight to 16. This specifically enables the upper eight ports of some mxuport devices. Signed-off-by: Johan Hovold <johan@kernel.org>
2017-03-16USB: serial: clean up endpoint and port-counter typesJohan Hovold
Use unsigned-char type for the endpoint and port counters. Signed-off-by: Johan Hovold <johan@kernel.org>
2015-02-26Revert "USB: serial: make bulk_out_size a lower limit"Johan Hovold
This reverts commit 5083fd7bdfe6760577235a724cf6dccae13652c2. A bulk-out size smaller than the end-point size is indeed valid. The offending commit broke the usb-debug driver for EHCI debug devices, which use 8-byte buffers. Fixes: 5083fd7bdfe6 ("USB: serial: make bulk_out_size a lower limit") Reported-by: "Li, Elvin" <elvin.li@intel.com> Cc: stable <stable@vger.kernel.org> # v3.15 Signed-off-by: Johan Hovold <johan@kernel.org>
2014-03-12USB: serial: make bulk_out_size a lower limitJohan Hovold
Drivers are allowed to override the default bulk-out buffer size (endpoint maximum packet size) in order to increase throughput, but it does not make much sense to allow buffers smaller than the default. Note that this is already how bulk_in_size is defined. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2013-10-11USB: serial: export usb_serial_generic_write_startJohan Hovold
Export usb_serial_generic_write_start which is needed when implementing a custom resume function while still relying on the generic write implementation. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17USB: serial: increase the number of devices we supportGreg Kroah-Hartman
We had the limit of 255 USB to serial devices on one system for almost 15 years, with no complaints. But now it's time to move on from these tiny "baby" systems, and bump the number up to 512, which should last us a few more years: "512 is a nice number" -- Tobias Winter Note, this is still a static value, and uses up tty core memory with this many tty devices allocated. Converting the driver to use TTY_DRIVER_DYNAMIC_DEV is the next thing to do in order to remove this limitation. Reported-by: Tobias Winter <tobias@linuxdingsda.de> Tested-by: Tobias Winter <tobias@linuxdingsda.de> Reviewed-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17USB: serial: make minor allocation dynamicGreg Kroah-Hartman
This moves the allocation of minor device numbers from a static array to be dynamic, using the idr interface. This means that you could potentially get "gaps" in a minor number range for a single USB serial device with multiple ports, but all should still work properly. We remove the 'minor' field from the usb_serial structure, as it no longer makes any sense for it (use the field in the usb_serial_port structure if you really want to know this number), and take the fact that we were overloading a number in this field to determine if we had initialized the minor numbers or not, and just use a flag variable instead. Note, we still have the limitation of 255 USB to serial devices in the system, as that is all we are registering with the TTY layer at this point in time. Tested-by: Tobias Winter <tobias@linuxdingsda.de> Reviewed-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-10USB: serial: ports: add minor and port numberGreg Kroah-Hartman
The usb_serial_port structure had the number field, which was the minor number for the port, which almost no one really cared about. They really wanted the number of the port within the device, which you had to subtract from the minor of the parent usb_serial_device structure. To clean this up, provide the real minor number of the port, and the number of the port within the serial device separately, as these numbers might not be related in the future. Bonus is that this cleans up a lot of logic in the drivers, and saves lines overall. Tested-by: Tobias Winter <tobias@linuxdingsda.de> Reviewed-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -- drivers/staging/serqt_usb2/serqt_usb2.c | 21 +++-------- drivers/usb/serial/ark3116.c | 2 - drivers/usb/serial/bus.c | 6 +-- drivers/usb/serial/console.c | 2 - drivers/usb/serial/cp210x.c | 2 - drivers/usb/serial/cypress_m8.c | 4 +- drivers/usb/serial/digi_acceleport.c | 6 --- drivers/usb/serial/f81232.c | 5 +- drivers/usb/serial/garmin_gps.c | 6 +-- drivers/usb/serial/io_edgeport.c | 58 ++++++++++++-------------------- drivers/usb/serial/io_ti.c | 21 ++++------- drivers/usb/serial/keyspan.c | 29 +++++++--------- drivers/usb/serial/metro-usb.c | 4 +- drivers/usb/serial/mos7720.c | 37 +++++++++----------- drivers/usb/serial/mos7840.c | 52 +++++++++------------------- drivers/usb/serial/opticon.c | 2 - drivers/usb/serial/pl2303.c | 2 - drivers/usb/serial/quatech2.c | 7 +-- drivers/usb/serial/sierra.c | 2 - drivers/usb/serial/ti_usb_3410_5052.c | 10 ++--- drivers/usb/serial/usb-serial.c | 7 ++- drivers/usb/serial/usb_wwan.c | 2 - drivers/usb/serial/whiteheat.c | 20 +++++------ include/linux/usb/serial.h | 6 ++- 24 files changed, 133 insertions(+), 180 deletions(-)
2013-05-16USB: serial: add generic wait_until_sent implementationJohan Hovold
Add generic wait_until_sent implementation which polls for empty hardware buffers using the new port-operation tx_empty. The generic implementation will be used for all sub-drivers that implement tx_empty but does not define wait_until_sent. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16USB: serial: add wait_until_sent operationJohan Hovold
Add wait_until_sent operation which can be used to wait for hardware buffers to drain. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25USB: serial: remove unused MSR-wait queueJohan Hovold
Remove the port MSR-wait queue now that all drivers have been migrated to the tty-port queue. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25USB: serial: add generic get_icount implementationJohan Hovold
Add generic get_icount implementation that subdrivers relying on the port interrupt counters can use. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25USB: serial: add generic TIOCMIWAIT implementationJohan Hovold
Add generic TIOCMIWAIT implementation which correctly handles hangup, USB-device disconnect, does not rely on the deprecated sleep_on functions and hence does not suffer from the races currently affecting several usb-serial drivers. This makes it much easier to add TIOCMIWAIT support to subdrivers as the tricky details related to hangup and disconnect (e.g. atomicity, that the private port data may have been freed when woken up, and waking up processes at disconnect) have been handled once and for all. To add support to a subdriver, simply set the tiocmiwait-port-operation field, update the port icount fields and wake up any process sleeping on the tty-port modem-status-change wait queue on changes. Note that the tty-port initialised flag can be used to detect disconnected as the port will be hung up as part of disconnect (and cannot be reactivated due to the disconnected flag). However, as the tty-port implementation currently wakes up processes before calling port shutdown, the tty-hupping flag must also be checked to detect hangup for now. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25USB: serial: add tiocmiwait subdriver operationJohan Hovold
Add tiocmiwait operation to struct usb_serial_driver. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25USB: serial: remove generic release callbackJohan Hovold
Remove empty generic release implementation and make the release callback non-mandatory (like attach, probe and disconnect). Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25USB: serial: remove generic disconnect callbackJohan Hovold
Remove the now empty generic disconnect callback and make the disconnect callback non-mandatory. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-21USB: serial: add modem-status-change wait queueJohan Hovold
Add modem-status-change wait queue to struct usb_serial_port that subdrivers can use to implement TIOCMIWAIT. Currently subdrivers use a private wait queue which may have been released when waking up after device disconnected. Note that we're adding a new wait queue rather than reusing the tty-port one as we do not want to get woken up at hangup (yet). Cc: stable <stable@vger.kernel.org> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-18USB: ezusb: add support for Cypress FX2LPRene Buergel
This Patch adds support for the newer Cypress FX2LP. It also adapts three drivers currently using ezusb to the interface change. (whiteheat and keyspan[_pda]) Signed-off-by: René Bürgel <rene.buergel@sohard.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-18USB: Serial: usb-serial: remove debug module parameterGreg Kroah-Hartman
Now that all usb-serial modules are only using dev_dbg() the debug module parameter does not do anything at all, so remove it to reduce any confusion if someone were to try to use it. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-18USB: serial: remove debug parameter from usb_serial_debug_data()Greg Kroah-Hartman
We should use dev_dbg() for usb_serial_debug_data() like all of the rest of the usb-serial drivers use, so remove the debug parameter as it's not needed. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-18USB: serial: remove dbg() from usb/serial.hGreg Kroah-Hartman
Now that all in-kernel users of the dbg() macro are gone, we can remove it from the include/linux/usb/serial.h file. Good riddance. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13USB: ezusb: remove dependancy on usb_serialRene Buergel
This patch removes the dependency on the usb_serial interface and names some magic constants Signed-off-by: René Bürgel <rene.buergel@sohard.de> -- Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13USB: serial: move usb_serial_debug_data to use %*phGreg Kroah-Hartman
Now that we have a printk modifier for data streams, use it instead of rolling our own. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15USB: serial: hook up reset_resume callbackGreg Kroah-Hartman
The callback is now hooked up for any USB to serial driver that wants it. We only register the callback if any of the usb-serial structures want it, this keeps the USB core happy. Thanks to Alan Stern for the ideas on how to do this. Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-08USB: serial: rework usb_serial_register/deregister_drivers()Greg Kroah-Hartman
This reworks the usb_serial_register_drivers() and usb_serial_deregister_drivers() to not need a pointer to a struct usb_driver anymore. The usb_driver structure is now created dynamically and registered and unregistered as needed. This saves lines of code in each usb-serial driver. All in-kernel users of these functions were also fixed up at this time. The pl2303 driver was tested that everything worked properly. Thanks for the idea to do this from Alan Stern. Cc: Adhir Ramjiawan <adhirramjiawan0@gmail.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Al Borchers <alborchers@steinerpoint.com> Cc: Aleksey Babahin <tamerlan311@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Andrew Worsley <amworsley@gmail.com> Cc: Bart Hartgers <bart.hartgers@gmail.com> Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Dan Carpenter <error27@gmail.com> Cc: Dan Williams <dcbw@redhat.com> Cc: Donald Lee <donald@asix.com.tw> Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Gary Brubaker <xavyer@ix.netcom.com> Cc: Jesper Juhl <jj@chaosbits.net> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Johan Hovold <jhovold@gmail.com> Cc: Julia Lawall <julia@diku.dk> Cc: Kautuk Consul <consul.kautuk@gmail.com> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Lonnie Mendez <dignome@gmail.com> Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com> Cc: Matthias Urlichs <smurf@smurf.noris.de> Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: Michal Sroczynski <msroczyn@gmail.com> Cc: "Michał Wróbel" <michal.wrobel@flytronic.pl> Cc: Oliver Neukum <oliver@neukum.name> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Peter Berger <pberger@brimson.com> Cc: Preston Fick <preston.fick@silabs.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Rigbert Hamisch <rigbert@gmx.de> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Simon Arlott <simon@fire.lp0.eu> Cc: Support Department <support@connecttech.com> Cc: Thomas Tuttle <ttuttle@chromium.org> Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> Cc: Wang YanQing <Udknight@gmail.com> Cc: William Greathouse <wgreathouse@smva.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-07USB: serial: remove bizarre generic_serial probe functionGreg Kroah-Hartman
I can't remember why I wrote it like this many many years ago, but it's not needed at all, let's rely on the usb-serial core for this function, especially as it is being overridden by it anyway. This lets us make usb_serial_probe() a static function, which it should be. Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-07USB: serial: remove usb_serial_disconnect call in all driversGreg Kroah-Hartman
This is now set by the usb-serial core, no need for the driver to individually set it. Thanks to Alan Stern for the idea to get rid of it. Cc: William Greathouse <wgreathouse@smva.com> Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com> Cc: Lonnie Mendez <dignome@gmail.com> Cc: Peter Berger <pberger@brimson.com> Cc: Al Borchers <alborchers@steinerpoint.com> Cc: Gary Brubaker <xavyer@ix.netcom.com> Cc: Oliver Neukum <oliver@neukum.name> Cc: Matthias Urlichs <smurf@smurf.noris.de> Cc: Support Department <support@connecttech.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: Kautuk Consul <consul.kautuk@gmail.com> Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Bart Hartgers <bart.hartgers@gmail.com> Cc: Johan Hovold <jhovold@gmail.com> Cc: Preston Fick <preston.fick@silabs.com> Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> Cc: Simon Arlott <simon@fire.lp0.eu> Cc: Andrew Worsley <amworsley@gmail.com> Cc: "Michał Wróbel" <michal.wrobel@flytronic.pl> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Aleksey Babahin <tamerlan311@gmail.com> Cc: Dan Carpenter <error27@gmail.com> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Donald Lee <donald@asix.com.tw> Cc: Julia Lawall <julia@diku.dk> Cc: Michal Sroczynski <msroczyn@gmail.com> Cc: Wang YanQing <Udknight@gmail.com> Cc: Dan Williams <dcbw@redhat.com> Cc: Thomas Tuttle <ttuttle@chromium.org> Cc: Rigbert Hamisch <rigbert@gmx.de> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Jesper Juhl <jj@chaosbits.net> Cc: Adhir Ramjiawan <adhirramjiawan0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-09USB: fix bug in serial driver unregistrationAlan Stern
This patch (as1536) fixes a bug in the USB serial core. Unloading and reloading a serial driver while a serial device is plugged in causes errors because of the code in usb_serial_disconnect() that tries to make sure the port_remove method is called. With the new order of driver registration introduced in the 3.4 kernel, this is definitely not the right thing to do (if indeed it ever was). The patch removes that whole section code, along with the mechanism for keeping track of each port's registration state, which is no longer needed. The driver core can handle all that stuff for us. Note: This has been tested only with one or two USB serial drivers. In theory, other drivers might still run into trouble. But if they do, it will be the fault of the drivers, not of this patch -- that is, the drivers will need to be fixed. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-and-tested-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>