Commit Graph

9793 Commits (cd565279e51bedee1b2988e84f9b3bef485adeb6)

Author SHA1 Message Date
Bjørn Mork cd565279e5 USB: option: add Yota / Megafon M100-1 4g modem
Interface layout:

 00 CD-ROM
 01 debug COM port
 02 AP control port
 03 modem
 04 usb-ethernet

Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#=  4 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0408 ProdID=ea42 Rev= 0.00
S:  Manufacturer=Qualcomm, Incorporated
S:  Product=Qualcomm CDMA Technologies MSM
S:  SerialNumber=353568051xxxxxx
C:* #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=84(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=86(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-13 08:48:31 -08:00
Heiko Carstens 5273afe359 drivers/usb: add missing GENERIC_HARDIRQS dependencies
Add a couple of missing GENERIC_HARDIRQS dependencies to fix link
errors like below on s390:

ERROR: "devm_request_threaded_irq" [drivers/usb/gadget/mv_udc.ko] undefined!

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-08 12:16:12 -08:00
fangxiaozhi cd060956c5 USB: storage: properly handle the endian issues of idProduct
1. The idProduct is little endian, so make sure its value to be
compatible with the current CPU. Make no break on big endian processors.

Signed-off-by: fangxiaozhi <huananhu@huawei.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-08 12:15:25 -08:00
Greg Kroah-Hartman ceb675a9e2 Merge usb-linus branch into usb-next
This pulls in a bunch of fixes that are in Linus's tree because we need them
here for testing and development.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-08 12:03:11 -08:00
Felipe Balbi 9662ced352 usb: gadget: imx_udc: make it depend on BROKEN
that driver hasn't been maintained for quite
some time, at least since e08300043e (ARM:
imx: dynamically allocate imx_udc device).

Because of that, and because driver doesn't
even compile with allyesconfig and allmodconfig,
we're making it depend on BROKEN.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-06 11:43:39 -08:00
Dan Carpenter f07af4b630 USB: wusbcore/wa-xfer: error handling fixes in setup_segs()
1) It didn't free xfer->seg[0] so there was a leak.
2) xfer->seg[cnt] can be NULL.
3) Use usb_free_urb() for ->dto_urb instead of kfree().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-06 11:38:14 -08:00
Chen Gang 4d2079c190 drivers/usb/gadget: using strlcpy instead of strncpy
for NUL terminated string, better notice '\0' in the end.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-06 11:38:13 -08:00
Chen Gang b11b2e1bdd drivers/usb/core: using strlcpy instead of strncpy
for NUL terminated string, better notice '\0' in the end.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-06 11:38:13 -08:00
fangxiaozhi 200e0d994d USB: storage: optimize to match the Huawei USB storage devices and support new switch command
1. Optimize the match rules with new macro for Huawei USB storage devices,
   to avoid to load USB storage driver for the modem interface
   with Huawei devices.
2. Add to support new switch command for new Huawei USB dongles.

Signed-off-by: fangxiaozhi <huananhu@huawei.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-04 10:41:40 -08:00
fangxiaozhi 07c7be3d87 USB: storage: Define a new macro for USB storage match rules
1. Define a new macro for USB storage match rules:
    matching with Vendor ID and interface descriptors.

Signed-off-by: fangxiaozhi <huananhu@huawei.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-04 10:40:16 -08:00
Petr Kubánek 0ba3b2ccc7 USB: ftdi_sio: add Zolix FTDI PID
Add support for Zolix Omni 1509 monochromator custom USB-RS232 converter.

Signed-off-by: Petr Kubánek <petr@kubanek.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-02 13:31:52 +01:00
Bjørn Mork d4fa681541 USB: option: add Changhong CH690
New device with 3 serial interfaces:

 If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend) Sub=ff Prot=ff
 If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend) Sub=ff Prot=ff
 If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend) Sub=ff Prot=ff
 If#= 3 Alt= 0 #EPs= 2 Cls=08(stor) Sub=06 Prot=50

