13 Mar, 2013

1 commit

  • The buffer for responses must not overflow.
    If this would happen, set a flag, drop the data and return
    an error after user space has read all remaining data.

    Signed-off-by: Oliver Neukum
    CC: stable@kernel.org
    Signed-off-by: Greg Kroah-Hartman

    Oliver Neukum
     

12 Mar, 2013

3 commits


11 Mar, 2013

3 commits

  • This patch adds support for the Lake Shore Cryotronics devices to
    the CP210x driver.

    These lines are ported from cp210x driver distributed by Lake Shore web site:
    http://www.lakeshore.com/Documents/Lake%20Shore%20cp210x-3.0.0.tar.gz
    and licensed under the terms of GPLv2.

    Moreover, I've tested this changes with Lake Shore 335 in my labs.

    Signed-off-by: Matwey V. Kornilov
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Matwey V. Kornilov
     
  • …balbi/usb into usb-linus

    Felipe writes:

    usb: fixes for v3.9-rc3

    Most fixes are on 'musb' driver. There's a sparse warning
    fix which marks omap2430_glue as static, a build warning
    fix which was found with randconfig, a fix for omap_musb_mailbox
    check and removal of 'select' from musb's Kconfig to prevent
    Kconfig warnings.

    Other than that, pxa25x got a fix which was introduced by the
    latest conversion to udc_start/udc_stop patchset, kernel-doc
    warnings for composite layer and dwc3 got a build fix on
    sparc64.

    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    Greg Kroah-Hartman
     
  • when commit 6166c24 (usb: gadget: pxa25x_udc:
    convert to udc_start/udc_stop) converted
    this driver to udc_start/udc_stop, it failed
    to consider the fact that stop_activity()
    is called from disconnect interrupt.

    Fix the problem so that gadget drivers know
    about proper disconnect sequences.

    Signed-off-by: Felipe Balbi

    Felipe Balbi
     

08 Mar, 2013

1 commit

  • drivers/usb/dwc3/ep0.c: In function `__dwc3_ep0_do_control_data':
    drivers/usb/dwc3/ep0.c:905: error: `typeof' applied to a bit-field

    Looks like a gcc-3.4.5/sparc64 bug.

    Cc: Greg Kroah-Hartman
    Signed-off-by: Andrew Morton
    Signed-off-by: Felipe Balbi

    Andrew Morton
     

07 Mar, 2013

