1. 19 Dec, 2013 1 commit
  2. 17 Dec, 2013 2 commits
    • Lin Wang's avatar
      xhci: Remove unused variable 'addr' in inc_deq() and inc_enq(). · 599459d8
      Lin Wang authored
      This patch remove unused variable 'addr' in inc_deq() and inc_enq().
      Signed-off-by: default avatarLin Wang <lin.x.wang@intel.com>
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      599459d8
    • Sarah Sharp's avatar
      usbtest: Fix BOS control test for USB 2.01 devices. · 8cf43285
      Sarah Sharp authored
      Commit c952a8ba "usb: usbtest: add a
      test case to support bos for queue control" will cause USB 2.01 and USB
      2.10 devices with a BOS descriptor to fail case 15 of the control test.
      
      The Link PM errata (released in 2007, updated in 2011) says:
      
      "The value of the bcdUSB field in the standard USB 2.0 Device Descriptor
      is used to indicate that the device supports the request to read the BOS
      Descriptor (i.e.  GetDescriptor(BOS)). Devices that support the BOS
      descriptor must have a bcdUSB value of 0201H or larger."
      
      The current code says that non-SuperSpeed devices *must* return -EPIPE,
      as this comment shows:
      
                      /* sign of this variable means:
                       *  -: tested code must return this (negative) error code
                       *  +: tested code may return this (negative too) error code
                       */
                      int                     expected = 0;
      
      This means the test will fail with USB 2.01 and USB 2.10 devices that
      provide a BOS descriptor.  Change it to only require a stall response if
      the USB device bcdUSB is less than 2.01.
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Acked-by: default avatarHuang Rui <ray.huang@amd.com>
      8cf43285
  3. 13 Dec, 2013 1 commit
  4. 11 Dec, 2013 2 commits
  5. 10 Dec, 2013 3 commits
    • Dan Williams's avatar
      xhci: clarify logging in xhci_setup_device · 6f8ffc0b
      Dan Williams authored
      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: default avatarDan Williams <dan.j.williams@intel.com>
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      6f8ffc0b
    • Dan Williams's avatar
      usb: xhci: change enumeration scheme to 'new scheme' by default · 48fc7dbd
      Dan Williams authored
      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: default avatarAlan Stern <stern@rowland.harvard.edu>
      Reported-by: default avatarDavid Moore <david.moore@gmail.com>
      Suggested-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      48fc7dbd
    • Ming Lei's avatar
      USB: storage: fix compile warning · 40fcd88b
      Ming Lei authored
      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: default avatarkbuild test robot <fengguang.wu@intel.com>
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarMing Lei <ming.lei@canonical.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      40fcd88b
  6. 09 Dec, 2013 31 commits