Cc: <stable@vger.kernel.org>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-02 13:31:50 +01:00
Sven Killig c249f91140 USB: ftdi_sio: add PID/VID entries for ELV WS 300 PC II
Add PID/VID entries for ELV WS 300 PC II weather station

Signed-off-by: Sven Killig <sven@killig.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-02 13:28:42 +01:00
Luis Llorente Campo 8de7f4da8f USB: add OWL CM-160 support to cp210x driver
This adds support for the OWL CM-160 electricity monitor to the cp210x
driver.

Signed-off-by: Luis Llorente <luisllorente@luisllorente.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-31 13:51:12 +01:00
Alan Stern 3e619d0415 USB: EHCI: fix bug in scheduling periodic split transfers
This patch (as1654) fixes a very old bug in ehci-hcd, connected with
scheduling of periodic split transfers.  The calculations for
full/low-speed bus usage are all carried out after the correction for
bit-stuffing has been applied, but the values in the max_tt_usecs
array assume it hasn't been.  The array should allow for allocation of
up to 90% of the bus capacity, which is 900 us, not 780 us.

The symptom caused by this bug is that any isochronous transfer to a
full-speed device with a maxpacket size larger than about 980 bytes is
always rejected with a -ENOSPC error.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-31 10:14:48 +01:00
Alan Stern b09a61cc0b USB: EHCI: fix for leaking isochronous data
This patch (as1653) fixes a bug in ehci-hcd.  Unlike iTD entries, an
siTD entry in the periodic schedule may not complete until the frame
after the one it belongs to.  Consequently, when scanning the periodic
schedule it is necessary to start with the frame _preceding_ the one
where the previous scan ended.

