Commit Graph

7511 Commits

Author SHA1 Message Date
Greg Kroah-Hartman 71919403dc Revert "powerpc/usb: fix issue of CPU halt when missing USB PHY clock"
This reverts commit 529febeee6.

To quote Dirk:
	This commit introduces a check for the USB PHY clock.
	Problem is that CTRL_PHY_CLK_VALID bit seems not to be present
	on all Freescale ehci implementations, at least P1022 does not
	have it.  So this check always fails and the driver never gets
	loaded.

So we need to revert this patch.

Reported-by: Dirk Eibach <Eibach@gdsys.de>
Cc: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-02 16:08:54 -08:00
Bruno Thomsen c6c1e4491d USB: Added Kamstrup VID/PIDs to cp210x serial driver.
Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-21 16:29:15 -08:00
Andrew Lunn 7fd25702ba USB: Serial: ti_usb_3410_5052: Add Abbot Diabetes Care cable id
This USB-serial cable with mini stereo jack enumerates as:
Bus 001 Device 004: ID 1a61:3410 Abbott Diabetes Care

It is a TI3410 inside.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-21 16:29:15 -08:00
Alan Stern bb94a40668 usb-storage: fix freezing of the scanning thread
This patch (as1521b) fixes the interaction between usb-storage's
scanning thread and the freezer.  The current implementation has a
race: If the device is unplugged shortly after being plugged in and
just as a system sleep begins, the scanning thread may get frozen
before the khubd task.  Khubd won't be able to freeze until the
disconnect processing is complete, and the disconnect processing can't
proceed until the scanning thread finishes, so the sleep transition
will fail.

The implementation in the 3.2 kernel suffers from an additional
problem.  There the scanning thread calls set_freezable_with_signal(),
and the signals sent by the freezer will mess up the thread's I/O
delays, which are all interruptible.

The solution to both problems is the same: Replace the kernel thread
used for scanning with a delayed-work routine on the system freezable
work queue.  Freezable work queues have the nice property that you can
cancel a work item even while the work queue is frozen, and no signals
are needed.

The 3.2 version of this patch solves the problem in Bugzilla #42730.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
CC: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-21 16:29:15 -08:00
Sarah Sharp 340a3504fd xhci: Fix encoding for HS bulk/control NAK rate.
The xHCI 0.96 spec says that HS bulk and control endpoint NAK rate must
be encoded as an exponent of two number of microframes.  The endpoint
descriptor has the NAK rate encoded in number of microframes.  We were
just copying the value from the endpoint descriptor into the endpoint
context interval field, which was not correct.  This lead to the VIA
host rejecting the add of a bulk OUT endpoint from any USB 2.0 mass
storage device.

The fix is to use the correct encoding.  Refactor the code to convert
number of frames to an exponential number of microframes, and make sure
we convert the number of microframes in HS bulk and control endpoints to
an exponent.

