summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial
Commit message (Collapse)AuthorAgeFilesLines
...
| * USB: ftdi_sio: fix max-packet-size warningJohan Hovold2014-07-071-3/+2Star
| | | | | | | | | | | | | | | | Promote max-packet-size-override message to warning level and use the port device for logging, while using actual endpoint numbers in the message itself. Signed-off-by: Johan Hovold <johan@kernel.org>
| * USB: ftdi_sio: make port probe less verboseJohan Hovold2014-07-071-6/+0Star
| | | | | | | | | | | | | | | | | | | | | | There's no need to print the number of endpoints per interface or endpoint wMaxPacketSize during port probe. This information is readily available using lsusb should it ever be needed. Note that this also fixes the wMaxPacketSize being incorrectly reported on big-endian systems due to a missing le16_to_cpu(). Signed-off-by: Johan Hovold <johan@kernel.org>
* | Merge 3.16-rc5 into usb-nextGreg Kroah-Hartman2014-07-144-2/+15
|\ \ | | | | | | | | | | | | | | | We want those fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: serial: ftdi_sio: Add Infineon TriboardMichal Sojka2014-07-122-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for Infineon TriBoard TC1798 [1]. Only interface 1 is used as serial line (see [2], Figure 8-6). [1] http://www.infineon.com/cms/de/product/microcontroller/development-tools-software-and-kits/tricore-tm-development-tools-software-and-kits/starterkits-and-evaluation-boards/starter-kit-tc1798/channel.html?channel=db3a304333b8a7ca0133cfa3d73e4268 [2] http://www.infineon.com/dgdl/TriBoardManual-TC1798-V10.pdf?folderId=db3a304412b407950112b409ae7c0343&fileId=db3a304333b8a7ca0133cfae99fe426a Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz> Cc: Johan Hovold <johan@kernel.org> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: ftdi_sio: Add extra PID.Bert Vermeulen2014-07-102-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds PID 0x0003 to the VID 0x128d (Testo). At least the Testo 435-4 uses this, likely other gear as well. Signed-off-by: Bert Vermeulen <bert@biot.com> Cc: Johan Hovold <johan@kernel.org> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | usb: option: Add ID for Telewell TW-LTE 4G v2Bernd Wachter2014-07-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add ID of the Telewell 4G v2 hardware to option driver to get legacy serial interface working Signed-off-by: Bernd Wachter <bernd.wachter@jolla.com> Cc: <stable@vger.kernel.org> Signed-off-by: Johan Hovold <johan@kernel.org>
| * | USB: cp210x: add support for Corsair usb dongleAndras Kovacs2014-07-071-0/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Corsair USB Dongles are shipped with Corsair AXi series PSUs. These are cp210x serial usb devices, so make driver detect these. I have a program, that can get information from these PSUs. Tested with 2 different dongles shipped with Corsair AX860i and AX1200i units. Signed-off-by: Andras Kovacs <andras@sth.sze.hu> Cc: <stable@vger.kernel.org> Signed-off-by: Johan Hovold <johan@kernel.org>
* | drivers/usb/serial/mos7840.c: remove unnecessary null test before kfreeFabian Frederick2014-07-101-4/+1Star
| | | | | | | | | | | | Cc: Johan Hovold <jhovold@gmail.com> Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | USB: kl5kusb105: Remove klsi_105_tiocmset functionPeter Senna Tschudin2014-07-101-30/+0Star
|/ | | | | | | | | | | | This patch remove the function klsi_105_tiocmset which was only returning -EINVAL. It also removes the function prototype and the .tiocmset entry in the struct usb_serial_driver. Verified by compilation only. Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: option: add/modify Olivetti Olicard modemsBjørn Mork2014-06-231-6/+16
| | | | | | | | | | Adding a couple of Olivetti modems and blacklisting the net function on a couple which are already supported. Reported-by: Lars Melin <larsm17@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Johan Hovold <johan@kernel.org>
* USB: ftdi_sio: fix null deref at port probeJohan Hovold2014-06-231-2/+5
| | | | | | | | | | | | | | | | | | | Fix NULL-pointer dereference when probing an interface with no endpoints. These devices have two bulk endpoints per interface, but this avoids crashing the kernel if a user forces a non-FTDI device to be probed. Note that the iterator variable was made unsigned in order to avoid a maybe-uninitialized compiler warning for ep_desc after the loop. Fixes: 895f28badce9 ("USB: ftdi_sio: fix hi-speed device packet size calculation") Reported-by: Mike Remski <mremski@mutualink.net> Tested-by: Mike Remski <mremski@mutualink.net> Cc: <stable@vger.kernel.org> # 2.6.31 Signed-off-by: Johan Hovold <johan@kernel.org>
* USB: option: add device ID for SpeedUp SU9800 usb 3g modemOliver Neukum2014-06-231-0/+4
| | | | | | | | | | | | | | | | | Reported by Alif Mubarak Ahmad: This device vendor and product id is 1c9e:9800 It is working as serial interface with generic usbserial driver. I thought it is more suitable to use usbserial option driver, which has better capability distinguishing between modem serial interface and micro sd storage interface. [ johan: style changes ] Signed-off-by: Oliver Neukum <oneukum@suse.de> Tested-by: Alif Mubarak Ahmad <alive4ever@live.com> Cc: <stable@vger.kernel.org> Signed-off-by: Johan Hovold <johan@kernel.org>
* Merge branch 'next' (accumulated 3.16 merge window patches) into masterLinus Torvalds2014-06-089-306/+368
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that 3.15 is released, this merges the 'next' branch into 'master', bringing us to the normal situation where my 'master' branch is the merge window. * accumulated work in next: (6809 commits) ufs: sb mutex merge + mutex_destroy powerpc: update comments for generic idle conversion cris: update comments for generic idle conversion idle: remove cpu_idle() forward declarations nbd: zero from and len fields in NBD_CMD_DISCONNECT. mm: convert some level-less printks to pr_* MAINTAINERS: adi-buildroot-devel is moderated MAINTAINERS: add linux-api for review of API/ABI changes mm/kmemleak-test.c: use pr_fmt for logging fs/dlm/debug_fs.c: replace seq_printf by seq_puts fs/dlm/lockspace.c: convert simple_str to kstr fs/dlm/config.c: convert simple_str to kstr mm: mark remap_file_pages() syscall as deprecated mm: memcontrol: remove unnecessary memcg argument from soft limit functions mm: memcontrol: clean up memcg zoneinfo lookup mm/memblock.c: call kmemleak directly from memblock_(alloc|free) mm/mempool.c: update the kmemleak stack trace for mempool allocations lib/radix-tree.c: update the kmemleak stack trace for radix tree allocations mm: introduce kmemleak_update_trace() mm/kmemleak.c: use %u to print ->checksum ...
| * Merge branch 'locking-core-for-linus' of ↵Linus Torvalds2014-06-031-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next Pull core locking updates from Ingo Molnar: "The main changes in this cycle were: - reduced/streamlined smp_mb__*() interface that allows more usecases and makes the existing ones less buggy, especially in rarer architectures - add rwsem implementation comments - bump up lockdep limits" * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (33 commits) rwsem: Add comments to explain the meaning of the rwsem's count field lockdep: Increase static allocations arch: Mass conversion of smp_mb__*() arch,doc: Convert smp_mb__*() arch,xtensa: Convert smp_mb__*() arch,x86: Convert smp_mb__*() arch,tile: Convert smp_mb__*() arch,sparc: Convert smp_mb__*() arch,sh: Convert smp_mb__*() arch,score: Convert smp_mb__*() arch,s390: Convert smp_mb__*() arch,powerpc: Convert smp_mb__*() arch,parisc: Convert smp_mb__*() arch,openrisc: Convert smp_mb__*() arch,mn10300: Convert smp_mb__*() arch,mips: Convert smp_mb__*() arch,metag: Convert smp_mb__*() arch,m68k: Convert smp_mb__*() arch,m32r: Convert smp_mb__*() arch,ia64: Convert smp_mb__*() ...
| | * arch: Mass conversion of smp_mb__*()Peter Zijlstra2014-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mostly scripted conversion of the smp_mb__* barriers. Signed-off-by: Peter Zijlstra <peterz@infradead.org> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Link: http://lkml.kernel.org/n/tip-55dhyhocezdw1dg7u19hmh1u@git.kernel.org Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: linux-arch@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
| * | usb: qcserial: add additional Sierra Wireless QMI devicesAleksander Morgado2014-05-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A set of new VID/PIDs retrieved from the out-of-tree GobiNet/GobiSerial Sierra Wireless drivers. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> Link: http://marc.info/?l=linux-usb&m=140136310027293&w=2 Cc: <stable@vger.kernel.org> # backport in link above Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | usb: qcserial: add Netgear AirCard 341UAleksander Morgado2014-05-281-0/+1
| | | | | | | | | | | | | | | | | | Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: keyspan: fix potential null pointer dereferenceRickard Strandqvist2014-05-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move control-urb dereference to after NULL-check. There is otherwise a risk of a possible null pointer dereference. Was largely found by using a static code analysis program called cppcheck. [Johan: modify commit message somewhat ] [gkh: remove stable tag as it's not a real problem that anyone has ever hit] Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: kobil_sct: fix control requests without data stageJohan Hovold2014-05-281-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | Fix incorrect pipe directions and remove bogus data buffer arguments from control requests without data stage. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: serial: remove overly defensive port testsJohan Hovold2014-05-281-24/+14Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | The only way a port pointer may be NULL is if probe() failed, and in that case neither disconnect(), resume(), or reset_resume() will be called. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: serial: fix potential runtime pm imbalance at device removeJohan Hovold2014-05-281-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only call usb_autopm_put_interface() if the corresponding usb_autopm_get_interface() was successful. This prevents a potential runtime PM counter imbalance should usb_autopm_get_interface() fail. Note that the USB PM usage counter is reset when the interface is unbound, but that the runtime PM counter may be left unbalanced. Also add comment on why we don't need to worry about racing resume/suspend on autopm_get failures. Fixes: d5fd650cfc7f ("usb: serial: prevent suspend/resume from racing against probe/remove") Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: usb_wwan: do not resume I/O on closing portsJohan Hovold2014-05-282-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use tty-port initialised flag rather than private flag to determine when port is closing down. Since the tty-port flag is set prior to dropping DTR/RTS (when HUPCL is set) this avoid submitting the read urbs when resuming the interface in dtr_rts() only to immediately kill them again in shutdown(). Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: usb_wwan: report failed submissions as errorsJohan Hovold2014-05-281-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | Promote failed-submission messages in open() and write() to error log level. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: usb_wwan: remove bogus function prototypeJohan Hovold2014-05-281-1/+0Star
| | | | | | | | | | | | | | | | | | | | | The usb_wwan_send_setup() function has never existed. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: usb_wwan: remove some superfluous commentsJohan Hovold2014-05-281-7/+0Star
| | | | | | | | | | | | | | | | | | | | | Remove some more outdated or superfluous comments. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: usb_wwan: remove comment from closeJohan Hovold2014-05-281-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove superfluous and cryptic comment from close. It should be obvious that we're balancing the autopm_put in open (and that operation already mentions the autopm_get done in the USB serial core). Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: usb_wwan: clean up delayed-urb submissionJohan Hovold2014-05-281-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up and rename delay-urb submission function using a more descriptive name. Also add comment on locking assumptions. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: usb_wwan: use interface-data accessorsJohan Hovold2014-05-281-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | Use usb_get_serial_data() rather than accessing the private pointer directly. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: usb_wwan: make resume error messages uniformJohan Hovold2014-05-281-2/+3
| | | | | | | | | | | | | | | | | | | | | Make resume error messages uniform. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: usb_wwan: kill interrupt urb explicitly at suspendJohan Hovold2014-05-281-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | As the port interrupt URB is submitted by the subdriver at open, we should also kill it explicitly at suspend (even though this will be taken care of by USB serial core otherwise). Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: usb_wwan: remove redundant urb kill from port removeJohan Hovold2014-05-281-4/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | Remove redundant usb_kill_urb from port remove, which is called post-shutdown (close). Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: usb_wwan: remove unimplemented set_termiosJohan Hovold2014-05-283-18/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver does not implement set_termios so the operation can be left unset (tty will do the tty_termios_copy_hw for us). Note that the send_setup call is bogus as it really only sets DTR/RTS to their current values. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: usb_wwan: remove redundant modem-control requestJohan Hovold2014-05-281-3/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | The tty-port implementation has already made sure that DTR/RTS have been raised by calling dtr_rts so remove the redundant call from open. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: usb_wwan: fix remote wakeupJohan Hovold2014-05-282-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure that needs_remote_wake up is always set when there are open ports. Currently close() would unconditionally set needs_remote_wakeup to 0 even though there might still be open ports. This could lead to blocked input and possibly dropped data on devices that do not support remote wakeup (and which must therefore not be runtime suspended while open). Add an open_ports counter (protected by the susp_lock) and only clear needs_remote_wakeup when the last port is closed. Note that there are currently no multi-port drivers using the usb_wwan implementation. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: usb_wwan: fix discarded writes on resume errorsJohan Hovold2014-05-281-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | There's no reason not to try sending off any further delayed write urbs, should one urb-submission fail. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: usb_wwan: fix potential blocked I/O after resumeJohan Hovold2014-05-281-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keep trying to submit urbs rather than bail out on first read-urb submission error, which would also prevent I/O for any further ports from being resumed. Instead keep an error count, for all types of failed submissions, and let USB core know that something went wrong. Also make sure to always clear the suspended flag. Currently a failed read-urb submission would prevent cached writes as well as any subsequent writes from being submitted until next suspend-resume cycle, something which may not even necessarily happen. Note that USB core currently only logs an error if an interface resume failed. Fixes: 383cedc3bb43 ("USB: serial: full autosuspend support for the option driver") Cc: <stable@vger.kernel.org> # v2.6.32 Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: usb_wwan: fix potential NULL-deref at resumeJohan Hovold2014-05-281-24/+19Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The interrupt urb was submitted unconditionally at resume, something which could lead to a NULL-pointer dereference in the urb completion handler as resume may be called after the port and port data is gone. Fix this by making sure the interrupt urb is only submitted and active when the port is open. Fixes: 383cedc3bb43 ("USB: serial: full autosuspend support for the option driver") Cc: <stable@vger.kernel.org> # v2.6.32: 032129cb03df Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: usb_wwan: fix urb leak at shutdownJohan Hovold2014-05-281-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The delayed-write queue was never emptied at shutdown (close), something which could lead to leaked urbs if the port is closed before being runtime resumed due to a write. When this happens the output buffer would not drain on close (closing_wait timeout), and after consecutive opens, writes could be corrupted with previously buffered data, transfered with reduced throughput or completely blocked. Note that unbusy_queued_urb() was simply moved out of CONFIG_PM. Fixes: 383cedc3bb43 ("USB: serial: full autosuspend support for the option driver") Cc: <stable@vger.kernel.org> # v2.6.32 Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: usb_wwan: fix write and suspend raceJohan Hovold2014-05-281-8/+5Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix race between write() and suspend() which could lead to writes being dropped (or I/O while suspended) if the device is runtime suspended while a write request is being processed. Specifically, suspend() releases the susp_lock after determining the device is idle but before setting the suspended flag, thus leaving a window where a concurrent write() can submit an urb. Fixes: 383cedc3bb43 ("USB: serial: full autosuspend support for the option driver") Cc: <stable@vger.kernel.org> # v2.6.32 Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: usb_wwan: fix race between write and resumexiao jin2014-05-281-6/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We find a race between write and resume. usb_wwan_resume run play_delayed() and spin_unlock, but intfdata->suspended still is not set to zero. At this time usb_wwan_write is called and anchor the urb to delay list. Then resume keep running but the delayed urb have no chance to be commit until next resume. If the time of next resume is far away, tty will be blocked in tty_wait_until_sent during time. The race also can lead to writes being reordered. This patch put play_Delayed and intfdata->suspended together in the spinlock, it's to avoid the write race during resume. Fixes: 383cedc3bb43 ("USB: serial: full autosuspend support for the option driver") Signed-off-by: xiao jin <jin.xiao@intel.com> Signed-off-by: Zhang, Qi1 <qi1.zhang@intel.com> Reviewed-by: David Cohen <david.a.cohen@linux.intel.com> Cc: <stable@vger.kernel.org> # v2.6.32 Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: usb_wwan: fix urb leak in write error pathxiao jin2014-05-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When enable usb serial for modem data, sometimes the tty is blocked in tty_wait_until_sent because portdata->out_busy always is set and have no chance to be cleared. We find a bug in write error path. usb_wwan_write set portdata->out_busy firstly, then try autopm async with error. No out urb submit and no usb_wwan_outdat_callback to this write, portdata->out_busy can't be cleared. This patch clear portdata->out_busy if usb_wwan_write try autopm async with error. Fixes: 383cedc3bb43 ("USB: serial: full autosuspend support for the option driver") Signed-off-by: xiao jin <jin.xiao@intel.com> Signed-off-by: Zhang, Qi1 <qi1.zhang@intel.com> Reviewed-by: David Cohen <david.a.cohen@linux.intel.com> Cc: <stable@vger.kernel.org> # v2.6.32 Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: option: add missing usb_mark_last_busyJohan Hovold2014-05-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | We should call usb_mark_last_busy in all input paths, including the interrupt completion handler. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: option: fix line-control pipe directionJohan Hovold2014-05-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The option line-control request has been using the wrong pipe direction, while relying on USB core to fix it up. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: option: fix runtime PM handlingJohan Hovold2014-05-281-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix potential I/O while runtime suspended due to missing PM operations in send_setup. Fixes: 383cedc3bb43 ("USB: serial: full autosuspend support for the option driver") Cc: <stable@vger.kernel.org> # v2.6.32 Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: sierra: do not resume I/O on closing portsJohan Hovold2014-05-281-6/+5Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use tty-port initialised flag rather than private flag to determine when port is closing down. Since the tty-port flag is set prior to dropping DTR/RTS (when HUPCL is set) this avoid submitting the read urbs when resuming the interface in dtr_rts() only to immediately kill them again in shutdown(). Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: sierra: minimise no-suspend window during closeJohan Hovold2014-05-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move usb_autopm_get_interface_no_resume to the end of close(). This makes the window during which suspend is prevented before the final put in USB serial core slightly smaller. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: sierra: refactor delayed-urb submissionJohan Hovold2014-05-281-20/+43
| | | | | | | | | | | | | | | | | | | | | Refactor and clean up delayed-urb submission at resume. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: sierra: clean up suspendJohan Hovold2014-05-281-10/+6Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up suspend() somewhat and make sure to always set the suspended flag (although it's only used for runtime PM) in order to match resume(). Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: sierra: use interface-data accessorsJohan Hovold2014-05-281-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Use usb_get_serial_data() rather than accessing the private pointer directly. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: sierra: remove redundant modem-control requestsJohan Hovold2014-05-281-15/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | The tty-port implementation has already made sure that DTR/RTS have been raised and lowered by calling dtr_rts so remove the redundant calls from open and close. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>