Not doing this properly can result in memory leaks and failures to
complete isochronous URBs.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Andy Leiserson <andy@leiserson.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-31 10:14:48 +01:00
Alan Stern 2f07607747 USB: GADGET: optionally force full-speed for net2280 UDC
This patch (as1656) adds a module parameter to the net2280 UDC driver
to force full-speed operation.  It is intended for testing purposes,
where one wants to check how well a full-speed device performs when
attached to a high-speed bus.  Without this parameter it would be
necessary to interpose a full-speed hub; otherwise the net2280 would
connect at high speed.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-31 10:09:19 +01:00
Alan Stern d0b4652f80 USB: altsetting overrides for usbtest
The usbtest driver includes some rather simple-minded logic for
selecting an altsetting to test.  It doesn't work well for the g_zero
gadget, because it selects altsetting 0 (which doesn't have
isochronous endpoints) rather than altsetting 1 (which does have them,
if the gadget's hardware supports them).  This prevents usbtest's
isochronous tests (15, 16, 22, and 23) from working with g_zero.

Since g_zero is one of the most common gadget drivers used for USB
testing, usbtest should do a better job of supporting it.  But since
some programs may rely on the current scheme for selecting
altsettings, I didn't want to change it.

Instead, this patch (as1655) adds a module parameter to usbtest, which
can be used to override the default altsetting.  Since usbtest is
never used by normal users (most distributions probably don't even
build it), the new module parameter won't inconvenience anybody.  In
any case, it is entirely optional -- leaving it unset preserves the
existing behavior.

The patch also fixes a related bug in usbtest: After selecting an
altsetting, the driver neglects to store its selection.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-31 10:09:19 +01:00
Daniele Palmas 03eb466f27 USB: option: add support for Telit LE920
Add PID and special handling for Telit LE920

Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-30 06:19:20 +01:00
Daniele Palmas 78796ae17e USB: qcserial: add Telit Gobi QDL device
Add VID and PID for Telit Gobi QDL device

Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-30 06:19:20 +01:00
Fabio Estevam 7b8bc3aad0 USB: chipidea: ci13xxx_imx: Remove sparse warning
Remove the following sparse warning:

drivers/usb/chipidea/ci13xxx_imx.h:22:25: error: dubious one-bit signed bitfield
drivers/usb/chipidea/ci13xxx_imx.h:22:25: error: dubious one-bit signed bitfield

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-30 00:17:39 -05:00
Arvid Brodin de9c6307c0 usb/isp1760: declare schedule_ptds() and errata2_function() static
Fix two problems detected by the sparse code analyser:

|drivers/usb/host/isp1760-hcd.c:935:6: warning: symbol 'schedule_ptds' was not declared. Should it be static?
|drivers/usb/host/isp1760-hcd.c:1288:6: warning: symbol 'errata2_function' was not declared. Should it be static?

Signed-off-by: Arvid Brodin <arvid.brodin@xdin.com>
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-30 00:17:38 -05:00
Felipe Balbi 6992819feb usb: phy: fix Kconfig warning
Recent commits introduced the following
Kconfig warning:

warning: (USB_MUSB_HDRC && OMAP_USB3) selects \
	OMAP_CONTROL_USB which has unmet direct \
	dependencies (USB_SUPPORT && ARCH_OMAP2PLUS)

This patch just fixes it, by removing the
unnecessary OMAP dependency.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-29 07:33:07 -08:00
Lan Tianyu 3b2ab2b84c Revert "usb: Register usb port's acpi power resources"
This reverts commit 88bb965ed7.

The linux-next branch of linux-pm tree has replaced
acpi_power_resource_(un)register_device() with new routines.
Commit 88bb965 will cause conflict in the linux-next tree.
So revert it and this will not affect other functions. Will
send a new patch with new routines after 3.9 merge window.

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-29 07:33:07 -08:00
Alan Stern ee74290b78 USB: EHCI: fix timer bug affecting port resume
This patch (as1652) fixes a long-standing bug in ehci-hcd.  The driver
relies on status polls to know when to stop port-resume signalling.
It uses the root-hub status timer to schedule these status polls.  But
when the driver for the root hub is resumed, the timer is rescheduled
to go off immediately -- before the port is ready.  When this happens
the timer does not get re-enabled, which prevents the port resume from
finishing until some other event occurs.

The symptom is that when a new device is plugged in, it doesn't get
recognized or enumerated until lsusb is run or something else happens.

The solution is to re-enable the root-hub status timer after every
status poll while a port resume is in progress.

This bug hasn't surfaced before now because we never used to try to
suspend the root hub in the middle of a port resume (except by
coincidence).

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-and-tested-by: Norbert Preining <preining@logic.at>
Tested-by: Ming Lei <ming.lei@canonical.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 15:06:01 -08:00
Alan Stern 840008bb51 USB: UHCI: notify usbcore about port resumes
This patch (as1651) adds calls to the new
usb_hcd_{start,end}_port_resume() functions to uhci-hcd.  Now UHCI
root hubs won't be runtime suspended while they are sending a resume
signal to one of their ports.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 15:06:01 -08:00
Alan Stern f292e7f9fb USB: EHCI: notify usbcore about port resumes
This patch (as1650) adds calls to the new
usb_hcd_{start,end}_port_resume() functions to ehci-hcd.  Now EHCI
root hubs won't be runtime suspended while they are sending a resume
signal to one of their ports.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 15:06:01 -08:00
Alan Stern da0aa7169b USB: add usb_hcd_{start,end}_port_resume
This patch (as1649) adds a mechanism for host controller drivers to
inform usbcore when they have begun or ended resume signalling on a
particular root-hub port.  The core will then make sure that the root
hub does not get runtime-suspended while the port resume is going on.

Since commit 596d789a21 (USB: set hub's
default autosuspend delay as 0), the system tries to suspend hubs
whenever they aren't in use.  While a root-hub port is being resumed,
the root hub does not appear to be in use.  Attempted runtime suspends
fail because of the ongoing port resume, but the PM core just keeps on
trying over and over again.  We want to prevent this wasteful effort.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 15:06:01 -08:00
Alan Stern 6e0c3339a6 USB: EHCI: unlink one async QH at a time
This patch (as1648) fixes a regression affecting nVidia EHCI
controllers.  Evidently they don't like to have more than one async QH
unlinked at a time.  I can't imagine how they manage to mess it up,
but at least one of them does.

The patch changes the async unlink logic in two ways:

	Each time an IAA cycle is started, only the first QH on the
	async unlink list is handled (rather than all of them).

	Async QHs do not all get unlinked as soon as they have been
	empty for long enough.  Instead, only the last one (i.e., the
	one that has been on the schedule the longest) is unlinked,
	and then only if no other unlinks are in progress at the time.

This means that when multiple QHs are empty, they won't be unlinked as
quickly as before.  That's okay; it won't affect correct operation of
the driver or add an excessive load.  Multiple unlinks tend to be
relatively rare in any case.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-and-tested-by: Piergiorgio Sartor <piergiorgio.sartor@nexgo.de>
Cc: stable <stable@vger.kernel.org> # 3.6
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 13:58:20 -08:00
Alan Stern 55bcdce8a8 USB: EHCI: remove ASS/PSS polling timeout
This patch (as1647) attempts to work around a problem that seems to
affect some nVidia EHCI controllers.  They sometimes take a very long
time to turn off their async or periodic schedules.  I don't know if
this is a result of other problems, but in any case it seems wise not
to depend on schedule enables or disables taking effect in any
specific length of time.

The patch removes the existing 20-ms timeout for enabling and
disabling the schedules.  The driver will now continue to poll the
schedule state at 1-ms intervals until the controller finally decides
to obey the most recent command issued by the driver.  Just in case
this hides a problem, a debugging message will be logged if the
controller takes longer than 20 polls.

I don't know if this will actually fix anything, but it can't hurt.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Piergiorgio Sartor <piergiorgio.sartor@nexgo.de>
CC: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 13:58:20 -08:00
Greg Kroah-Hartman 67635d397a Merge 3.8-rc5 into usb-next
This fixes up a conflict with drivers/usb/serial/io_ti.c that came up in
linux-next.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 12:41:02 -08:00
Lan Tianyu 192fef18d0 usb: enable usb port device's async suspend.
This patch is to set power.async_suspend for usb port in order
to allow it to be suspended and resumed asynchronously during
system sleep transitions.

The power.async_suspend flag is also set for devices that don't have
suspend or resume callbacks, because otherwise they would make the
main suspend/resume thread wait for their "asynchronous" children
(during suspend) or parents (during resume), effectively negating the
possible gains from executing these devices' suspend and resume
callbacks asynchronously.

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 10:14:20 -08:00
Lan Tianyu f6cced1a08 usb: expose usb port's pm qos flags to user space
This patch is to expose usb port's pm qos flags(pm_qos_no_power_off,
pm_qos_remote_wakeup) to user space. User can set pm_qos_no_power_off
flag to prohibit the port from being powered off.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 10:14:20 -08:00
Lan Tianyu ad493e5e58 usb: add usb port auto power off mechanism
This patch is to add usb port auto power off mechanism.
When usb device is suspending, usb core will suspend usb port and
usb port runtime pm callback will clear PORT_POWER feature to
power off port if all conditions were met. These conditions are
remote wakeup disable, pm qos NO_POWER_OFF flag clear and persist
enable. When it resumes, power on port again.

