1. 04 10月, 2013 1 次提交
  2. 01 10月, 2013 2 次提交
  3. 27 9月, 2013 13 次提交
  4. 26 9月, 2013 8 次提交
    • 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
    • H
      usb: pci-quirks: refactor AMD quirk to abstract AMD chipset types · 22b4f0cd
      Huang Rui 提交于
      This patch abstracts out a AMD chipset type which includes southbridge
      generation and its revision. When os excutes usb_amd_find_chipset_info
      routine to initialize AMD chipset type, driver will know which kind of
      chipset is used.
      
      This update has below benifits:
      - Driver is able to confirm which southbridge generations and their
        revision are used, with chipset detection once.
      - To describe chipset generations with enumeration types brings better
        readability.
      - It's flexible to filter AMD platforms to implement new quirks in future.
      Signed-off-by: NHuang Rui <ray.huang@amd.com>
      Cc: Andiry Xu <andiry.xu@gmail.com>
      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>
      22b4f0cd
    • P
      usb: host: delete chipidea dependency · a746c286
      Peter Chen 提交于
      Now, chipidea host has already depended on USB_EHCI_HCD
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NPeter Chen <peter.chen@freescale.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a746c286
    • T
      usb: ohci/uhci - add soft dependencies on ehci_pci · 05c92da0
      Tom Gundersen 提交于
      Support for specifying soft dependencies in the modules themselves was
      introduced in commit 7cb14ba7.
      
      In Arch we have always been shipping a module.d(5) fragment ordering ohci/uhci
      after ehci. If this ordering is really necessary, it would be great to move it
      to the kernel and getting the correct fragment generated by depmod.
      Signed-off-by: NTom Gundersen <teg@jklm.no>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      05c92da0
    • A
      USB: fix PM config symbol in uhci-hcd, ehci-hcd, and xhci-hcd · f875fdbf
      Alan Stern 提交于
      Since uhci-hcd, ehci-hcd, and xhci-hcd support runtime PM, the .pm
      field in their pci_driver structures should be protected by CONFIG_PM
      rather than CONFIG_PM_SLEEP.  The corresponding change has already
      been made for ohci-hcd.
      
      Without this change, controllers won't do runtime suspend if system
      suspend or hibernation isn't enabled.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: Sarah Sharp <sarah.a.sharp@linux.intel.com>
      CC: <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f875fdbf
    • A
      USB: OHCI: accept very late isochronous URBs · a8693424
      Alan Stern 提交于
      Commit 24f53137 (USB: EHCI: accept very late isochronous URBs)
      changed the isochronous API provided by ehci-hcd.  URBs submitted too
      late, so that the time slots for all their packets have already
      expired, are no longer rejected outright.  Instead the submission is
      accepted, and the URB completes normally with a -EXDEV error for each
      packet.  This is what client drivers expect.
      
      This patch implements the same policy in ohci-hcd.  The change is more
      complicated than it was in ehci-hcd, because ohci-hcd doesn't scan for
      isochronous completions in the same way as ehci-hcd does.  Rather, it
      depends on the hardware adding completed TDs to a "done queue".  Some
      OHCI controller don't handle this properly when a TD's time slot has
      already expired, so we have to avoid adding such TDs to the schedule
      in the first place.  As a result, if the URB was submitted too late
      then none of its TDs will get put on the schedule, so none of them
      will end up on the done queue, so the driver will never realize that
      the URB should be completed.
      
      To solve this problem, the patch adds one to urb_priv->td_cnt for such
      URBs, making it larger than urb_priv->length (td_cnt already gets set
      to the number of TD's that had to be skipped because their slots have
      expired).  Each time an URB is given back, the finish_urb() routine
      looks to see if urb_priv->td_cnt for the next URB on the same endpoint
      is marked in this way.  If so, it gives back the next URB right away.
      
      This should be applied to all kernels containing commit 815fa7b9
      (USB: OHCI: fix logic for scheduling isochronous URBs).
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a8693424
    • A
      USB: UHCI: accept very late isochronous URBs · bef073b0
      Alan Stern 提交于
      Commit 24f53137 (USB: EHCI: accept very late isochronous URBs)
      changed the isochronous API provided by ehci-hcd.  URBs submitted too
      late, so that the time slots for all their packets have already
      expired, are no longer rejected outright.  Instead the submission is
      accepted, and the URB completes normally with a -EXDEV error for each
      packet.  This is what client drivers expect.
      
      This patch implements the same policy in uhci-hcd.  It should be
      applied to all kernels containing commit c44b2250 (UHCI: implement
      new semantics for URB_ISO_ASAP).
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bef073b0
    • A
      USB: iMX21: accept very late isochronous URBs · 8937669f
      Alan Stern 提交于
      Commit 24f53137 (USB: EHCI: accept very late isochronous URBs)
      changed the isochronous API provided by ehci-hcd.  URBs submitted too
      late, so that the time slots for all their packets have already
      expired, are no longer rejected outright.  Instead the submission is
      accepted, and the URB completes normally with a -EXDEV error for each
      packet.  This is what client drivers expect.
      
      The same policy should be implemented in imx21-hcd, but I don't know
      enough about the hardware to do it.  As a second-best substitute, this
      patch treats very late isochronous submissions as though the
      URB_ISO_ASAP flag were set.  I don't have any way to test this change,
      unfortunately.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: Sascha Hauer <kernel@pengutronix.de>
      CC: Martin Fuzzey <mfuzzey@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8937669f
  5. 24 9月, 2013 5 次提交
    • F
      xhci: Fix race between ep halt and URB cancellation · 526867c3
      Florian Wolter 提交于
      The halted state of a endpoint cannot be cleared over CLEAR_HALT from a
      user process, because the stopped_td variable was overwritten in the
      handle_stopped_endpoint() function. So the xhci_endpoint_reset() function will
      refuse the reset and communication with device can not run over this endpoint.
      https://bugzilla.kernel.org/show_bug.cgi?id=60699Signed-off-by: NFlorian Wolter <wolly84@web.de>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      526867c3
    • S
      usb: Fix xHCI host issues on remote wakeup. · 8b3d4570
      Sarah Sharp 提交于
      When a device signals remote wakeup on a roothub, and the suspend change
      bit is set, the host controller driver must not give control back to the
      USB core until the port goes back into the active state.
      
      EHCI accomplishes this by waiting in the get port status function until
      the PORT_RESUME bit is cleared:
      
                              /* stop resume signaling */
                              temp &= ~(PORT_RWC_BITS | PORT_SUSPEND | PORT_RESUME);
                              ehci_writel(ehci, temp, status_reg);
                              clear_bit(wIndex, &ehci->resuming_ports);
                              retval = ehci_handshake(ehci, status_reg,
                                              PORT_RESUME, 0, 2000 /* 2msec */);
      
      Similarly, the xHCI host should wait until the port goes into U0, before
      passing control up to the USB core.  When the port transitions from the
      RExit state to U0, the xHCI driver will get a port status change event.
      We need to wait for that event before passing control up to the USB
      core.
      
      After the port transitions to the active state, the USB core should time
      a recovery interval before it talks to the device.  The length of that
      recovery interval is TRSMRCY, 10 ms, mentioned in the USB 2.0 spec,
      section 7.1.7.7.  The previous xHCI code (which did not wait for the
      port to go into U0) would cause the USB core to violate that recovery
      interval.
      
      This bug caused numerous USB device disconnects on remote wakeup under
      ChromeOS and a Lynx Point LP xHCI host that takes up to 20 ms to move
      from RExit to U0.  ChromeOS is very aggressive about power savings, and
      sets the autosuspend_delay to 100 ms, and disables USB persist.
      
      I attempted to replicate this bug with Ubuntu 12.04, but could not.  I
      used Ubuntu 12.04 on the same platform, with the same BIOS that the bug
      was triggered on ChromeOS with.  I also changed the USB sysfs settings
      as described above, but still could not reproduce the bug under Ubuntu.
      It may be that ChromeOS userspace triggers this bug through additional
      settings.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      8b3d4570
    • M
      xhci: Ensure a command structure points to the correct trb on the command ring · ec7e43e2
      Mathias Nyman 提交于
      If a command on the command ring needs to be cancelled before it is handled
      it can be turned to a no-op operation when the ring is stopped.
      We want to store the command ring enqueue pointer in the command structure
      when the command in enqueued for the cancellation case.
      
      Some commands used to store the command ring dequeue pointers instead of enqueue
      (these often worked because enqueue happends to equal dequeue quite often)
      
      Other commands correctly used the enqueue pointer but did not check if it pointed
      to a valid trb or a link trb, this caused for example stop endpoint command to timeout in
      xhci_stop_device() in about 2% of suspend/resume cases.
      
      This should also solve some weird behavior happening in command cancellation cases.
      
      This patch is based on a patch submitted by Sarah Sharp to linux-usb, but
      then forgotten:
          http://marc.info/?l=linux-usb&m=136269803207465&w=2
      
      This patch should be backported to kernels as old as 3.7, that contain
      the commit b92cc66c "xHCI: add aborting
      command ring function"
      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
      ec7e43e2
    • M
      xhci: Fix oops happening after address device timeout · 284d2055
      Mathias Nyman 提交于
      When a command times out, the command ring is first aborted,
      and then stopped. If the command ring is empty when it is stopped
      the stop event will point to next command which is not yet set.
      xHCI tries to handle this next event often causing an oops.
      
      Don't handle command completion events on stopped cmd ring if ring is
      empty.
      
      This patch should be backported to kernels as old as 3.7, that contain
      the commit b92cc66c "xHCI: add aborting
      command ring function"
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Reported-by: NGiovanni <giovanni.nervi@yahoo.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@vger.kernel.org
      284d2055
    • G
      Revert "Revert "USB: EHCI: support running URB giveback in tasklet context"" · c04ee4b1
      Greg Kroah-Hartman 提交于
      This reverts commit 3b8d7321, which
      brings back commit 428aac8a as it should
      be working for the 3.13-rc1 merge window now that Alan's other fixes are
      here in the tree already.
      
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Ming Lei <ming.lei@canonical.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c04ee4b1
  6. 18 9月, 2013 5 次提交
  7. 13 9月, 2013 1 次提交
  8. 31 8月, 2013 5 次提交