1. 12 Nov, 2012 10 commits
    • Sarah Sharp's avatar
      xhci: Fix conditional check in bandwidth calculation. · 392a07ae
      Sarah Sharp authored
      David reports that at drivers/usb/host/xhci.c:2257:
      
      static bool xhci_is_sync_in_ep(unsigned int ep_type)
      {
          return (ep_type == ISOC_IN_EP || ep_type != INT_IN_EP);
      }
      
      The static analyser cppcheck says
      
      [linux-3.7-rc2/drivers/usb/host/xhci.c:2257]: (style) Redundant condition: If ep_type == 5, the comparison ep_type != 7 is always true.
      
      Maybe the original programmer intention was something like
      
      static bool xhci_is_sync_in_ep(unsigned int ep_type)
      {
          return (ep_type == ISOC_IN_EP || ep_type == INT_IN_EP);
      }
      
      Fix this.
      
      This patch should be backported to stable kernels as old as 3.2, that
      contain the commit 2b698999 "xhci: USB
      3.0 BW checking."
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Reported-by: default avatarDavid Binderman <dcb314@hotmail.com>
      Cc: stable@vger.kernel.org
      392a07ae
    • Sarah Sharp's avatar
      xhci: Avoid global symbol pollution with handshake. · 2611bd18
      Sarah Sharp authored
      Non-static xHCI driver symbols should start with the "xhci_" prefix, in
      order to avoid namespace pollution.  Rename the "handshake" function to
      "xhci_handshake".
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Reported-by: default avatarBen Hutchings <ben@decadent.org.uk>
      2611bd18
    • Alan Stern's avatar
      USB: report submission of active URBs · 2f02bc8a
      Alan Stern authored
      This patch (as1633) changes slightly the way usbcore handled
      submissions of URBs that are already active.  It will now return
      -EBUSY rather than -EINVAL, and it will call WARN_ONCE to draw
      people's attention to the bug.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2f02bc8a
    • Alan Stern's avatar
      USB: EHCI: bugfix: urb->hcpriv should not be NULL · 2656a9ab
      Alan Stern authored
      This patch (as1632b) fixes a bug in ehci-hcd.  The USB core uses
      urb->hcpriv to determine whether or not an URB is active; host
      controller drivers are supposed to set this pointer to a non-NULL
      value when an URB is queued.  However ehci-hcd sets it to NULL for
      isochronous URBs, which defeats the check in usbcore.
      
      In itself this isn't a big deal.  But people have recently found that
      certain sequences of actions will cause the snd-usb-audio driver to
      reuse URBs without waiting for them to complete.  In the absence of
      proper checking by usbcore, the URBs get added to their endpoint list
      twice.  This leads to list corruption and a system freeze.
      
      The patch makes ehci-hcd assign a meaningful value to urb->hcpriv for
      isochronous URBs.  Improving robustness always helps.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Reported-by: default avatarArtem S. Tashkinov <t.artem@lycos.com>
      Reported-by: default avatarChristof Meerwald <cmeerw@cmeerw.org>
      CC: <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2656a9ab
    • Alan Stern's avatar
      USB: EHCI: miscellaneous cleanups for the library conversion · 1b36810e
      Alan Stern authored
      This patch (as1630) cleans up a few minor items resulting from the
      split-up of the ehci-hcd driver:
      
      	Remove the product_desc string from the ehci_driver_overrides
      	structure.  All drivers will use the generic "EHCI Host
      	Controller" string.  (This was requested by Felipe Balbi.)
      
      	Allow drivers to pass a NULL pointer to ehci_init_driver()
      	if they don't have to override any settings.
      
      	Remove a #define symbol that is no longer used from the
      	ChipIdea host driver.
      
      	Rename overrides to pci_overrides in ehci-pci.c, for
      	consistency with ehci-platform.c.
      
      	Mark the *_overrides structures as __initdata.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Reviewed-by: default avatarFelipe Balbi <balbi@ti.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1b36810e
    • Alan Stern's avatar
      USB: fix endpoint-disabling for failed config changes · 36caff5d
      Alan Stern authored
      This patch (as1631) fixes a bug that shows up when a config change
      fails for a device under an xHCI controller.  The controller needs to
      be told to disable the endpoints that have been enabled for the new
      config.  The existing code does this, but before storing the
      information about which endpoints were enabled!  As a result, any
      second attempt to install the new config is doomed to fail because
      xhci-hcd will refuse to enable an endpoint that is already enabled.
      
      The patch optimistically initializes the new endpoints' device
      structures before asking the device to switch to the new config.  If
      the request fails then the endpoint information is already stored, so
      we can use usb_hcd_alloc_bandwidth() to disable the endpoints with no
      trouble.  The rest of the error path is slightly more complex now; we
      have to disable the new interfaces and call put_device() rather than
      simply deallocating them.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Reported-and-tested-by: default avatarMatthias Schniedermeyer <ms@citd.de>
      CC: Sarah Sharp <sarah.a.sharp@linux.intel.com>
      CC: <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      36caff5d
    • Greg Kroah-Hartman's avatar
      Merge tag 'gadget-for-v3.8' of... · 7fd94bee
      Greg Kroah-Hartman authored
      Merge tag 'gadget-for-v3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next
      
      USB gadget patches from Felipe:
      "usb: gadget: patches for v3.8
      
      renesas_usbhs implements ->pullup() method, switches over
      to devm_request_irq(), adds support for DMA Engine and
      got a few miscelaneous cleanups.
      
      The NCM gadget got an endianness fix and the Ethernet
      gadget a frame size fix.
      
      We're finally removing the g_file_storage gadget and
      sticking to g_mass_storage and the new tcm_usb_gadget
      gadgets since that was a huge duplicaton of effort anyway.
      
      While removing g_file_storage, we also had to fix a bunch
      of defconfigs which were still pointing to the old gadget.
      
      There's a big series getting us closer to being able to
      introduce our configfs interface. The series converts
      functions into loadable modules which will, eventually,
      be registered to the configfs interface.
      
      Other than that there's the usual typo fixes and miscelaneous
      cleanups all over the place."
      7fd94bee
    • Greg Kroah-Hartman's avatar
      Merge tag 'dwc3-for-v3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next · 0f89fc3f
      Greg Kroah-Hartman authored
      USB dwc3 patches from Felipe:
      
      "usb: dwc3: patches for v3.8
      
      We can finaly drop HAVE_CLK dependency from exynos glue layer
      now that clk API provides no-op stubs when it's not linked
      into the kernel.
      
      We're also switching over event buffer allocation to devm_kzalloc()
      and moving the allocation out of dwc3_core_init() so that can be
      re-used when implementing PM support for v3.9.
      
      After the introduction of PLATFORM_DEVID_AUTO, we can also drop the
      homebrew platform device ID handling we had on dwc3 core and let
      driver core take care of that for us.
      
      Exynos glue layer learns about DeviceTree and drops platform_data
      support completely."
      0f89fc3f
    • Greg Kroah-Hartman's avatar
      Merge tag 'musb-for-v3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next · 3a3f2e50
      Greg Kroah-Hartman authored
      USB musb merge from Felipe:
      
      "usb: musb: patches for v3.8 merge window
      
      We have here the usual set of cleanups for the MUSB driver; a
      big set of patches converting platform_device_del() and
      platform_device_put() into platform_device_unregister().
      
      Another big set was applied converting to module_platform_driver()
      macro in order to reduce some boilerplate code from all glue
      layers.
      
      Other than that, we had a series fixing one known silicon errata
      where we couldn't read a few registers. In order to fix that
      we're now using shadow variables for reads and only writing
      to the registers which are known to break functionality when
      read."
      3a3f2e50
    • Greg Kroah-Hartman's avatar
      Merge tag 'xceiv-for-v3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into USB-next · 8e06c6a7
      Greg Kroah-Hartman authored
      Pull USB phy patches from Felipe:
      
      "usb: phy: patches for v3.8 merge window
      
      Not too many patches this time. First two patches are only
      cleanups where one of them switches over to module_platform_driver
      macro and the second removes inclusion of <mach/iomap.h> and is
      part of a bigger set of include cleanups from the Tegra folks.
      
      The only substantial change here is the addition of a driver
      for Renesas' R-Car USB Phy controller."
      8e06c6a7
  2. 09 Nov, 2012 2 commits
  3. 08 Nov, 2012 10 commits
  4. 06 Nov, 2012 11 commits
  5. 03 Nov, 2012 1 commit
  6. 02 Nov, 2012 4 commits
  7. 01 Nov, 2012 2 commits