11 Dec, 2013

4 commits

  • Commit b8e24bfabb03 ('emi62: use request_firmware()') made
    emi62/bitstream.HEX a copy of emi26/bitstream.HEX. Re-do the
    conversion from drivers/usb/misc/emi62_fw_{m,s}.h (these headers
    contained the same bitstream but different firmware).

    This produces an identical blob to the known working version in
    http://people.xiph.org/~xiphmont/emagic/emi-20131209.tgz

    Reported-by: Monty
    Cc: David Woodhouse
    Signed-off-by: Ben Hutchings
    Signed-off-by: Greg Kroah-Hartman

    Ben Hutchings
     
  • …/git/sarah/xhci into usb-next

    Sarah Writes:

    usb: Enumeration change under xHCI for 3.14.

    Hi Greg,

    Here's two patches for 3.14.

    There are buggy USB devices that don't enumerate under xHCI because
    they expect a 64-byte Get Descriptor request before the Set Address control
    transfer. David Moore has a USB 2.0 webcam that exhibits this behavior:

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

    These patches change the way USB 2.0 devices are enumerated under xHCI, to try
    the Windows enumeration scheme first. The USB 3.0 device enumeration scheme is
    unchanged. This should allow these buggy USB 2.0 devices to enumerate under xHCI.

    I've tested this code with USB 3.0 hubs and mass storage devices, and many
    different USB 2.0 devices (webcam, headset, ethernet, serial, mouse, keyboard,
    etc). They all work, so these patches are ready for wider testing.

    Sarah Sharp

    Greg Kroah-Hartman
     
  • Specify whether we are only performing the context setup portion of the
    'address device' command, or the full operation issuing 'SetAddress'
    on the wire.

    Signed-off-by: Dan Williams
    Signed-off-by: Sarah Sharp

    Dan Williams
     
  • Change the default enumeration scheme for xhci attached non-SuperSpeed
    devices from:

    Reset
    SetAddress [xhci address-device BSR = 0]
    GetDescriptor(8)
    GetDescriptor(18)

    ...to:

    Reset
    [xhci address-device BSR = 1]
    GetDescriptor(64)
    Reset
    SetAddress [xhci address-device BSR = 0]
    GetDescriptor(18)

    ...as some devices misbehave when encountering a SetAddress command
    prior to GetDescriptor. There are known legacy devices that require
    this scheme, but testing has found at least one USB3 device that fails
    enumeration when presented with this ordering. For now, follow the ehci
    case and enable 'new scheme' by default for non-SuperSpeed devices.

    To support this enumeration scheme on xhci the AddressDevice operation
    needs to be performed twice. The first instance of the command enables
    the HC's device and slot context info for the device, but omits sending
    the device a SetAddress command (BSR == block set address request).
    Then, after GetDescriptor completes, follow up with the full
    AddressDevice+SetAddress operation.

    As mentioned before, this ordering of events with USB3 devices causes an
    extra state transition to be exposed to xhci. Previously USB3 devices
    would transition directly from 'enabled' to 'addressed' and never need
    to underrun responses to 'get descriptor'. We do see the 64-byte
    descriptor fetch the correct data, but the following 18-byte descriptor
    read after the reset gets:

    bLength = 0
    bDescriptorType = 0
    bcdUSB = 0
    bDeviceClass = 0
    bDeviceSubClass = 0
    bDeviceProtocol = 0
    bMaxPacketSize0 = 9

    instead of:

    bLength = 12
    bDescriptorType = 1
    bcdUSB = 300
    bDeviceClass = 0
    bDeviceSubClass = 0
    bDeviceProtocol = 0
    bMaxPacketSize0 = 9

    which results in the discovery process looping until falling back to
    'old scheme' enumeration.

    Acked-by: Alan Stern
    Reported-by: David Moore
    Suggested-by: Sarah Sharp
    Reported-by: Dan Carpenter
    Signed-off-by: Dan Williams
    Signed-off-by: Sarah Sharp

    Dan Williams
     

10 Dec, 2013

