1. 23 1月, 2014 1 次提交
  2. 14 1月, 2014 1 次提交
  3. 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
  4. 08 1月, 2014 1 次提交
  5. 20 12月, 2013 1 次提交
  6. 19 12月, 2013 21 次提交
  7. 18 12月, 2013 2 次提交
  8. 14 12月, 2013 1 次提交
  9. 11 12月, 2013 3 次提交
    • D
      xhci: clarify logging in xhci_setup_device · 6f8ffc0b
      Dan Williams 提交于
      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: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      6f8ffc0b
    • D
      usb: xhci: change enumeration scheme to 'new scheme' by default · 48fc7dbd
      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: NAlan Stern <stern@rowland.harvard.edu>
      Reported-by: NDavid Moore <david.moore@gmail.com>
      Suggested-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      48fc7dbd
    • T
      xhci: Limit the spurious wakeup fix only to HP machines · 6962d914
      Takashi Iwai 提交于
      We've got regression reports that my previous fix for spurious wakeups
      after S5 on HP Haswell machines leads to the automatic reboot at
      shutdown on some machines.  It turned out that the fix for one side
      triggers another BIOS bug in other side.  So, it's exclusive.
      
      Since the original S5 wakeups have been confirmed only on HP machines,
      it'd be safer to apply it only to limited machines.  As a wild guess,
      limiting to machines with HP PCI SSID should suffice.
      
      This patch should be backported to kernels as old as 3.12, that
      contain the commit 638298dc "xhci: Fix
      spurious wakeups after S5 on Haswell".
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=66171
      Cc: stable@vger.kernel.org
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Tested-by: <dashing.meng@gmail.com>
      Reported-by: NNiklas Schnelle <niklas@komani.de>
      Reported-by: NGiorgos <ganastasiouGR@gmail.com>
      Reported-by: <art1@vhex.net>
      6962d914
  10. 10 12月, 2013 1 次提交
  11. 09 12月, 2013 5 次提交