Add did_runtime_put in the struct usb_port to ensure
pm_runtime_get/put(portdev) to be called pairedly.  Set did_runtime_put
to true when call pm_runtime_put(portdev) during suspending. The
pm_runtime_get(portdev) only will be called when did_runtime_put
is set to true during resuming. Set did_runtime_put to false after
calling pm_runtime_get(portdev).

Make clear_port_feature() and hdev_to_hub() as global symbol.
Rename clear_port_feature() to usb_clear_port_feature() and
hdev_to_hub() to usb_hub_to_struct_hub().

Extend hub_port_debounce() with the fuction of debouncing to
be connected. Add two wraps: hub_port_debounce_be_connected()
and hub_port_debouce_be_stable().

Increase HUB_DEBOUNCE_TIMEOUT to 2000 because some usb ssds
needs around 1.5 or more to make the hub port status to be
connected steadily after being powered off and powered on.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 10:14:20 -08:00
Lan Tianyu 971fcd492c usb: add runtime pm support for usb port device
This patch is to add runtime pm callback for usb port device.
Set/clear PORT_POWER feature in the resume/suspend callback.
Add portnum for struct usb_port to record port number. Do
pm_rumtime_get_sync/put(portdev) when a device is plugged/unplugged
to prevent it from being powered off when it is active.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 10:12:19 -08:00
Lan Tianyu 88bb965ed7 usb: Register usb port's acpi power resources
This patch is to register usb port's acpi power resources. Create
link between usb port device and its acpi power resource.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 10:07:59 -08:00
Gerd Hoffmann bde027b456 usb-uas: set max_lun and max_channel
256 luns is what the sam-4 address method 0 can handle and what
the qemu uas emulation supports.  So pick that for now.

