1. 05 3月, 2014 3 次提交
    • G
      xhci: fix usb3 streams · 15341303
      Gerd Hoffmann 提交于
      xhci maintains a radix tree for each stream endpoint because it must
      be able to map a trb address to the stream ring.  Each ring segment
      must be added to the ring for this to work.  Currently xhci sticks
      only the first segment of each stream ring into the radix tree.
      
      Result is that things work initially, but as soon as the first segment
      is full xhci can't map the trb address from the completion event to the
      stream ring any more -> BOOM.  You'll find this message in the logs:
      
        ERROR Transfer event for disabled endpoint or incorrect stream ring
      
      This patch adds a helper function to update the radix tree, and a
      function to remove ring segments from the tree.  Both functions loop
      over the segment list and handles all segments instead of just the
      first.
      
      [Note: Sarah changed this patch to add radix_tree_maybe_preload() and
      radix_tree_preload_end() calls around the radix tree insert, since we
      can now insert entries in interrupt context.  There are now two helper
      functions to make the code cleaner, and those functions are moved to
      make them static.]
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      15341303
    • O
      xhci: make warnings greppable · e587b8b2
      Oliver Neukum 提交于
      This changes debug messages and warnings in xhci-ring.c
      to be on a single line so grep can find them. grep must
      have precedence over the 80 column limit.
      
      [Sarah fixed two checkpatch.pl issues with split lines
      introduced by this commit.]
      Signed-off-by: NOliver Neukum <oneukum@suse.de>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      e587b8b2
    • S
      usb/xhci: Change how we indicate a host supports Link PM. · 25cd2882
      Sarah Sharp 提交于
      The xHCI driver currently uses a USB core internal field,
      udev->lpm_capable, to indicate the xHCI driver knows how to calculate
      the LPM timeout values.  If this value is set for the host controller
      udev, it means Link PM can be enabled for child devices under that host.
      
      Change the code so the xHCI driver isn't mucking with USB core internal
      fields.  Instead, indicate the xHCI driver doesn't support Link PM on
      this host by clearing the U1 and U2 exit latencies in the roothub
      SuperSpeed Extended Capabilities BOS descriptor.
      
      The code to check for the roothub setting U1 and U2 exit latencies to
      zero will also disable LPM for external devices that do that same.  This
      was already effectively done with commit
      ae8963ad "usb: Don't enable LPM if the
      exit latency is zero."  Leave that code in place, so that if a device
      sets one exit latency value to zero, but the other is set to a valid
      value, LPM is only enabled for the U1 or U2 state that had the valid
      value.  This is the same behavior the code had before.
      
      Also, change messages about missing Link PM information from warning
      level to info level.  Only print a warning about the first device that
      doesn't support LPM, to avoid log spam.  Further, cleanup some
      unnecessary line breaks to help people to grep for the error messages.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      25cd2882
  2. 04 3月, 2014 1 次提交
  3. 27 2月, 2014 1 次提交
  4. 19 2月, 2014 1 次提交
    • A
      USB: EHCI: add delay during suspend to prevent erroneous wakeups · 3e8d6d85
      Alan Stern 提交于
      High-speed USB connections revert back to full-speed signalling when
      the device goes into suspend.  This takes several milliseconds, and
      during that time it's not possible to tell reliably whether the device
      has been disconnected.
      
      On some platforms, the Wake-On-Disconnect circuitry gets confused
      during this intermediate state.  It generates a false wakeup signal,
      which can prevent the controller from going to sleep.
      
      To avoid this problem, this patch adds a 5-ms delay to the
      ehci_bus_suspend() routine if any ports have to switch over to
      full-speed signalling.  (Actually, the delay was already present for
      devices using a particular kind of PHY power management; the patch
      merely causes the delay to be used more widely.)
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Reviewed-by: NPeter Chen <Peter.Chen@freescale.com>
      CC: <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3e8d6d85
  5. 16 2月, 2014 2 次提交
  6. 12 2月, 2014 5 次提交
    • P
      USB: ELAN: Remove useless "default M" lines · ea17c7c6
      Paul Bolle 提交于
      The Kconfig entries for USB_U132_HCD and USB_FTDI_ELAN default to
      (uppercase) "M". But in Kconfig (lowercase) "m" is a magic symbol. "M"
      is an ordinary symbol. As "M" is never set these Kconfig symbols will
      also not be set by default.
      
      Since I'm not aware of a reason why these driver should be set by
      default, let's just drop these lines (that basically do nothing).
      Signed-off-by: NPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ea17c7c6
    • A
      USB: ohci-platform: check for platform data misconfiguration · adff5295
      Alan Stern 提交于
      The ohci-platform driver checks for misconfigurations in cases where
      the Device Tree data specifies big-endian registers or descriptors but
      the corresponding driver config settings have not been enabled.  As
      Jonas Gorski suggested, we may as well apply the same check to general
      platform data too.
      
      This requires moving the code that sets the big-endian quirk flags
      from the ohci_platform_reset() routine into ohci_platform_probe(), and
      moving the checks out of the DT-specific "if" statement clause.
      
      The patch also changes the text of the error messages in an attempt to
      make the nature of the error more clear.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Reported-by: NJonas Gorski <jogo@openwrt.org>
      Acked-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      adff5295
    • A
      USB: ehci-platform: check for platform data misconfiguration · 843d5e03
      Alan Stern 提交于
      The ehci-platform driver checks for misconfigurations in cases where
      the Device Tree data specifies big-endian registers or descriptors but
      the corresponding driver config settings have not been enabled.  As
      Jonas Gorski suggested, we may as well apply the same check to general
      platform data too.
      
      This requires moving the code that sets the big-endian quirk flags
      from the ehci_platform_reset() routine into ehci_platform_probe(), and
      moving the checks out of the DT-specific "if" statement clause.
      
      The patch also changes the text of the error messages in an attempt to
      make the nature of the error more clear.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Reported-by: NJonas Gorski <jogo@openwrt.org>
      Acked-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      843d5e03
    • H
      ehci-platform: Change compatible string from usb-ehci to generic-ehci · 915974c3
      Hans de Goede 提交于
      The initial versions of the devicetree enablement patches for ehci-platform
      used "ehci-platform" as compatible string. However this was disliked by various
      reviewers because the platform bus is a Linux invention and devicetree is
      supposed to be OS agnostic. After much discussion I gave up, added a:
      "depends on !PPC_OF" to Kconfig to avoid a known conflict with PPC-OF platforms
      and went with the generic usb-ehci as requested.
      
      In retro-spect I should have chosen something different, the dts files for many
      existing boards already claim to be compatible with "usb-ehci", ie they have:
      
      	compatible = "ti,ehci-omap", "usb-ehci";
      
      In theory this should not be a problem since the "ti,ehci-omap" entry takes
      presedence, but in practice using a conflicting compatible string is an issue,
      because it makes which driver gets used depend on driver registration order.
      
      This patch changes the compatible string claimed by ehci-platform to
      "generic-ehci", avoiding the driver registration / module loading ordering
      problems, and removes the "depends on !PPC_OF" workaround.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Tested-by: NKevin Hilman <khilman@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      915974c3
    • H
      ohci-platform: Change compatible string from usb-ohci to generic-ohci · ce149c30
      Hans de Goede 提交于
      The initial versions of the devicetree enablement patches for ohci-platform
      used "ohci-platform" as compatible string. However this was disliked by various
      reviewers because the platform bus is a Linux invention and devicetree is
      supposed to be OS agnostic. After much discussion I gave up and went with
      the generic usb-ohci as requested.
      
      In retro-spect I should have chosen something different, the dts files for many
      existing boards already claim to be compatible with "usb-ohci", ie they have:
      
      	compatible = "ti,ohci-omap3", "usb-ohci";
      
      In theory this should not be a problem since the "ti,ohci-omap3" entry takes
      presedence, but in practice using a conflicting compatible string is an issue,
      because it makes which driver gets used depend on driver registration order.
      
      This patch changes the compatible string claimed by ohci-platform to
      "generic-ohci", avoiding the driver registration / module loading ordering
      problems.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Tested-by: NKevin Hilman <khilman@linaro.org>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ce149c30
  7. 08 2月, 2014 8 次提交
  8. 31 1月, 2014 1 次提交
  9. 30 1月, 2014 1 次提交
    • S
      Revert "xhci: replace xhci_write_64() with writeq()" · 477632df
      Sarah Sharp 提交于
      This reverts commit 7dd09a1a.
      
      Many xHCI host controllers can only handle 32-bit addresses, and writing
      64-bits at a time causes them to fail.  Rafał reports that USB devices
      simply do not enumerate, and reverting this patch helps.  Branimir
      reports that his host controller doesn't respond to an Enable Slot
      command and dies:
      
      [   75.576160] xhci_hcd 0000:03:00.0: Timeout while waiting for a slot
      [   88.991634] xhci_hcd 0000:03:00.0: Stopped the command ring failed, maybe the host is dead
      [   88.991748] xhci_hcd 0000:03:00.0: Abort command ring failed
      [   88.991845] xhci_hcd 0000:03:00.0: HC died; cleaning up
      [   93.985489] xhci_hcd 0000:03:00.0: Timeout while waiting for a slot
      [   93.985494] xhci_hcd 0000:03:00.0: Abort the command ring, but the xHCI is dead.
      [   98.982586] xhci_hcd 0000:03:00.0: Timeout while waiting for a slot
      [   98.982591] xhci_hcd 0000:03:00.0: Abort the command ring, but the xHCI is dead.
      [  103.979696] xhci_hcd 0000:03:00.0: Timeout while waiting for a slot
      [  103.979702] xhci_hcd 0000:03:00.0: Abort the command ring, but the xHCI is dead
      Signed-off-by: NSarah Sharp <sarah.a.sharp@intel.com>
      Reported-by: NRafał Miłecki <zajec5@gmail.com>
      Reported-by: NBranimir Maksimovic <branimir.maksimovic@gmail.com>
      Cc: Xenia Ragiadakou <burzalodowa@gmail.com>
      477632df
  10. 23 1月, 2014 1 次提交
  11. 14 1月, 2014 1 次提交
  12. 13 1月, 2014 1 次提交
  13. 09 1月, 2014 3 次提交
    • P
      usb: delete non-required instances of include <linux/init.h> · 803a5362
      Paul Gortmaker 提交于
      None of these files are actually using any __init type directives
      and hence don't need to include <linux/init.h>.  Most are just a
      left over from __devinit and __cpuinit removal, or simply due to
      code getting copied from one driver to the next.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      803a5362
    • S
      xhci: Set scatter-gather limit to avoid failed block writes. · f2d9b991
      Sarah Sharp 提交于
      Commit 35773dac "usb: xhci: Link TRB
      must not occur within a USB payload burst" attempted to fix an issue
      found with USB ethernet adapters, and inadvertently broke USB storage
      devices.  The patch attempts to ensure that transfers never span a
      segment, and rejects transfers that have more than 63 entries (or
      possibly less, if some entries cross 64KB boundaries).
      
      usb-storage limits the maximum transfer size to 120K, and we had assumed
      the block layer would pass a scatter-gather list of 4K entries,
      resulting in no more than 31 sglist entries:
      
      http://marc.info/?l=linux-usb&m=138498190419312&w=2
      
      That assumption was wrong, since we've seen the driver reject a write
      that was 218 sectors long (of probably 512 bytes each):
      
      Jan  1 07:04:49 jidanni5 kernel: [  559.624704] xhci_hcd 0000:00:14.0: Too many fragments 79, max 63
      ...
      Jan  1 07:04:58 jidanni5 kernel: [  568.622583] Write(10): 2a 00 00 06 85 0e 00 00 da 00
      
      Limit the number of scatter-gather entries to half a ring segment.  That
      should be margin enough in case some entries cross 64KB boundaries.
      Increase the number of TRBs per segment from 64 to 256, which should
      result in ring segments fitting on a 4K page.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Reported-by: jidanni@jidanni.org
      References: http://bugs.debian.org/733907
      Fixes: 35773dac ('usb: xhci: Link TRB must not occur within a USB payload burst')
      Cc: stable <stable@vger.kernel.org> # 3.12
      f2d9b991
    • B
      xhci: Avoid infinite loop when sg urb requires too many trbs · d6c9ea90
      Ben Hutchings 提交于
      Currently prepare_ring() returns -ENOMEM if the urb won't fit into a
      single ring segment.  usb_sg_wait() treats this error as a temporary
      condition and will keep retrying until something else goes wrong.
      
      The number of retries should be limited in usb_sg_wait(), but also
      prepare_ring() should not return an error code that suggests it might
      be worth retrying.  Change it to -EINVAL.
      
      Reported-by: jidanni@jidanni.org
      References: http://bugs.debian.org/733907
      Fixes: 35773dac ('usb: xhci: Link TRB must not occur within a USB payload burst')
      Cc: stable <stable@vger.kernel.org> # 3.12
      Signed-off-by: NBen Hutchings <ben@decadent.org.uk>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      d6c9ea90
  14. 08 1月, 2014 1 次提交
  15. 20 12月, 2013 1 次提交
  16. 19 12月, 2013 9 次提交