1. 10 12月, 2013 2 次提交
  2. 09 12月, 2013 4 次提交
  3. 04 12月, 2013 1 次提交
  4. 15 11月, 2013 1 次提交
  5. 25 10月, 2013 1 次提交
  6. 20 10月, 2013 1 次提交
  7. 17 10月, 2013 9 次提交
    • D
      usb: hub_activate kill an 'else' · fd1ac4cf
      Dan Williams 提交于
      Remove a few extra lines and make it clear that all implementations
      disable the port by sharing the same line of code.
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      fd1ac4cf
    • J
      usb: hub: Clear Port Reset Change during init/resume · e92aee33
      Julius Werner 提交于
      This patch adds the Port Reset Change flag to the set of bits that are
      preemptively cleared on init/resume of a hub. In theory this bit should
      never be set unexpectedly... in practice it can still happen if BIOS,
      SMM or ACPI code plays around with USB devices without cleaning up
      correctly. This is especially dangerous for XHCI root hubs, which don't
      generate any more Port Status Change Events until all change bits are
      cleared, so this is a good precaution to have (similar to how it's
      already done for the Warm Port Reset Change flag).
      Signed-off-by: NJulius Werner <jwerner@chromium.org>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e92aee33
    • M
      drivers: usb: core: devio.c: Spaces to tabs for proc_control_compat() · 06793f2d
      Matthias Beyer 提交于
      Replaced spaces by tabs for proc_control_compat() function.
      Signed-off-by: NMatthias Beyer <mail@beyermatthias.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      06793f2d
    • M
      drivers: usb: core: devio.c: Spaces to tabs for proc_reapurbnonblock() · 5b32c385
      Matthias Beyer 提交于
      Replaced spaces by tabs for proc_reapurbnonblock() function.
      Signed-off-by: NMatthias Beyer <mail@beyermatthias.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5b32c385
    • S
      usb: Push USB2 LPM disable on disconnect into USB core. · f468f7b9
      Sarah Sharp 提交于
      The USB core currently handles enabling and disabling optional USB power
      management features during device transitions (device suspend/resume,
      driver bind/unbind, device reset, and device disconnect).  Those
      optional power features include Latency Tolerance Messaging (LTM),
      USB 3.0 Link PM, and USB 2.0 Link PM.
      
      The USB core currently enables LPM on device enumeration and disables
      USB 2.0 Link PM when the device is reset.  However, the xHCI driver
      disables LPM when the device is disconnected and the device context is
      freed.  Push the call up into the USB core, in order to be consistent
      with the core handling all power management enabling and disabling.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      f468f7b9
    • M
      xhci: Enable LPM support only for hardwired or BESL devices · 890dae88
      Mathias Nyman 提交于
      Some usb3 devices falsely claim they support usb2 hardware Link PM
      when connected to a usb2 port. We only trust hardwired devices
      or devices with the later BESL LPM support to be LPM enabled as default.
      
      [Note: Sarah re-worked the original patch to move the code into the USB
      core, and updated it to check whether the USB device supports BESL,
      instead of checking if the xHCI port it's connected to supports BESL
      encoding.]
      
      This patch should be backported to kernels as old as 3.11, that
      contain the commit a558ccdc "usb: xhci:
      add USB2 Link power management BESL support".  Without this fix, some
      USB 3.0 devices will not enumerate or work properly under USB 2.0 ports
      on Haswell-ULT systems.
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@vger.kernel.org
      890dae88
    • S
      usb: Don't enable USB 2.0 Link PM by default. · de68bab4
      Sarah Sharp 提交于
      How it's supposed to work:
      --------------------------
      
      USB 2.0 Link PM is a lower power state that some newer USB 2.0 devices
      support.  USB 3.0 devices certified by the USB-IF are required to
      support it if they are plugged into a USB 2.0 only port, or a USB 2.0
      cable is used.  USB 2.0 Link PM requires both a USB device and a host
      controller that supports USB 2.0 hardware-enabled LPM.
      
      USB 2.0 Link PM is designed to be enabled once by software, and the host
      hardware handles transitions to the L1 state automatically.  The premise
      of USB 2.0 Link PM is to be able to put the device into a lower power
      link state when the bus is idle or the device NAKs USB IN transfers for
      a specified amount of time.
      
      ...but hardware is broken:
      --------------------------
      
      It turns out many USB 3.0 devices claim to support USB 2.0 Link PM (by
      setting the LPM bit in their USB 2.0 BOS descriptor), but they don't
      actually implement it correctly.  This manifests as the USB device
      refusing to respond to transfers when it is plugged into a USB 2.0 only
      port under the Haswell-ULT/Lynx Point LP xHCI host.
      
      These devices pass the xHCI driver's simple test to enable USB 2.0 Link
      PM, wait for the port to enter L1, and then bring it back into L0.  They
      only start to break when L1 entry is interleaved with transfers.
      
      Some devices then fail to respond to the next control transfer (usually
      a Set Configuration).  This results in devices never enumerating.
      
      Other mass storage devices (such as a later model Western Digital My
      Passport USB 3.0 hard drive) respond fine to going into L1 between
      control transfers.  They ACK the entry, come out of L1 when the host
      needs to send a control transfer, and respond properly to those control
      transfers.  However, when the first READ10 SCSI command is sent, the
      device NAKs the data phase while it's reading from the spinning disk.
      Eventually, the host requests to put the link into L1, and the device
      ACKs that request.  Then it never responds to the data phase of the
      READ10 command.  This results in not being able to read from the drive.
      
      Some mass storage devices (like the Corsair Survivor USB 3.0 flash
      drive) are well behaved.  They ACK the entry into L1 during control
      transfers, and when SCSI commands start coming in, they NAK the requests
      to go into L1, because they need to be at full power.
      
      Not all USB 3.0 devices advertise USB 2.0 link PM support.  My Point
      Grey USB 3.0 webcam advertises itself as a USB 2.1 device, but doesn't
      have a USB 2.0 BOS descriptor, so we don't enable USB 2.0 Link PM.  I
      suspect that means the device isn't certified.
      
      What do we do about it?
      -----------------------
      
      There's really no good way for the kernel to test these devices.
      Therefore, the kernel needs to disable USB 2.0 Link PM by default, and
      distros will have to enable it by writing 1 to the sysfs file
      /sys/bus/usb/devices/../power/usb2_hardware_lpm.  Rip out the xHCI Link
      PM test, since it's not sufficient to detect these buggy devices, and
      don't automatically enable LPM after the device is addressed.
      
      This patch should be backported to kernels as old as 3.11, that
      contain the commit a558ccdc "usb: xhci:
      add USB2 Link power management BESL support".  Without this fix, some
      USB 3.0 devices will not enumerate or work properly under USB 2.0 ports
      on Haswell-ULT systems.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@vger.kernel.org
      de68bab4
    • S
      usb: Disable USB 2.0 Link PM before device reset. · dcc01c08
      Sarah Sharp 提交于
      Before the USB core resets a device, we need to disable the L1 timeout
      for the roothub, if USB 2.0 Link PM is enabled.  Otherwise the port may
      transition into L1 in between descriptor fetches, before we know if the
      USB device descriptors changed.  LPM will be re-enabled after the
      full device descriptors are fetched, and we can confirm the device still
      supports USB 2.0 LPM after the reset.
      
      We don't need to wait for the USB device to exit L1 before resetting the
      device, since the xHCI roothub port diagrams show a transition to the
      Reset state from any of the Ux states (see Figure 34 in the 2012-08-14
      xHCI specification update).
      
      This patch should be backported to kernels as old as 3.2, that contain
      the commit 65580b43 "xHCI: set USB2
      hardware LPM".  That was the first commit to enable USB 2.0
      hardware-driven Link Power Management.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@vger.kernel.org
      dcc01c08
    • O
      USB: quirks: add touchscreen that is dazzeled by remote wakeup · 614ced91
      Oliver Neukum 提交于
      The device descriptors are messed up after remote wakeup
      Signed-off-by: NOliver Neukum <oneukum@suse.de>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      614ced91
  8. 15 10月, 2013 2 次提交
  9. 14 10月, 2013 1 次提交
  10. 12 10月, 2013 6 次提交
  11. 06 10月, 2013 5 次提交
  12. 27 9月, 2013 2 次提交
  13. 26 9月, 2013 3 次提交
    • K
      usb/core/devio.c: Don't reject control message to endpoint with wrong direction bit · 831abf76
      Kurt Garloff 提交于
      Trying to read data from the Pegasus Technologies NoteTaker (0e20:0101)
      [1] with the Windows App (EasyNote) works natively but fails when
      Windows is running under KVM (and the USB device handed to KVM).
      
      The reason is a USB control message
       usb 4-2.2: control urb: bRequestType=22 bRequest=09 wValue=0200 wIndex=0001 wLength=0008
      This goes to endpoint address 0x01 (wIndex); however, endpoint address
      0x01 does not exist. There is an endpoint 0x81 though (same number,
      but other direction); the app may have meant that endpoint instead.
      
      The kernel thus rejects the IO and thus we see the failure.
      
      Apparently, Linux is more strict here than Windows ... we can't change
      the Win app easily, so that's a problem.
      
      It seems that the Win app/driver is buggy here and the driver does not
      behave fully according to the USB HID class spec that it claims to
      belong to.  The device seems to happily deal with that though (and
      seems to not really care about this value much).
      
      So the question is whether the Linux kernel should filter here.
      Rejecting has the risk that somewhat non-compliant userspace apps/
      drivers (most likely in a virtual machine) are prevented from working.
      Not rejecting has the risk of confusing an overly sensitive device with
      such a transfer. Given the fact that Windows does not filter it makes
      this risk rather small though.
      
      The patch makes the kernel more tolerant: If the endpoint address in
      wIndex does not exist, but an endpoint with toggled direction bit does,
      it will let the transfer through. (It does NOT change the message.)
      
      With attached patch, the app in Windows in KVM works.
       usb 4-2.2: check_ctrlrecip: process 13073 (qemu-kvm) requesting ep 01 but needs 81
      
      I suspect this will mostly affect apps in virtual environments; as on
      Linux the apps would have been adapted to the stricter handling of the
      kernel. I have done that for mine[2].
      
      [1] http://www.pegatech.com/
      [2] https://sourceforge.net/projects/notetakerpen/Signed-off-by: NKurt Garloff <kurt@garloff.de>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      831abf76
    • A
      USB: fix substandard locking for the sysfs files · 232275a0
      Alan Stern 提交于
      This patch straightens out some locking issues in the USB sysfs
      interface:
      
      	Deauthorization will destroy existing configurations.
      	Attributes that read from udev->actconfig need to lock the
      	device to prevent races.  Likewise for the rawdescriptor
      	values.
      
      	Attributes that access an interface's current alternate
      	setting should use ACCESS_ONCE() to obtain the cur_altsetting
      	pointer, to protect against concurrent altsetting changes.
      
      	The supports_autosuspend() attribute routine accesses values
      	from an interface's driver, so it should lock the interface
      	(rather than the usb_device) to protect against concurrent
      	unbinds.  Once this is done, the routine can be simplified
      	considerably.
      
      Scalar values that are stored directly in the usb_device structure are
      always available.  They do not require any locking.  The same is true
      of the cached interface string descriptor, because it is not
      deallocated until the usb_host_interface structure is destroyed.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: Hans de Goede <hdegoede@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      232275a0
    • H
      usb: core: implement AMD remote wakeup quirk · 7868943d
      Huang Rui 提交于
      The following patch is required to resolve remote wake issues with
      certain devices.
      
      Issue description:
      If the remote wake is issued from the device in a specific timing
      condition while the system is entering sleep state then it may cause
      system to auto wake on subsequent sleep cycle.
      
      Root cause:
      Host controller rebroadcasts the Resume signal > 100 µseconds after
      receiving the original resume event from the device. For proper
      function, some devices may require the rebroadcast of resume event
      within the USB spec of 100µS.
      
      Workaroud:
      1. Filter the AMD platforms with Yangtze chipset, then judge of all the usb
      devices are mouse or not. And get out the port id which attached a mouse
      with Pixart controller.
      2. Then reset the port which attached issue device during system resume
      from S3.
      
      [Q] Why the special devices are only mice? Would high speed devices
      such as 3G modem or USB Bluetooth adapter trigger this issue?
      - Current this sensitivity is only confined to devices that use Pixart
        controllers. This controller is designed for use with LS mouse
      devices only. We have not observed any other devices failing. There
      may be a small risk for other devices also but this patch (reset
      device in resume phase) will cover the cases if required.
      
      [Q] Shouldn’t the resume signal be sent within 100 us for every
      device?
      - The Host controller may not send the resume signal within 100us,
        this our host controller specification change. This is why we
      require the patch to prevent side effects on certain known devices.
      
      [Q] Why would clicking mouse INTENSELY to wake the system up trigger
      this issue?
      - This behavior is specific to the devices that use Pixart controller.
        It is timing dependent on when the resume event is triggered during
      the sleep state.
      
      [Q] Is it a host controller issue or mouse?
      - It is the host controller behavior during resume that triggers the
        device incorrect behavior on the next resume.
      
      This patch sets USB_QUIRK_RESET_RESUME flag for these Pixart-based mice
      when they attached to platforms with AMD Yangtze chipset.
      Signed-off-by: NHuang Rui <ray.huang@amd.com>
      Suggested-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7868943d
  14. 24 9月, 2013 1 次提交
  15. 18 9月, 2013 1 次提交