[ v2: unlike the other two max_* fields max_channel isn't max+1 ]

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 09:56:54 -08:00
Frans Klaver 59e931c47f usb: add driver for xsens motion trackers
Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 09:56:54 -08:00
Dongjin Kim 8ab03dd48a USB: misc: usb3503: Fix compiler warning
This patch fixes the compiler warning of uninitialized variable.

drivers/usb/misc/usb3503.c: In function ‘usb3503_probe’:
drivers/usb/misc/usb3503.c:215:13: warning: ‘mode’ may be used uninitialized
in this function [-Wuninitialized]

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 09:56:54 -08:00
Greg Kroah-Hartman 4811f53fad usb: xceiv: patches for v3.9 merge window
Two new PHY drivers coming here: one for Samsung,
 one for OMAP. Both architectures are adding USB3
 support to mainline kernel.
 
 The PHY layer now allows us to have mulitple PHYs
 of the same type, which is necessary for platforms
 which provide more than one USB peripheral port.
 
 There's also a few cleanups here: removal of __dev*
 annotations, conversion of a cast to to_delayed_work(),
 and mxs-phy learns about ->set_suspend.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRAqlWAAoJEIaOsuA1yqREo+0P/AnevihQnUfh1WlICZeHvQMR
 +XwSZGVlZYMTiThFldDOsV0ZpngMWW7y7iNc/YjCTyYr1skRjdYahRAc9YZtz2aR
 2aIdIbdt6gS4wthPhMUGdeGlGuXngmrFCKeo7xD8RQQgeJecGqrD/y629fAfnq0Z
 /bCOq+BKj3R9oLOVKtBCOE+j4KQKJSDkywz4GRaZ5yyOmn55Ci/FNJH6EAoGQC5Q
 D1j+PyhlVpqW/XESn9ceRdXIG9i4a9b3PwKFNbO3iCfaLh5JGTW67pTZ+A7+XNcz
 iT3+WibsZIAF6ya/Eu/1NcBgj8an6rhuRN/Nu7GTIOxwZNuKbqpYfuOXf1/StTiJ
 rwmPQ4mh3PzqbLSfe4+H3SIkj8IZCh6NuPiREAwge2HGxOSY7FSIdQSGV6jOqa7F
 7Qi3K9aFMqJYAkhEelPfNtZZhK1fVlQTn+t/q4Zr7r593xpV1Ur73Kn3EwGDBcM3
 5hyKo9DC1Gr1KXtf1B/hzojnMWqmT5BxJhFBSsw7Nj1F0fUaA3G15+vkanvUSWRV
 /wP8pjZD44T/bguion7LSdscX98S4fCTJSf571UYymmVGKejfpYI0wRWearVbrhm
 cwdONVyIt0EFqX2gd2pthx2SBTTOEetb5ssqSKXRBCTDiApjdAPdejVGk3iblw7C
 LOydELt71ER/o2RNVR+h
 =c796
 -----END PGP SIGNATURE-----

Merge tag 'xceiv-for-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next

Felipe writes:
	usb: xceiv: patches for v3.9 merge window

	Two new PHY drivers coming here: one for Samsung,
	one for OMAP. Both architectures are adding USB3
	support to mainline kernel.

	The PHY layer now allows us to have mulitple PHYs
	of the same type, which is necessary for platforms
	which provide more than one USB peripheral port.

	There's also a few cleanups here: removal of __dev*
	annotations, conversion of a cast to to_delayed_work(),
	and mxs-phy learns about ->set_suspend.
2013-01-25 09:09:46 -08:00
Greg Kroah-Hartman cba6c85027 usb: gadget: patches for v3.9 merge window
finally getting rid of the old ->start()/->stop() methods
 in favor of the better and improved ->udc_start()/->udc_stop().
 
 There were surprisingly quite a few users left, but all of them
 have been converted.
 
 f_mass_storage removed some dead code, which is always great ;-)
 
 There's also a big cleanup to the gadget framework from Sebastian
 which gets us a lot closer to having only function drivers in
 kernel and move over to configfs-based binding.
 
 Other than these, there's the usual set of cleanups: s3c UDCs are
 moving over to devm_regulator_bulk_get() API, at91_udc removed
 an unnecessary check for work_pending() before scheduling and
 there's the removal of an unused variable from uac2_pcm_trigger().
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRAqbFAAoJEIaOsuA1yqREkXsQAInuD5h4OE4gMQSFWJbYY+it
 BWN3JAIxm5NTKD9cez7d0vQ45v+9qDygBpHP4lsGGjhI0tkOr+nQ/g/sfSi3xbHM
 HQ6/z7Y68pNz9k57ans9NfIt0AuIsHE79tlOx3g+QVvryLHmQSAUzk9ru0VUHw4D
 rSI3Czk3yCA4UnRITxJYpsnmEAZw/M7DwyMANqdNFzZaruMB77phsCWGIM2O0h1T
 lw3sgcBoFcvYodWCzi90NWMA8FccQLMxBg6G+7ViaqGvAPqSuYwNTHJxxUwPHdbI
 o28gQY7gkxZY9MwbnFZ+7jSbpcmzRpYtpgBflubf4iAkv+197lG6I5XyVgfdEZSF
 AF3qi7asrXX/jjFoXASpmphBdCazz6G9bTmtdT3RpV3MKC6fnS1tXImBgreveIWh
 sjhPQCleCCZI2+KLpVOujk3kUVHc9aJ5zbqcNLu03Ux1qqqK0VlZ9bahtip6HQ8H
 GYhEdOmgIAe83CcJeWBdWAoz2c7fzEEvCj+TxxbyB7nE8TRsOYooKrBcfEM1plVy
 qWcXULlhTdD4aWpQLanL8XSamKFvyDk+lEn4803of0eaVpE9gUxKi0fwD+j6UOMV
 iBa7mEx5zIym7gJI4+SlvXIn8fPHfcHGX4BPLASd+G4ndkLIPc2wAb/KqVyIUCXt
 I5K8UNYb0DiuQtxKXg8R
 =PCP4
 -----END PGP SIGNATURE-----