7 commits

  • This patch should fix the below compile warning:

    drivers/usb/storage/protocol.c: In function 'usb_stor_access_xfer_buf':
    drivers/usb/storage/protocol.c:155:22: warning: comparison of distinct
    pointer types lacks a cast [enabled by default]

    Reported-by: kbuild test robot
    Reported-by: Stephen Rothwell
    Signed-off-by: Ming Lei
    Signed-off-by: Greg Kroah-Hartman

    Ming Lei
     
  • This patch correctly sets the dwNumOfPackets field of the HWA transfer
    request for isochronous transfers with multiple segments. Previously
    all segments used the value that was set for the first segment which may
    not be correct.

    Signed-off-by: Thomas Pugliese
    Signed-off-by: Greg Kroah-Hartman

    Thomas Pugliese
     
  • If multiple segments belonging to an isoc transfer are submitted
    concurrently, the isoc_frame_index field in struct wa_xfer can get
    corrupted. This patch moves the isoc_frame_index field from struct
    wa_xfer to struct wa_seg to prevent this from happening.

    Signed-off-by: Thomas Pugliese
    Signed-off-by: Greg Kroah-Hartman

    Thomas Pugliese
     
  • Use USB_CTRL_SET_TIMEOUT and USB_CTRL_GET_TIMEOUT for USB control
    messages instead of an arbitrary 1s timeout value. This is particularly
    useful for WUSB since in the worst case RF scanario, a WUSB device can
    be unresponsive for up to 4s and still be connected.

    Signed-off-by: Thomas Pugliese
    Signed-off-by: Greg Kroah-Hartman

    Thomas Pugliese
     
  • There is no need to skip querying the config and string descriptors for
    unauthorized WUSB devices when usb_new_device is called. It is allowed
    by WUSB spec. The only action that needs to be delayed until
    authorization time is the set config. This change allows user mode
    tools to see the config and string descriptors earlier in enumeration
    which is needed for some WUSB devices to function properly on Android
    systems. It also reduces the amount of divergent code paths needed
    for WUSB devices.

    Signed-off-by: Thomas Pugliese
    Signed-off-by: Greg Kroah-Hartman

    Thomas Pugliese
     
  • In usb_submit_urb, do not fail if an isoc URB for a wireless USB device
    has an interval < 6. Per WUSB spec, isoc endpoints can support values
    from 1-16. Valid values for interrupt URBs for wireless USB devices are
    still 6-16.

    Signed-off-by: Thomas Pugliese
    Signed-off-by: Greg Kroah-Hartman

    Thomas Pugliese
     
  • If a URB is broken up into multiple transfer segments and a short
    transfer occurs in any segment other than the last, the URB will
    currently get stuck in the driver forever. This patch adds a check for
    a short transfer and cleans up any pending segments so the URB can
    complete properly.

    Signed-off-by: Thomas Pugliese
    Signed-off-by: Greg Kroah-Hartman

    Thomas Pugliese
     

09 Dec, 2013

