Commit Graph

12373 Commits

Author SHA1 Message Date
lyz
6953dcb68c rk312x: remove unused usb charger detect log info 2014-10-15 14:04:48 +08:00
lyz
495f30d337 usb: support different type of usb charger 2014-10-11 10:20:39 +08:00
wlf
c1906ff58f USB: fix handle NAK for IN/OUT SSPLIT/CSPLIT transfers.
IN SSPLIT/CSPLIT transfers, NAK packet will cause DWC_OTG
ctrl to generate lots of  SSPLIT/CSPLIT transfer interrupts,
and seriously affect the performance of the system. So need
to stop queue transactions after receive SSPLIT/CSPLIT NAK.
2014-09-29 17:03:50 +08:00
wlf
7889d6f702 USB: fix usb host connect detect timer. 2014-09-28 10:22:40 +08:00
lyz
c31eca9db4 usb: dwc: remove unused driver attributes 2014-09-25 17:02:07 +08:00
wlf
f6920b2eed USB: fix usb mouse detect insensitively.
In hot-plug case, the hcd->frame_number variable is abnormal,
and it will cause dwc_otg_hcd_handle_sof_intr to wait a long
time for periodic schedule frame. So need to unset
hcd->frame_number variable when devices disconnect.
2014-09-24 19:38:03 +08:00
lyz
85554161e1 usb: fix typo 2014-09-19 15:40:57 +08:00
lyz
5c977f1c64 usb: rk312x support usb charger detect 2014-09-19 15:37:26 +08:00
lyz
0c8d2d7806 HSIC: fix compilation error
usbdev_rk32.c: In function 'rk_hsic_soft_reset':
usbdev_rk32.c:438: error: storage size of 'rst_hsic_a' isn't known
usbdev_rk32.c:438: error: storage size of 'rst_hsic_p' isn't known
2014-09-19 08:50:47 +08:00
wlf
ad9774c22b USB: fix compilation warning 2014-09-17 19:23:52 +08:00
lyz
fdad8bbc33 usb: dwc_otg: prevent sleeping function called from atomic context
Disable _local_ irq make no sense here and we don't really need
it, if we need to disable usb irqs from dwc_otg call func
dwc_otg_disable_global_interrupts() can be more useful.
2014-09-17 14:55:12 +08:00
wlf
a197fb6717 USB: fix usb mass storage umonut err. 2014-09-04 19:39:59 +08:00
wlf
5cf78f7b89 USB: fix usb ep0 OUT setup bug.
In ep0_complete_request, do setup in status phase
in DMA mode for ep0-OUT. It can solve that usb RNDIS
unable to connect with win7 or win8.
2014-09-03 20:00:50 +08:00
lyz
4bcced1910 rk312x: usb power optimize by turning off differential receiver in suspend mode 2014-09-02 20:34:28 +08:00
lyz
54830a62b9 rk312x: usb-uart: support disable usb-uart bypass in DTS 2014-08-25 16:46:44 +08:00
lyz
d765e373a1 usb: dwc_otg: put usb phy back to normal state when shutdown 2014-08-15 10:39:10 +08:00
lyz
295c152c8b usb-uart: add a propertie in dts to enable usb-uart debug 2014-08-15 10:39:10 +08:00
黄涛
c7412991e9 Merge remote-tracking branch 'origin/develop-3.10' into develop-3.10-next
Conflicts:
	arch/arm/mach-rockchip/vcodec_service.c
	drivers/input/Makefile
2014-08-08 10:21:50 +08:00
lyz
a45c68396b Revert "usb: fix RK3036 bvalid irq Num"
This reverts commit 5c81c74ca6.
2014-08-07 16:18:00 +08:00
lyz
5c81c74ca6 usb: fix RK3036 bvalid irq Num 2014-08-07 16:16:21 +08:00
黄涛
fcef60e36f Merge tag 'lsk-v3.10-android-14.07' into develop-3.10
LSK v3.10 Android 14.07 release

Conflicts:
	drivers/clocksource/arm_arch_timer.c
	lib/Makefile