Merge tag 'gadget-for-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next

Felipe writes:
	usb: gadget: patches for v3.9 merge window

	finally getting rid of the old ->start()/->stop() methods
	in favor of the better and improved ->udc_start()/->udc_stop().

	There were surprisingly quite a few users left, but all of them
	have been converted.

	f_mass_storage removed some dead code, which is always great ;-)

	There's also a big cleanup to the gadget framework from Sebastian
	which gets us a lot closer to having only function drivers in
	kernel and move over to configfs-based binding.

	Other than these, there's the usual set of cleanups: s3c UDCs are
	moving over to devm_regulator_bulk_get() API, at91_udc removed
	an unnecessary check for work_pending() before scheduling and
	there's the removal of an unused variable from uac2_pcm_trigger().
2013-01-25 09:08:05 -08:00
Greg Kroah-Hartman a9b8676c17 usb: dwc3: patches for v3.9 merge window
We're saving some extra memory now by being a lot
 more conservative when allocating our event buffers.
 
 Our default HIRD threshold value was mistakenly set
 as one of the unsupported which would cause undefined
 behavior. Turns out that it broke OMAP5 ES2.0, so we're
 fixing it now by setting the maximum allowed HIRD
 threshold (12).
 
 Quite a few fixes to Isochronous transfers and scatter/gather
 support from Pratyush.
 
 We're also starting to support devicetree-based probe with
 the latest changes from Kishon.
 
 The usual set of cleanups also available: converting debugfs
 regdump utility to regsets, better "compatible" strings for
 Exynos platforms and the removal of the dependency for
 Host and Gadget; now dwc3 can be compiled host-only, device-only,
 and/or Dual-Role.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRAqfLAAoJEIaOsuA1yqRExJ4P/jzWWpIos3bDSvWyzyP/HbL+
 3EQ+jfERFsZRtpuZ/V/YAsiGkA3SAKSnougMKFHjsiX835KSLNKcaYAz4uaeg2ki
 CtrrZF59NvLefiAL7aE/vILllHPPMwt3l8ojiDhpGghvQjYVKD9EYd3A1lYW4kpI
 u/nXoJIs3++DcTmgIAfhaqYZnSEoO1rhoPYUGaJRBGlO3YYD6UiT//LhAnGIGSDM
 ZZW69feoCogqUxSx6x4cbhV9W/FD3jKxO8Cn/3poyag8Ou+91lhbAL+7EZm+WnZ5
 0+aslV9LYAzRJBBT/dvoD/3hwXNRS7/0L/OcYjrhqnUoQReWZppHQO1mFBgf/gOk
 bool4uIH8sNvmsDqh8Lm9pzG101vnOHSKr15e2fH+h8Z2nM8cNsKCIvP7JZ1Tnyf
 cehXGkE5PSEm0ViRQxqjbdRpqNlNp03wshh5J1HWiToTf0wxFGhgmOdxIquwO7cR
 eBVFz2zQexyiMW0Plr0GBtjDm3LaojzvK1YEjHTesMdWx/yVXaLLu38Qv05sG7Nd
 g4tRJOLrem03eqvv0zFbtGEPziilb/p7o699AHtiDJk330SHZUDvcoTQrIlXqsy1
 nPBdjrOauZRRYYmhzS2I9RE8e4tj02uwb3mNyiHFdomZLTXS47fn3SrK/mL+iU6K
 gpzStpT3xlvyzfHdP7of
 =JJ6/
 -----END PGP SIGNATURE-----