9 commits

  • RetryCnt value in c67x00 TD should be 3 (both bits set to 1). Reference
    Cypress Semiconductor BIOS User's Manual 1.2, page 3-14

    Signed-off-by: Dave Tubbs
    Acked-by: Peter Korsgaard
    Signed-off-by: Greg Kroah-Hartman

    Dave Tubbs
     
  • TD data length is 10 bits, correct TD_PORTLENMASK_DL. Reference
    Cypress Semiconductor BIOS User's Manual 1.2, page 3-10

    Signed-off-by: Dave Tubbs
    Acked-by: Peter Korsgaard
    Signed-off-by: Greg Kroah-Hartman

    Dave Tubbs
     
  • drivers/usb/phy/ should be compiled everytime
    we have CONFIG_USB_OTG_UTILS enabled.

    phy/ should've been part of the build process based
    on CONFIG_USB_OTG_UTILS, don't know where I had my head
    when I allowed CONFIG_USB_COMMON there.

    In fact commit c6156328dec52a55f90688cbfad21c83f8711d84
    tried to fix a previous issue but it made things even
    worse.

    The real solution is to compile phy/ based on
    CONFIG_USB_OTG_UTILS which gets selected by all PHY
    drivers.

    I only triggered the error recently after accepting a
    patch which moved a bunch of code from otg/otg.c to
    phy/phy.c and running 100 randconfig cycles.

    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Felipe Balbi
     
  • add support for Cinterion's products AH6 and PLS8 by adding Product IDs
    and USB_DEVICE tuples.

    Signed-off-by: Christian Schmiedl
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Christian Schmiedl
     
  • 1bf0cf6040 "usb: gadget: omap_udc: convert to udc_start/udc_stop"
    made some trivial changes but was missing a ';' character.

    8c4cc00552 "ARM: OMAP1: DMA: Moving OMAP1 DMA channel definitions
    to mach-omap1" added a definition for OMAP_DMA_USB_W2FC_TX0 to
    the driver while making the header file it was defined in
    unavailable for drivers, but this driver actually needs
    OMAP_DMA_USB_W2FC_RX0 as well.

    Both changes appear trivial, so let's add the missing semicolon
    and the macro definition.

    Acked-by: Felipe Balbi
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Greg Kroah-Hartman

    Arnd Bergmann
     
  • This reverts commit 200e0d99 ("USB: storage: optimize to match the
    Huawei USB storage devices and support new switch command" and the
    followup bugfix commit cd060956 ("USB: storage: properly handle
    the endian issues of idProduct").

    The commit effectively added a large number of Huawei devices to
    the deprecated usb-storage mode switching logic. Many of these
    devices have been in use and supported by the userspace
    usb_modeswitch utility for years. Forcing the switching inside
    the kernel causes a number of regressions as a result of ignoring
    existing onfigurations, and also completely takes away the ability
    to configure mode switching per device/system/user.

    Known regressions caused by this:
    - Some of the devices support multiple modes, using different
    switching commands. There are existing configurations taking
    advantage of this.

    - There is a real use case for disabling mode switching and
    instead mounting the exposed storage device. This becomes
    impossible with switching logic inside the usb-storage driver.

    - At least on device fail as a result of the usb-storage switching
    command, becoming completely unswitchable. This is possibly a
    firmware bug, but still a regression because the device work as
    expected using usb_modeswitch defaults.

    In-kernel mode switching was deprecated years ago with the
    development of the more user friendly userspace alternatives. The
    existing list of devices in usb-storage was only kept to prevent
    breaking already working systems. The long term plan is to remove
    the list, not to add to it. Ref:
    http://permalink.gmane.org/gmane.linux.usb.general/28543

    Cc:
    Cc: stable
    Signed-off-by: Bjørn Mork
    Signed-off-by: Greg Kroah-Hartman

    Bjørn Mork
     
  • Acked-by: Matthew Dharm
    Signed-off-by: Bjørn Mork
    Signed-off-by: Greg Kroah-Hartman

    Bjørn Mork
     
  • Fixes this build failure:
    gcc -Wall -Wextra -g -lpthread -I../include -o testusb testusb.c
    gcc -Wall -Wextra -g -lpthread -I../include -o ffs-test ffs-test.c
    In file included from ffs-test.c:41:0:
    ../../include/linux/usb/functionfs.h:4:39: fatal error:
    uapi/linux/usb/functionfs.h: No such file or directory
    compilation terminated.
    make: *** [ffs-test] Error 1

    Signed-off-by: Maxin B. John
    Acked-by: Michal Nazarewicz
    Cc: stable # 3.7+
    Signed-off-by: Greg Kroah-Hartman

    Maxin B. John
     
  • Another device using CDC ACM with vendor specific protocol to mark
    serial functions.

    Cc: stable
    Signed-off-by: Bjørn Mork
    Signed-off-by: Greg Kroah-Hartman

    Bjørn Mork
     

05 Mar, 2013

8 commits

  • Fix the following sparse warning:

    drivers/usb/musb/omap2430.c:54:33: warning: symbol '_glue' was not \
    declared. Should it be static?

    Signed-off-by: Aaro Koskinen
    Signed-off-by: Felipe Balbi

    Aaro Koskinen
     
  • Commit 80ab72e1 (usb: musb: omap2430: fix the readiness check
    in omap_musb_mailbox) made the check incorrect, as we will lose the
    glue/link status during the normal built-in probe order (twl4030_usb is
    probed after musb omap2430, but before musb core is ready).

    As a result, if you boot with USB cable on and load g_ether, the
    connection does not work as the code thinks the cable is off and the
    phy gets powered down immediately. This is a major regression in 3.9-rc1.

    So the proper check should be: exit if _glue is NULL, but if it's
    initialized we memorize the status, and then check if the musb core
    is ready.

    Signed-off-by: Aaro Koskinen
    Signed-off-by: Felipe Balbi

    Aaro Koskinen
     
  • When running 100 randconfig iterations, I found
    the following warning:

    drivers/usb/musb/musb_core.c: In function ‘musb_init_controller’:
    drivers/usb/musb/musb_core.c:1981:1: warning: label ‘fail5’ defined \
    but not used [-Wunused-label]

    this patch fixes it by removing the unnecessary
    ifdef CONFIG_SYSFS.

    Signed-off-by: Felipe Balbi

    Felipe Balbi
     
  • those are quite unnecessary, the only thing
    we need to be careful about is USB_OTG_UTILS
    which get properly selected by PHY drivers.

    For now, MUSB will select only USB_OTG_UTILS
    until we add stubs for the cases when PHY
    layer isn't enabled.

    Signed-off-by: Felipe Balbi

    Felipe Balbi
     
  • A few trivial fixes for composite driver:

    Warning(include/linux/usb/composite.h:165): No description found for parameter
    'fs_descriptors'
    Warning(include/linux/usb/composite.h:165): Excess struct/union/enum/typedef
    member 'descriptors' description in 'usb_function'
    Warning(include/linux/usb/composite.h:321): No description found for parameter
    'gadget_driver'
    Warning(drivers/usb/gadget/composite.c:1777): Excess function parameter 'bind'
    description in 'usb_composite_probe'

    Cc: Greg Kroah-Hartman
    Cc: Jiri Kosina
    Cc: linux-usb@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Nishanth Menon
    Signed-off-by: Felipe Balbi

    Nishanth Menon
     
  • This patch (as1661) fixes a rather obscure bug in ehci-hcd. In a
    couple of places, the driver compares the DMA address stored in a QH's
    overlay region with the address of a particular qTD, in order to see
    whether that qTD is the one currently being processed by the hardware.
    (If it is then the status in the QH's overlay region is more
    up-to-date than the status in the qTD, and if it isn't then the
    overlay's value needs to be adjusted when the QH is added back to the
    active schedule.)

    However, DMA address in the overlay region isn't always valid. It
    sometimes will contain a stale value, which may happen by coincidence
    to be equal to a qTD's DMA address. Instead of checking the DMA
    address, we should check whether the overlay region is active and
    valid. The patch tests the ACTIVE bit in the overlay, and clears this
    bit when the overlay becomes invalid (which happens when the
    currently-executing URB is unlinked).

    This is the second part of a fix for the regression reported at:

    https://bugs.launchpad.net/bugs/1088733

    Signed-off-by: Alan Stern
    Reported-by: Joseph Salisbury
    Reported-and-tested-by: Stephen Thirlwall
    CC:
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • This patch (as1660) works around a hardware problem present in some
    (if not all) Intel EHCI controllers. After a QH has been unlinked
    from the async schedule and the corresponding IAA interrupt has
    occurred, the controller is not supposed access the QH and its qTDs.
    There certainly shouldn't be any more DMA writes to those structures.
    Nevertheless, Intel's controllers have been observed to perform a
    final writeback to the QH's overlay region and to the most recent qTD.
    For more information and a test program to determine whether this
    problem is present in a particular controller, see

    http://marc.info/?l=linux-usb&m=135492071812265&w=2
    http://marc.info/?l=linux-usb&m=136182570800963&w=2

    This patch works around the problem by always waiting for two IAA
    cycles when unlinking an async QH. The extra IAA delay gives the
    controller time to perform its final writeback.

    Surprisingly enough, the effects of this silicon bug have gone
    undetected until quite recently. More through luck than anything
    else, it hasn't caused any apparent problems. However, it does
    interact badly with the path that follows this one, so it needs to be
    addressed.

    This is the first part of a fix for the regression reported at:

    https://bugs.launchpad.net/bugs/1088733

    Signed-off-by: Alan Stern
    Tested-by: Stephen Thirlwall
    CC:
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • …balbi/usb into usb-linus

    Felipe writes:

    "usb: fixes for v3.9-rc2

    A few drivers got their gadget->dev registration problems
    exposed by the removal of ->start()/->stop() functions from
    udc-core.c. All of such instances are now fixed.

    We're also fixing chipidea's mistake of registering private
    debugging sysfs files under the gadget's device. This is
    in preparation to complete removal of gadget->dev handling
    from all UDC drivers which will happen for v3.10 merge window.

    MUSB's Kconfig got a fix to avoid a non-buildable selection
    of its Kconfig choices.

    Some extra devm_ioremap_resource() are added here because they
    missed the merge window.

    Finally, we have a temporary fix linking function drivers
    before gadget drivers so they work fine when they're statically
    linked to the kernel. We've done it so since the real fix wouldn't
    fit the -rc cycle."

    Greg Kroah-Hartman
     

04 Mar, 2013

15 commits