This should be back ported to kernels as old as 2.6.31, that contain the
commit dfa49c4ad1 "USB: xhci - fix math
in xhci_get_endpoint_interval"

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Tested-by: Felipe Contreras <felipe.contreras@gmail.com>
Suggested-by: Andiry Xu <andiry.xu@amd.com>
Cc: stable@vger.kernel.org
2012-02-21 15:48:46 -08:00
Elric Fu a45aa3b305 USB: Set hub depth after USB3 hub reset
The superspeed device attached to a USB 3.0 hub(such as VIA's)
doesn't respond the address device command after resume. The
root cause is the superspeed hub will miss the Hub Depth value
that is used as an offset into the route string to locate the
bits it uses to determine the downstream port number after
reset, and all packets can't be routed to the device attached
to the superspeed hub.

Hub driver sends a Set Hub Depth request to the superspeed hub
except for USB 3.0 root hub when the hub is initialized and
doesn't send the request again after reset due to the resume
process. So moving the code that sends the Set Hub Depth request
to the superspeed hub from hub_configure() to hub_activate()
is to cover those situations include initialization and reset.

The patch should be backported to kernels as old as 2.6.39.

Signed-off-by: Elric Fu <elricfu1@gmail.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable@vger.kernel.org
2012-02-21 15:45:25 -08:00
Sarah Sharp cab928ee1f USB: Fix handoff when BIOS disables host PCI device.
On some systems with an Intel Panther Point xHCI host controller, the
BIOS disables the xHCI PCI device during boot, and switches the xHCI
ports over to EHCI.  This allows the BIOS to access USB devices without
having xHCI support.

The downside is that the xHCI BIOS handoff mechanism will fail because
memory mapped I/O is not enabled for the disabled PCI device.
Jesse Barnes says this is expected behavior.  The PCI core will enable
BARs before quirks run, but it will leave it in an undefined state, and
it may not have memory mapped I/O enabled.

Make the generic USB quirk handler call pci_enable_device() to re-enable
MMIO, and call pci_disable_device() once the host-specific BIOS handoff
is finished.  This will balance the ref counts in the PCI core.  When
the PCI probe function is called, usb_hcd_pci_probe() will call
pci_enable_device() again.

This should be back ported to kernels as old as 2.6.31.  That was the
first kernel with xHCI support, and no one has complained about BIOS
handoffs failing due to memory mapped I/O being disabled on other hosts
(EHCI, UHCI, or OHCI).

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Acked-by: Oliver Neukum <oneukum@suse.de>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: stable@vger.kernel.org
2012-02-21 15:45:08 -08:00
li.rui27@zte.com.cn b9e44fe5ec USB: option: cleanup zte 3g-dongle's pid in option.c
1. Remove all old mass-storage ids's pid:
     0x0026,0x0053,0x0098,0x0099,0x0149,0x0150,0x0160;
  2. As the pid from 0x1401 to 0x1510 which have not surely assigned to
     use for serial-port or mass-storage port,so i think it should be
     removed now, and will re-add after it have assigned in future;
  3. sort the pid to WCDMA and CDMA.

Signed-off-by: Rui li <li.rui27@zte.com.cn>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-14 15:08:40 -08:00
Sarah Sharp 68d07f64b8 USB: Don't fail USB3 probe on missing legacy PCI IRQ.
Intel has a PCI USB xhci host controller on a new platform. It doesn't
have a line IRQ definition in BIOS.  The Linux driver refuses to
initialize this controller, but Windows works well because it only depends
on MSI.

Actually, Linux also can work for MSI.  This patch avoids the line IRQ
checking for USB3 HCDs in usb core PCI probe.  It allows the xHCI driver
to try to enable MSI or MSI-X first.  It will fail the probe if MSI
enabling failed and there's no legacy PCI IRQ.

This patch should be backported to kernels as old as 2.6.32.

Signed-off-by: Alex Shi <alex.shi@intel.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
2012-02-14 10:48:05 -08:00
Sarah Sharp 3278a55a1a xhci: Fix oops caused by more USB2 ports than USB3 ports.
The code to set the device removable bits in the USB 2.0 roothub
descriptor was accidentally looking at the USB 3.0 port registers
instead of the USB 2.0 registers.  This can cause an oops if there are
more USB 2.0 registers than USB 3.0 registers.

This should be backported to kernels as old as 2.6.39, that contain the
commit 4bbb0ace9a "xhci: Return a USB 3.0
hub descriptor for USB3 roothub."

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
2012-02-10 14:24:32 -08:00
Milan Kocian 90451e6973 USB: usbserial: add new PID number (0xa951) to the ftdi driver
Signed-off-by: Milan Kocian <milon@wq.cz>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-03 11:22:44 -08:00
Greg Kroah-Hartman 8739348391 Few fixes for 3.3-rc3, nothing major. Mostly build fixes
introduced recently.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPK5m8AAoJEIaOsuA1yqREAVwQAKW/4n3XNudLEkAJOXp4CuAI
 bUmXHWb52JZbfomT9EOK3GvWz/n353BE+O/IklD+alcsK4uufLZilKJ9D/Z6KujP
 YdSu4NWi+TBkA7EP2aIRUzfvZGY+mzLuk/EpXv9Tun7H8dl0xMrxadJ4+v7/fZX+
 OvJDLqlUIqbKtgXMt6AVS2dhy6AfdjcadFWCzYCVYZ6LYBcI50k5ZazxjJmftnfN
 bK7AnuFPF0jG/aGd3mw+tlzJM53LJWCfb1LamfenDMdBufTcKWBIB5n+7FNbA74j
 CTczgV9q7O/aPe7/a11l/Z8Yz1RD6r7G2yM9e5UYNxwN6xxRJZ397eGaScU/cyV3
 GZkJRFS0r758bzR9hp5uBKyEA8erjbguGwNfxsEEG44P3UAy8E/nsxNa/lgY0nUo
 8jISIJ/Mm6wsCKKxI/cepDLRvG4K68dTc8ZpWvOaJXof7xnGpeAvUvppX+pkoNRl
 T2WeZm/3AMWrFvvJbmffbE4Ak/u4L4mcDzxWaRCrD0uEBMzN+accDGtOTcQ5plGz
 SECpSVTGGQSGJ0r3vBR2vlC9fAl+MiDy0jQtf0ExxZEMLuld6HRVlWwlzCo60eWZ
 Mmb1LMgQ0jhQoFfV33eJ5CkSPpPu2GXx8M0BRCydZem+js6X+HiXnO/GbzaehkBl
 T2E/yLOo9AIRPeJ6YpQs
 =srlB
 -----END PGP SIGNATURE-----

Merge tag 'for-3.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus

Few fixes for 3.3-rc3, nothing major. Mostly build fixes
introduced recently.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-03 11:15:23 -08:00
Cong Wang 976d98cb72 usb: musb: fix a build error on mips
On mips, we got:

drivers/usb/musb/musb_io.h:44: error: conflicting types for 'readsl'
arch/mips/include/asm/io.h:529: error: previous definition of 'readsl' was here
drivers/usb/musb/musb_io.h:46: error: conflicting types for 'readsw'
arch/mips/include/asm/io.h:528: error: previous definition of 'readsw' was here
drivers/usb/musb/musb_io.h:48: error: conflicting types for 'readsb'

so, should add !defined(CONFIG_MIPS) too.

Cc: Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-03 09:29:13 +02:00
Randy Dunlap 36f8ecbf71 uwb & wusb & usb wireless controllers: fix kconfig error & build errors
Fix kconfig warnings and build errors in UWB/WUSB/USB_HWA etc.
by making all of these related symbols depend on UWB.

warning: (USB_WHCI_HCD && USB_HWA_HCD) selects USB_WUSB which has unmet direct dependencies (USB_SUPPORT && EXPERIMENTAL && USB && PCI && UWB)
warning: (USB_HWA_HCD) selects UWB_HWA which has unmet direct dependencies (UWB && USB)

which lead to:

ERROR: "uwb_rsv_establish" [drivers/usb/wusbcore/wusbcore.ko] undefined!
ERROR: "uwb_pal_register" [drivers/usb/wusbcore/wusbcore.ko] undefined!
ERROR: "uwb_rsv_get_usable_mas" [drivers/usb/wusbcore/wusbcore.ko] undefined!
ERROR: "uwb_rsv_destroy" [drivers/usb/wusbcore/wusbcore.ko] undefined!
ERROR: "uwb_radio_stop" [drivers/usb/wusbcore/wusbcore.ko] undefined!
ERROR: "uwb_rsv_terminate" [drivers/usb/wusbcore/wusbcore.ko] undefined!
ERROR: "uwb_pal_unregister" [drivers/usb/wusbcore/wusbcore.ko] undefined!
ERROR: "uwb_pal_init" [drivers/usb/wusbcore/wusbcore.ko] undefined!
ERROR: "uwb_rc_reset_all" [drivers/usb/wusbcore/wusbcore.ko] undefined!
ERROR: "uwb_radio_start" [drivers/usb/wusbcore/wusbcore.ko] undefined!
ERROR: "uwb_rsv_create" [drivers/usb/wusbcore/wusbcore.ko] undefined!
ERROR: "uwb_rc_put" [drivers/usb/host/whci/whci-hcd.ko] undefined!
ERROR: "uwb_rc_get_by_grandpa" [drivers/usb/host/whci/whci-hcd.ko] undefined!
ERROR: "__umc_driver_register" [drivers/usb/host/whci/whci-hcd.ko] undefined!
ERROR: "umc_driver_unregister" [drivers/usb/host/whci/whci-hcd.ko] undefined!
ERROR: "whci_wait_for" [drivers/usb/host/whci/whci-hcd.ko] undefined!
ERROR: "uwb_rc_get_by_grandpa" [drivers/usb/host/hwa-hc.ko] undefined!
ERROR: "uwb_rc_put" [drivers/usb/host/hwa-hc.ko] undefined!

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-02 12:46:36 -08:00
Jayachandran C e4436a7c17 usb: Skip PCI USB quirk handling for Netlogic XLP
The Netlogic XLP SoC's on-chip USB controller appears as a PCI
USB device, but does not need the EHCI/OHCI handoff done in
usb/host/pci-quirks.c.

The pci-quirks.c is enabled for all vendors and devices, and is
enabled if USB and PCI are configured.

If we do not skip the qurik handling on XLP, the readb() call in
ehci_bios_handoff() will cause a crash since byte access is not
supported for EHCI registers in XLP.

Signed-off-by: Jayachandran C <jayachandranc@netlogicmicro.com>
Cc: stable <stable@vger.kernel.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-02 12:46:36 -08:00
Shengzhou Liu 529febeee6 powerpc/usb: fix issue of CPU halt when missing USB PHY clock
when missing USB PHY clock, kernel booting up will halt during USB
initialization. We should check USBGP[PHY_CLK_VALID] bit to avoid
CPU hang in this case.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-02 12:46:36 -08:00
Neil Zhang ed2833ac7e usb: otg: mv_otg: Add dependence
This otg driver depends on marvell EHCI driver, so add the dependence.
It can fix the following build error on i386:

ERROR: "usb_remove_hcd" [drivers/usb/otg/mv_otg.ko] undefined!
ERROR: "usb_add_hcd" [drivers/usb/otg/mv_otg.ko] undefined!

Signed-off-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-02 12:46:35 -08:00
Fabio Estevam c0ca9bc508 usb: host: Distinguish Kconfig text for Freescale controllers
Distinguish Kconfig text by providing the Freescale family name.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-02 12:46:35 -08:00
Rui li 1608ea5f4b USB: add new zte 3g-dongle's pid to option.c
As ZTE have and will use more pid for new products this year,
so we need to add some new zte 3g-dongle's pid on option.c ,
and delete one pid 0x0154 because it use for mass-storage port.

Signed-off-by: Rui li <li.rui27@zte.com.cn>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-01 16:06:52 -08:00
Thomas Tuttle 0a365706f2 USB: qcserial: don't enable autosuspend
We've found that qcserial devices will not always wake up reliably
from autosuspend, so disable it.

Signed-off-by: Thomas Tuttle <ttuttle@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-02-01 15:56:18 -08:00
Thomas Tuttle 2db4d87070 USB: qcserial: add several new serial devices
Signed-off-by: Thomas Tuttle <ttuttle@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-02-01 15:56:18 -08:00
Linus Torvalds 6bc2b95ee6 Here are a bunch of USB patches for 3.3-rc1.
Nothing major, largest thing here is the removal of some drivers that
 did not work at all.  Other than that, the normal collection of bugfixes
 and new device ids.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iEYEABECAAYFAk8m8JEACgkQMUfUDdst+ymCFQCeNhTHopHy1PQbuCDwk8bSH4DW
 1/YAn2k0YaaCrOo0HCzOslAVX18vGnWl
 =TNNB
 -----END PGP SIGNATURE-----

Merge tag 'usb-3.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Here are a bunch of USB patches for 3.3-rc1.

Nothing major, largest thing here is the removal of some drivers that
did not work at all.  Other than that, the normal collection of bugfixes
and new device ids.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

* tag 'usb-3.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (52 commits)
  uwb & wusb: fix kconfig error
  USB: Realtek cr: fix autopm scheduling while atomic
  USB: ftdi_sio: Add more identifiers
  xHCI: Cleanup isoc transfer ring when TD length mismatch found
  usb: musb: omap2430: minor cleanups.
  qcaux: add more Pantech UML190 and UML290 ports
  Revert "drivers: usb: Fix dependency for USB_HWA_HCD"
  usb: mv-otg - Fix build if CONFIG_USB is not set
  USB: cdc-wdm: Avoid hanging on interface with no USB_CDC_DMM_TYPE
  usb: add support for STA2X11 host driver
  drivers: usb: Fix dependency for USB_HWA_HCD
  kernel-doc: fix new warning in usb.h
  USB: OHCI: fix new compiler warnings
  usb: serial: kobil_sct: fix compile warning:
  drivers/usb/host/ehci-fsl.c: add missing iounmap
  USB: cdc-wdm: better allocate a buffer that is at least as big as we tell the USB core
  USB: cdc-wdm: call wake_up_all to allow driver to shutdown on device removal
  USB: cdc-wdm: use two mutexes to allow simultaneous read and write
  USB: cdc-wdm: updating desc->length must be protected by spin_lock
  USB: usbsevseg: fix max length
  ...
2012-01-30 11:38:28 -08:00
Neil Zhang aa3e8b4e71 usb: otg: mv_otg: Add dependence
This otg driver depends on marvell EHCI driver, so add the dependence.
It can fix the following build error on i386:

ERROR: "usb_remove_hcd" [drivers/usb/otg/mv_otg.ko] undefined!
ERROR: "usb_add_hcd" [drivers/usb/otg/mv_otg.ko] undefined!

Signed-off-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-01-30 11:13:56 +02:00
Timo Juhani Lindfors 683da59d7b usb: gadget: zero: fix bug in loopback autoresume handling
ab943a2e12 (USB: gadget: gadget zero uses new suspend/resume hooks)
introduced a copy-paste error where f_loopback.c writes to a variable
declared in f_sourcesink.c. This prevents one from creating gadgets
that only have a loopback function.

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Timo Juhani Lindfors <timo.lindfors@iki.fi>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-01-30 11:10:20 +02:00
Randy Dunlap a0701f0484 uwb & wusb: fix kconfig error
Fix UWB/WUSB kconfig error by changing 'select' to 'depends on'.

drivers/usb/wusbcore/Kconfig:4:error: recursive dependency detected!
drivers/usb/wusbcore/Kconfig:4:	symbol USB_WUSB is selected by USB_HWA_HCD
drivers/usb/host/Kconfig:559:	symbol USB_HWA_HCD depends on UWB
drivers/uwb/Kconfig:5:	symbol UWB is selected by USB_WUSB

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-26 11:22:42 -08:00
Stanislaw Gruszka b3ef051db7 USB: Realtek cr: fix autopm scheduling while atomic
Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=784345

Reported-by: Francis Moreau <francis.moro@gmail.com>
Reported-and-tested-by: Christian D <chrisudeussen@gmail.com>
Reported-and-tested-by: Jimmy Dorff <jdorff@phy.duke.edu>
Reported-and-tested-by: collura@ieee.org
Cc: stable@vger.kernel.org # 3.2+
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-26 11:22:41 -08:00
Alan Cox 2353f806c9 USB: ftdi_sio: Add more identifiers
0x04d8, 0x000a: Hornby Elite

Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-26 11:22:41 -08:00
Andiry Xu cf840551a8 xHCI: Cleanup isoc transfer ring when TD length mismatch found
When a TD length mismatch is found during isoc TRB enqueue, it directly
returns -EINVAL. However, isoc transfer is partially enqueued at this time,
and the ring should be cleared.

This should be backported to kernels as old as 2.6.36, which contain the
commit 522989a27c "xhci: Fix failed
enqueue in the middle of isoch TD."

Signed-off-by: Andiry Xu <andiry.xu@amd.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
2012-01-25 12:55:19 -08:00
Greg Kroah-Hartman 7c24814f7e Merge branch 'for-greg' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus
* 'for-greg' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb:
  usb: musb: omap2430: minor cleanups.
  usb: dwc3: unmap the proper number of sg entries
  usb: musb: fix shutdown while usb gadget is in use
  usb: gadget: f_mass_storage: Use "bool" instead of "int" in fsg_module_parameters
  usb: gadget: check for streams only for SS udcs
  usb: gadget: fsl_udc: fix the usage of udc->max_ep
  drivers: usb: otg: Fix dependencies for some OTG drivers
  usb: renesas: silence uninitialized variable report in usbhsg_recip_run_handle()
  usb: gadget: SS Isoc endpoints use comp_desc->bMaxBurst too
  usb: gadget: storage: endian fix
  usb: dwc3: ep0: fix compile warning
  usb: musb: davinci: fix build breakage
  usb: gadget: langwell: don't call gadget's disconnect()
  usb: gadget: langwell: drop langwell_otg support
  usb: otg: kill langwell_otg driver
  usb: dwc3: ep0: tidy up Pending Request handling
2012-01-25 07:48:44 -08:00
NeilBrown b30b3c60a2 usb: musb: omap2430: minor cleanups.
1/ remove incorrect comment (it is a non-blocking notifier)
2/ Use correct symbolic return value for notifier
3/ Make sure otg_notifier_work is cancelled before module exit.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-01-25 10:02:46 +02:00
Dan Williams 074cc73506 qcaux: add more Pantech UML190 and UML290 ports
More ports we now know how to talk to.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 15:47:52 -08:00
Greg Kroah-Hartman 0c8b92f7f2 Revert "drivers: usb: Fix dependency for USB_HWA_HCD"
This reverts commit 0dd2b62ada.

It causes a bunch of Kconfig errors:

drivers/usb/host/Kconfig:559:error: recursive dependency detected!
drivers/usb/host/Kconfig:559:	symbol USB_HWA_HCD depends on UWB
drivers/uwb/Kconfig:5:	symbol UWB is selected by USB_WUSB
drivers/usb/wusbcore/Kconfig:4:	symbol USB_WUSB is selected by USB_HWA_HCD

showing that this really wasn't the correct fix at all.

Cc: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 15:33:44 -08:00
Geert Uytterhoeven 2053c2d1b1 usb: mv-otg - Fix build if CONFIG_USB is not set
ERROR: "usb_remove_hcd" [drivers/usb/otg/mv_otg.ko] undefined!
ERROR: "usb_add_hcd" [drivers/usb/otg/mv_otg.ko] undefined!

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
--
Inpired by drivers/usb/otg/msm_otg.c. Is this correct?

 drivers/usb/otg/mv_otg.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 14:58:45 -08:00
Bjørn Mork 15699e6faf USB: cdc-wdm: Avoid hanging on interface with no USB_CDC_DMM_TYPE
The probe does not strictly require the USB_CDC_DMM_TYPE
descriptor, which is a good thing as it makes the driver
usable on non-conforming interfaces.  A user could e.g.
bind to it to a CDC ECM interface by using the new_id and
bind sysfs files.  But this would fail with a 0 buffer length
due to the missing descriptor.

Fix by defining a reasonable fallback size: The minimum
device receive buffer size required by the CDC WMC standard,
revision 1.1

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 14:38:58 -08:00
Alessandro Rubini 3a0bac0676 usb: add support for STA2X11 host driver
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@st.com>
Cc: Alan Cox <alan@linux.intel.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 14:15:37 -08:00
Fabio Estevam 0dd2b62ada drivers: usb: Fix dependency for USB_HWA_HCD
Fix the following build warning:

warning: (USB_HWA_HCD) selects UWB_HWA which has unmet direct dependencies (UWB && USB)

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 14:15:37 -08:00
Alan Stern 194b3af4eb USB: OHCI: fix new compiler warnings
This patch (as1515) fixes some unavoidably dumb compiler warnings:

  CC [M]  drivers/usb/renesas_usbhs/mod.o
In file included from drivers/usb/host/ohci-hcd.c:101:0:
drivers/usb/host/ohci-dbg.c: In function ‘fill_registers_buffer’:
drivers/usb/host/ohci-dbg.c:656:2: warning: the comparison will always evaluate as ‘true’ for the address of ‘next’ will never be NULL [-Waddress]
drivers/usb/host/ohci-dbg.c:675:3: warning: the comparison will always evaluate as ‘true’ for the address of ‘next’ will never be NULL [-Waddress]

Instead of trying to fix the macro to work under all cirumstances,
just add a second macro for use in cases where the "next" argument is
the address of a local variable.

Unfortunately the macro cannot be replaced by a real subroutine,
because there's no va_list version of ohci_dbg() or dev_dbg().

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 12:24:06 -08:00
Felipe Balbi 3297f86a3d usb: serial: kobil_sct: fix compile warning:
Fix the following compile warning:

drivers/usb/serial/kobil_sct.c: In function ‘__check_debug’:
drivers/usb/serial/kobil_sct.c:719:1: warning: return from incompatible
pointer type [enabled by default]

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 12:23:18 -08:00
Julia Lawall 2492c6e645 drivers/usb/host/ehci-fsl.c: add missing iounmap
Add missing iounmap in error handling code, in a case where the function
already preforms iounmap on some other execution path.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e;
statement S,S1;
int ret;
@@
e = \(ioremap\|ioremap_nocache\)(...)
... when != iounmap(e)
if (<+...e...+>) S
... when any
    when != iounmap(e)
*if (...)
   { ... when != iounmap(e)
     return ...; }
... when any
iounmap(e);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 12:23:17 -08:00
Bjørn Mork 655e247daf USB: cdc-wdm: better allocate a buffer that is at least as big as we tell the USB core
As it turns out, there was a mismatch between the allocated inbuf size
(desc->bMaxPacketSize0, typically something like 64) and the length we
specified in the URB (desc->wMaxCommand, typically something like 2048)

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Cc: Oliver Neukum <oliver@neukum.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 12:19:58 -08:00
Bjørn Mork 62aaf24dc1 USB: cdc-wdm: call wake_up_all to allow driver to shutdown on device removal
wdm_disconnect() waits for the mutex held by wdm_read() before
calling wake_up_all().  This causes a deadlock, preventing device removal
to complete.  Do the wake_up_all() before we start waiting for the locks.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Cc: Oliver Neukum <oliver@neukum.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 12:18:25 -08:00
Bjørn Mork e8537bd2c4 USB: cdc-wdm: use two mutexes to allow simultaneous read and write
using a separate read and write mutex for locking is sufficient to make the
driver accept simultaneous read and write. This improves useability a lot.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Cc: stable <stable@vger.kernel.org>
Cc: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 12:17:29 -08:00
Bjørn Mork c428b70c1e USB: cdc-wdm: updating desc->length must be protected by spin_lock
wdm_in_callback() will also touch this field, so we cannot change it without locking

Cc: stable@vger.kernel.org
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 12:17:29 -08:00
Harrison Metzger 1097ccebe6 USB: usbsevseg: fix max length
This changes the max length for the usb seven segment delcom device to 8
from 6. Delcom has both 6 and 8 variants and having 8 works fine with
devices which are only 6.

Signed-off-by: Harrison Metzger <harrisonmetz@gmail.com>
Signed-off-by: Stuart Pook <stuart@acm.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 12:08:36 -08:00
Kentaro Matsuyama e423d7401f USB: option: Add LG docomo L-02C
Add vendor and product ID for USB 3G/LTE modem of docomo L-02C

Signed-off-by: Kentaro Matsuyama <kentaro.matsuyama@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 12:08:35 -08:00
Eric W. Biederman 6d443d8499 usb: io_ti: Make edge_remove_sysfs_attrs the port_remove method.
Calling edge_remove_sysfs_attrs from edge_disconnect is too late
as the device has already been removed from sysfs.

Do the simple and obvious thing and make edge_remove_sysfs_attrs
the port_remove method.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Reported-by: Wolfgang Frisch <wfpub@roembden.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 12:08:35 -08:00
Greg Kroah-Hartman 52a749992c Revert "USB: usb-skeleton.c: fix open/disconnect race"
This reverts commit 26c71a79ca.

It's not needed, to quote Ming Lei:
	Looks you have queued the patch into your tree, but just now I
	find the patch is not needed at all, since we have had
	minor_rwsem(drivers/usb/core/file.c) for this purpose, please
	drop the patch, sorry for it.

Cc: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 12:02:38 -08:00
Johan Hovold d1620ca9e7 USB: cp210x: allow more baud rates above 1Mbaud
Allow more baud rates to be set in [1M,2M] baud.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: Preston Fick <preston.fick@silabs.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 11:58:46 -08:00
Johan Hovold cdc32fd6f7 USB: cp210x: initialise baud rate at open
The newer cp2104 devices require the baud rate to be initialised after
power on. Make sure it is set when port is opened.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: Preston Fick <preston.fick@silabs.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 11:58:46 -08:00
Johan Hovold e5990874e5 USB: cp210x: clean up, refactor and document speed handling
Clean up and refactor speed handling.
Document baud rate handling for CP210{1,2,4,5,10}.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: Preston Fick <preston.fick@silabs.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 11:57:53 -08:00