Merge tag 'dwc3-for-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next

Felipe writes:
	usb: dwc3: patches for v3.9 merge window

	We're saving some extra memory now by being a lot
	more conservative when allocating our event buffers.

	Our default HIRD threshold value was mistakenly set
	as one of the unsupported which would cause undefined
	behavior. Turns out that it broke OMAP5 ES2.0, so we're
	fixing it now by setting the maximum allowed HIRD
	threshold (12).

	Quite a few fixes to Isochronous transfers and scatter/gather
	support from Pratyush.

	We're also starting to support devicetree-based probe with
	the latest changes from Kishon.

	The usual set of cleanups also available: converting debugfs
	regdump utility to regsets, better "compatible" strings for
	Exynos platforms and the removal of the dependency for
	Host and Gadget; now dwc3 can be compiled host-only, device-only,
	and/or Dual-Role.
2013-01-25 09:02:26 -08:00
Greg Kroah-Hartman 468234984f usb: musb: patches for v3.9 merge window
Mostly fixes all over which weren't urgent enough for
 the late -rc cycle.
 
 There is a Double Buffering fix for Host Mode TX,
 a dependency fix for the transceiver driver, some
 fixes to the error path and a fix for the use of
 omap_musb_maibox.
 
 Other than these fixes, there a removal duplicate
 headers from the dsps glue layer and removal of
 redundant assignments in omap2430_probe().
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRAqSpAAoJEIaOsuA1yqRE1VEQALCzApuKqj5V3VV3kVQLVdUc
 Sk6i/EJRxebcV6TjHOqbojISNUURAAGbBx7PSzdFFbZT54jaj0qdZgvUaAhEOQk8
 FiJJt1u8qdFoz0MRfHX32HWh3L7M62PXZeDjcAxDE7+1bg/xBqUm1sc3VEq63Qd7
 nyq+h7Ov7AxF19gVm5LLjal1qc5BQsUB5Cx2bYOrpnceW7LPCSaJmWQEqP6o97Yi
 6seSp4Q4GW5TK7WEKXW8pwLYXxr/1X84dOg+OWcTct3kGrg98rhVfwBBYEbSQI/6
 UccWWn65sufym0Gj/CWd6mgTiOdjbBw70P+j3qX+/eZhuv37hNKTaLPTzZhkGyRP
 +pTs/ROEDGnM3BEMxT3jzg2qFR4F3rU7OP3fa4kuf1iGdbnoJbJV8jI9PElZmI5F
 bxN0F1v0+7QJUlJ4IcQhTlcT7GYsP+UZDbax18AMApsWqE5TbBtDqPhhHKGfWCkd
 FnfGTZP8onKjnIan4kdh4usLSzE5+OPCklRAyQQNorZw6t3mgBU3Lr811kXGtg6J
 GMzvXVQ6QZo5aVxWq3dJ39AQTp/Lrs4QFJRzmt0Krdwm9ND5HbnNSJUPntoeztOx
 D3GCLbyUmJ/eDY1wk6TZTx3pMdXVy94NdGf/ZRZyST1k/QX5JNU7EfLDqrvQS6Yp
 mW+nVB7gAOXWzaYir9KL
 =dDY3
 -----END PGP SIGNATURE-----