2014-08-06 15:34:14 +08:00
lyz
fd4b68a8f3 rk312x: usb: use dwc as default host controller 2014-08-05 16:46:21 +08:00
lyz
dff8dc932f usb: udc: receive 1 SETUP packet in BDMA mode 2014-08-05 09:06:59 +08:00
黄涛
4b19ba3477 Merge remote-tracking branch 'origin/develop-3.10' into develop-3.10-next
Conflicts:
	drivers/staging/android/ion/ion.c
	include/linux/rockchip/sysmmu.h
2014-08-04 16:52:07 +08:00
lyz
8ba35134f6 rk312x: support usb-uart debug 2014-08-01 15:37:38 +08:00
lyz
522d0ceccf rk312x: add usb 2014-07-30 18:31:01 +08:00
wlf
0a9753f2db USB: Fix usb debug log 2014-07-29 10:32:44 +08:00
黄涛
b5d61451d6 Merge remote-tracking branch 'origin/develop-3.10' into develop-3.10-next 2014-07-28 16:09:07 +08:00
Alex Shi
84d484012a Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2014-07-18 14:09:17 +08:00
Alex Shi
d0bc082b9c Merge tag 'v3.10.49' into linux-linaro-lsk
This is the 3.10.49 stable release
2014-07-18 14:08:02 +08:00
Michal Sojka
6bb8bc5086 USB: serial: ftdi_sio: Add Infineon Triboard
commit d8279a40e5 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-17 15:57:59 -07:00
Bert Vermeulen
02c6b0129a USB: ftdi_sio: Add extra PID.
commit 5a7fbe7e9e upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-17 15:57:59 -07:00
Andras Kovacs
6e462b7398 USB: cp210x: add support for Corsair usb dongle
commit b9326057a3 upstream.

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>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-17 15:57:59 -07:00
Bernd Wachter
92b943d389 usb: option: Add ID for Telewell TW-LTE 4G v2
commit 3d28bd840b upstream.

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>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-17 15:57:59 -07:00
wlf
531563a29f USB: fix dwc_otg hcd desc dma allocate memory with GFP_ATOMIC. 2014-07-16 18:06:43 +08:00
wlf
86d84a1a6b USB: fix ep_queue request buf dma map and unmap.
1. For 0 length buf, perform dma map with length 4
   to avoid kernel stack dump occurred.
2. Do dma unmap before req->complete to avoid dma
   addr reused after unmapped.
2014-07-16 14:13:57 +08:00
wlf
6d10fa81b3 USB: fix otg pcd DMA allocate memory with GFP_ATOMIC.
In dwc_otg_pcd_ep_queue, allocate DMA memory for
align buf. Because dwc_otg_pcd_ep_queue can be
called in irq, so it must be used GFP_ATOMIC to
avoid sleep in irq.
2014-07-16 14:09:10 +08:00
Mark Brown
e503fc621f Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2014-07-14 10:46:05 +01:00
Mark Brown
fa6e052947 Merge tag 'v3.10.48' into linux-linaro-lsk
This is the 3.10.48 stable release
2014-07-14 10:45:20 +01:00
lyz
9e0a0fd358 3036: usb: fix wrong address 2014-07-12 19:04:57 +08:00
lyz
2ddac0b093 usb: rk3036: updata soft-reset
1.rename platform dev name to 3036
2.fix dts err
3.follow new soft reset framework
2014-07-10 09:38:50 +08:00
黄涛
77ddfc9d50 Merge remote-tracking branch 'origin/develop-3.10' into develop-3.10-next
Conflicts:
	drivers/usb/dwc_otg_310/usbdev_rk.h
2014-07-10 09:22:27 +08:00
Michal Nazarewicz
4882c04833 usb: gadget: f_fs: fix NULL pointer dereference when there are no strings
commit f0688c8b81 upstream.

If the descriptors do not need any strings and user space sends empty
set of strings, the ffs->stringtabs field remains NULL.  Thus
*ffs->stringtabs in functionfs_bind leads to a NULL pointer
dereferenece.

The bug was introduced by commit [fd7c9a007f: “use usb_string_ids_n()”].

While at it, remove double initialisation of lang local variable in
that function.

