1. 05 3月, 2014 5 次提交
    • H
      xhci: Check size rather then number of streams when allocating stream ctxs · ee4aa54b
      Hans de Goede 提交于
      Before this a device needing ie 32 stream ctxs would end up with an entry from
      the small_streams_pool which has 256 bytes entries, where as 32 stream ctxs
      need 512 bytes. Things actually keep running for a surprisingly long time
      before crashing because of this.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      ee4aa54b
    • H
      xhci: Free streams when they are still allocated on a set_interface call · df613834
      Hans de Goede 提交于
      And warn about this, as that would be a driver bug.
      
      Like wise drivers should ensure that streams are properly free-ed before a
      device is reset. So lets warn about that too. This already causes warnings
      in the form of:
      
      [   96.982398] xhci_hcd 0000:01:00.0: WARN Can't disable streams for endpoint 0x81
      , streams are already disabled!
      [   96.982400] xhci_hcd 0000:01:00.0: WARN xhci_free_streams() called with non-streams endpoint
      
      But it is better to also warn about the actual cause of this later warnings.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      df613834
    • 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 2 次提交
  3. 03 3月, 2014 9 次提交
  4. 02 3月, 2014 8 次提交
  5. 01 3月, 2014 16 次提交