Merge tag 'musb-for-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next

Felipe writes:
	usb: musb: patches for v3.9 merge window

	Mostly fixes all over which weren't urgent enough for
	the late -rc cycle.

	There is a Double Buffering fix for Host Mode TX,
	a dependency fix for the transceiver driver, some
	fixes to the error path and a fix for the use of
	omap_musb_maibox.

	Other than these fixes, there a removal duplicate
	headers from the dsps glue layer and removal of
	redundant assignments in omap2430_probe().
2013-01-25 09:00:42 -08:00
Vivek Gautam 52758bcb7c usb: dwc3: host: Change platform device ID for xhci-hcd to AUTO
Multiple dwc3 controllers will try to allocate multiple xhci-hcd
interfaces.
Changing platform device IDs from NONE to AUTO to support
such cases.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 13:19:52 +02:00
Vivek Gautam b0e45ddb96 usb: dwc3: exynos/omap: Change platform device IDs for no_op_xceive to AUTO
Multiple dwc3 probe calls try to allocate no_op_xceive platform
device. Having static IDs for these will throw sysfs error -EEXIST.
Changing these static platform device IDs to AUTO to enable
multiple dwc3 controller support on a SoC.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 13:19:50 +02:00
Kishon Vijay Abraham I 5088b6f5bc usb: dwc3: core: add dt support for dwc3 core
Added dt support for dwc3 core and update the documentation with
device tree binding information. Getting a PHY is now done using
devm_usb_get_phy_by_phandle() for dt boot.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 13:17:54 +02:00
Kishon Vijay Abraham I 0c4c8bbbfd usb: phy: omap-usb2: enable 960Mhz clock for omap5
"usb_otg_ss_refclk960m" is needed for usb2 phy present in omap5. For
omap4, the clk_get of this clock will fail since it does not have this
clock.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 13:03:10 +02:00
Kishon Vijay Abraham I b16604f2c1 usb: musb: omap: get phy by phandle for dt boot
The OMAP glue has been modified to get PHY by phandle
for dt boot.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 13:03:10 +02:00
Kishon Vijay Abraham I c11747f6ce usb: musb: omap: make use of the new PHY lib APIs
New PHY lib APIs like usb_add_phy_dev() and devm_usb_get_phy_dev() are
used in MUSB (OMAP), in order to make use of the binding information
provided in the board file (of OMAP platforms).

All the platforms should be modified similar to this to add and get the
PHY.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 13:03:09 +02:00
Kishon Vijay Abraham I 57f6ce072e usb: phy: add a new driver for usb3 phy
Added a driver for usb3 phy that handles the interaction between usb phy
device and dwc3 controller.

This also includes device tree support for usb3 phy driver and
the documentation with device tree binding information is updated.

Currently writing to control module register is taken care in this
driver which will be removed once the control module driver is in place.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-25 13:02:50 +02:00