25 commits

  • This reverts commit 614ced91fc6fbb5a1cdd12f0f1b6c9197d9f1350.
    The units on this was seen were prototypes and the issue is
    not seen on younger units.

    Signed-off-by: Oliver Neukum
    Signed-off-by: Greg Kroah-Hartman

    Oliver Neukum
     
  • Individual controller driver has different requirement for wakeup
    setting, so move it from core to itself. In order to align with
    current etting the default wakeup setting is enabled (except for
    chipidea host).

    Pass compile test with below commands:
    make O=outout/all allmodconfig
    make -j$CPU_NUM O=outout/all drivers/usb

    Signed-off-by: Peter Chen
    Acked-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Peter Chen
     
  • This adds i.MX51 as the next user of the usbmisc driver.
    Functionality is similar to i.MX53, so at this stage simply
    reuse existing i.MX53 calls.

    Signed-off-by: Alexander Shiyan
    Signed-off-by: Peter Chen
    Signed-off-by: Greg Kroah-Hartman

    Alexander Shiyan
     
  • This adds i.MX27 and i.MX31 as the next user of the usbmisc driver.

    Tested-by: Chris Ruehl
    Signed-off-by: Alexander Shiyan
    Signed-off-by: Peter Chen
    Signed-off-by: Greg Kroah-Hartman

    Alexander Shiyan
     
  • The ci_hdrc_imx's probe needs usbmisc_imx to be loadded beforehand,
    so it is better we load usbmisc_imx first.

    Signed-off-by: Peter Chen
    Signed-off-by: Greg Kroah-Hartman

    Peter Chen
     
  • The regmap only needs to reallocate if the hw_read on the CAP register shows
    lpm is used. Therefore the if() statement check the change.

    Signed-off-by: Chris Ruehl
    Signed-off-by: Peter Chen
    Signed-off-by: Greg Kroah-Hartman

    Chris Ruehl
     
  • Fixed a pointer variable format issue.

    Signed-off-by: Seth Archer Brown
    Acked-by: Duncan Sands
    Signed-off-by: Greg Kroah-Hartman

    Seth Archer Brown
     
  • Use PCI standard marco dev_is_pci() instead of directly compare
    pci_bus_type to check whether it is pci device.

    Signed-off-by: Yijing Wang
    Acked-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Yijing Wang
     
  • Use PCI standard marco dev_is_pci() instead of directly compare
    pci_bus_type to check whether it is pci device.

    Signed-off-by: Yijing Wang
    Signed-off-by: Greg Kroah-Hartman

    Yijing Wang
     
  • This adds external USB phy support to USB HCD driver that
    allows to find and initialize external USB phy, bound to
    the HCD, when the HCD is added.
    The usb_add_hcd function returns -EPROBE_DEFER if the USB
    phy, bound to the HCD, is not ready.
    If no USB phy is bound, the HCD is initialized as usual.

    Signed-off-by: Valentine Barshak
    Signed-off-by: Greg Kroah-Hartman

    Valentine Barshak
     
  • This adds remove_phy flag to the HCD structure. If the flag is
    set and if hcd->phy is valid, the phy is shutdown and released
    whenever usb_add_hcd fails or usb_hcd_remove is called.
    This can be used by the HCD drivers to auto-remove
    the external USB phy when it is no longer needed.

    Signed-off-by: Valentine Barshak
    Acked-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Valentine Barshak
     
  • We have sg_miter_* APIs for accessing scsi sg buffer, so
    use them to make code clean and bug free.

    Cc: Matthew Dharm
    Cc: Alan Stern
    Cc: Greg Kroah-Hartman
    Signed-off-by: Ming Lei
    Signed-off-by: Greg Kroah-Hartman

    Ming Lei
     
  • sg_copy_buffer() can't meet demand for some drrivers(such usb
    mass storage), so we have to use the sg_miter_* APIs to access
    sg buffer, then need export sg_miter_skip() for these drivers.

    The API is needed for converting to sg_miter_* APIs in USB storage
    driver for accessing sg buffer.

    Acked-by: Andrew Morton
    Cc: FUJITA Tomonori
    Cc: Jens Axboe
    Signed-off-by: Ming Lei
    Reviewed-by: Tejun Heo
    Signed-off-by: Greg Kroah-Hartman

    Ming Lei
     
  • Return -ENOENT for unlinked URBs.

    Signed-off-by: Thomas Pugliese
    Signed-off-by: Greg Kroah-Hartman

    Thomas Pugliese
     
  • Add more info to debug prints in urb_unlink path

    Signed-off-by: Thomas Pugliese
    Signed-off-by: Greg Kroah-Hartman

    Thomas Pugliese
     
  • Add calls to usb_hcd_link_urb_to_ep, usb_hcd_unlink_urb_from_ep, and
    usb_hcd_check_unlink_urb in the appropriate locations.

    Signed-off-by: Thomas Pugliese
    Signed-off-by: Greg Kroah-Hartman

    Thomas Pugliese
     
  • Suspend scenario in case of ohci-spear glue was not
    properly handled as it was not suspending generic part
    of ohci controller. Alan Stern suggested, properly handle
    ohci-spear suspend scenario.

    Calling explicitly the ohci_suspend() routine in
    spear_ohci_hcd_drv_suspend() will ensure proper
    handling of suspend scenario.

    Signed-off-by: Manjunath Goudar
    Acked-by: Alan Stern
    Cc: Arnd Bergmann
    Cc: linux-usb@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman

    Majunath Goudar
     
  • Suspend scenario in case of ohci-exynos glue was not
    properly handled as it was not suspending generic part
    of ohci controller. Alan Stern suggested, properly handle
    ohci-exynos suspend scenario.

    Calling explicitly the ohci_suspend() routine in
    exynos_ohci_suspend() will ensure proper handling of suspend
    scenario.

    Signed-off-by: Manjunath Goudar
    Acked-by: Alan Stern
    Cc: Arnd Bergmann
    Cc: Kukjin Kim
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-samsung-soc@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-usb@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman

    Majunath Goudar
     
  • Suspend scenario in case of ohci-da8xx glue was not
    properly handled as it was not suspending generic part
    of ohci controller. Alan Stern suggested, properly handle
    ohci-da8xx suspend scenario.

    Calling explicitly the ohci_suspend()
    routine in ohci_da8xx_suspend() will ensure proper
    handling of suspend scenario.

    Signed-off-by: Manjunath Goudar
    Acked-by: Alan Stern
    Cc: Arnd Bergmann
    Cc: linux-usb@vger.kernel.or
    Signed-off-by: Greg Kroah-Hartman

    Majunath Goudar
     
  • Suspend scenario in case of ohci-s3c2410 glue was not
    properly handled as it was not suspending generic part
    of ohci controller. Alan Stern suggested, properly handle
    ohci-s3c2410 suspend scenario.

    Calling explicitly the ohci_suspend()
    routine in ohci_hcd_s3c2410_drv_suspend() will ensure
    proper handling of suspend scenario.

    Signed-off-by: Manjunath Goudar
    Acked-by: Alan Stern
    Cc: Ben Dooks
    Cc: Kukjin Kim
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-samsung-soc@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-usb@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman

    Majunath Goudar
     
  • Suspend scenario in case of ohci-at91 glue was not properly handled
    as it was not suspending generic part of ohci controller. Alan Stern
    suggested, properly handle ohci-at91 suspend scenario.

    Calling explicitly the ohci_suspend() routine in ohci_hcd_at91_drv_suspend()
    will ensure proper handling of suspend scenario. This task is sugested
    by Alan Stern.

    Signed-off-by: Manjunath Goudar
    Acked-by: Alan Stern
    Cc: Arnd Bergmann
    Cc: linux-usb@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman

    Majunath Goudar
     
  • Suspend scenario in case of OHCI was not properly
    handled in ochi_suspend()routine. Alan Stern
    suggested, properly handle OHCI suspend scenario.

    This does generic proper handling of suspend
    scenario to all OHCI SOC.

    Signed-off-by: Manjunath Goudar
    Acked-by: Alan Stern
    Cc: linux-usb@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman

    Majunath Goudar
     
  • The commit "usb: usbtest: support bos descriptor test for usb 3.0"
    introduced a test for bos descriptor. And USB 2.1 device also can be
    checked. So this patch extends the test coverage to support USB 2.1 device.

    Reported-by: Sarah Sharp
    Signed-off-by: Huang Rui
    Acked-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Huang Rui
     
  • USB 2.1 Link PM adds to use bits[1:15] according to USB 2.0 ECN Errata for
    Link Power Management spec.

    Bit Encoding
    0 Reserved
    1 LPM
    2 BESL & Altemate HIRD definitions supported
    3 Recommended Baseline BESL valid
    4 Recommended Deep BESL valid
    11:8 Recommended Baseline BESL value
    15:12 Recommended Deep BESL value
    31:16 Reserved

    So fix the bit mask from 0x1e to 0xfffe.

    Reported-by: Sarah Sharp
    Signed-off-by: Huang Rui
    Acked-by: Felipe Balbi
    Acked-by: Sarah Sharp
    Signed-off-by: Greg Kroah-Hartman

    Huang Rui
     
  • In Test 10 of usbtest module, it queues multiple control messages and
    thereby tests control message queuing, protocol stalls, short reads, and
    fault handling. And this patch add a test case to support queue BOS control
    request for USB 3.0 SPEC.

    Signed-off-by: Huang Rui
    Signed-off-by: Greg Kroah-Hartman

    Huang Rui
     

05 Dec, 2013

2 commits

  • drivers/usb/host/ehci-mv.c:181:26-27: WARNING comparing pointer to 0, suggest !E
    /c/kernel-tests/src/cocci/drivers/usb/host/ehci-mv.c:181:26-27: WARNING comparing pointer to 0

    Compare pointer-typed values to NULL rather than 0

    Semantic patch information:
    This makes an effort to choose between !x and x == NULL. !x is used
    if it has previously been used with the function used to initialize x.
    This relies on type information. More type information can be obtained
    using the option -all_includes and the option -I to specify an
    include path.

    Generated by: coccinelle/null/badzero.cocci

    CC: Jingoo Han
    CC: Greg Kroah-Hartman
    Signed-off-by: Fengguang Wu

    Fengguang Wu
     
  • Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
    is not preferred.

    Signed-off-by: Jingoo Han
    Signed-off-by: Greg Kroah-Hartman

    Jingoo Han
     

04 Dec, 2013

2 commits