ffs->strings_count does not need to be checked in any way since in
the above scenario it will remain zero and usb_string_ids_n() is
a no-operation when colled with 0 argument.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 11:14:00 -07:00
Johan Hovold
086d371dff USB: ftdi_sio: fix null deref at port probe
commit aea1ae8760 upstream.

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: 895f28badc ("USB: ftdi_sio: fix hi-speed device packet size
calculation")

Reported-by: Mike Remski <mremski@mutualink.net>
Tested-by: Mike Remski <mremski@mutualink.net>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 11:14:00 -07:00
Bjørn Mork
34ee9a9539 usb: option: add/modify Olivetti Olicard modems
commit b0ebef36e9 upstream.

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>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 11:14:00 -07:00
Oliver Neukum
369ec877f7 USB: option: add device ID for SpeedUp SU9800 usb 3g modem
commit 1cab4c68e3 upstream.

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>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 11:14:00 -07:00
Wang, Yu
96c734b9c1 xhci: Fix runtime suspended xhci from blocking system suspend.
commit d6236f6d1d upstream.

The system suspend flow as following:
1, Freeze all user processes and kenrel threads.

2, Try to suspend all devices.

2.1, If pci device is in RPM suspended state, then pci driver will try
to resume it to RPM active state in the prepare stage.

2.2, xhci_resume function calls usb_hcd_resume_root_hub to queue two
workqueue items to resume usb2&usb3 roothub devices.

2.3, Call suspend callbacks of devices.

2.3.1, All suspend callbacks of all hcd's children, including
roothub devices are called.

2.3.2, Finally, hcd_pci_suspend callback is called.

Due to workqueue threads were already frozen in step 1, the workqueue
items can't be scheduled, and the roothub devices can't be resumed in
this flow. The HCD_FLAG_WAKEUP_PENDING flag which is set in
usb_hcd_resume_root_hub won't be cleared. Finally,
hcd_pci_suspend will return -EBUSY, and system suspend fails.

The reason why this issue doesn't show up very often is due to that
choose_wakeup will be called in step 2.3.1. In step 2.3.1, if
udev->do_remote_wakeup is not equal to device_may_wakeup(&udev->dev), then
udev will resume to RPM active for changing the wakeup settings. This
has been a lucky hit which hides this issue.

For some special xHCI controllers which have no USB2 port, then roothub
will not match hub driver due to probe failed. Then its
do_remote_wakeup will be set to zero, and we won't be as lucky.

xhci driver doesn't need to resume roothub devices everytime like in
the above case. It's only needed when there are pending event TRBs.

This patch should be back-ported to kernels as old as 3.2, that
contains the commit f69e3120df
"USB: XHCI: resume root hubs when the controller resumes"

Signed-off-by: Wang, Yu <yu.y.wang@intel.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
[use readl() instead of removed xhci_readl(), reword commit message -Mathias]
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 11:13:59 -07:00
Mathias Nyman
5f84a7feac xhci: correct burst count field for isoc transfers on 1.0 xhci hosts
commit 3213b15138 upstream.

The transfer burst count (TBC) field in xhci 1.0 hosts should be set
to the number of bursts needed to transfer all packets in a isoc TD.
Supported values are 0-2 (1 to 3 bursts per service interval).

Formula for TBC calculation is given in xhci spec section 4.11.2.3:
TBC = roundup( Transfer Descriptor Packet Count / Max Burst Size +1 ) - 1

This patch should be applied to stable kernels since 3.0 that contain
the commit 5cd43e33b9
"xhci 1.0: Set transfer burst count field."

Suggested-by: ShiChun Ma <masc2008@qq.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 11:13:59 -07:00
lyz
c7ec4ec5a3 usb: update soft reset
1.add rst_flag to distinguish different reset cases
2.use new reset framework APIs
2014-07-09 10:52:49 +08:00
黄涛
223378cc0f Merge remote-tracking branch 'origin/develop-3.10' into develop-3.10-next
Conflicts:
	drivers/mmc/host/Kconfig
	drivers/video/rockchip/hdmi/chips/rk616/rk616_hdmi.c
	drivers/video/rockchip/hdmi/chips/rk616/rk616_hdmi.h
	drivers/video/rockchip/hdmi/chips/rk616/rk616_hdmi_hw.c
	drivers/video/rockchip/hdmi/chips/rk616/rk616_hdmi_hw.h
	include/linux/mmc/rk_mmc.h
	include/linux/rockchip/cru.h
2014-07-07 21:01:04 +08:00