1. 17 10月, 2017 2 次提交
  2. 17 8月, 2017 2 次提交
  3. 20 7月, 2017 1 次提交
  4. 16 6月, 2017 6 次提交
  5. 03 6月, 2017 4 次提交
  6. 18 5月, 2017 4 次提交
    • M
      xhci: Fix command ring stop regression in 4.11 · 604d02a2
      Mathias Nyman 提交于
      In 4.11 TRB completion codes were renamed to match spec.
      
      Completion codes for command ring stopped and endpoint stopped
      were mixed, leading to failures while handling a stopped command ring.
      
      Use the correct completion code for command ring stopped events.
      
      Fixes: 0b7c105a ("usb: host: xhci: rename completion codes to match spec")
      Cc: <stable@vger.kernel.org> # 4.11
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      604d02a2
    • A
      USB: xhci: fix lock-inversion problem · 63aea0db
      Alan Stern 提交于
      With threaded interrupts, bottom-half handlers are called with
      interrupts enabled.  Therefore they can't safely use spin_lock(); they
      have to use spin_lock_irqsave().  Lockdep warns about a violation
      occurring in xhci_irq():
      
      =========================================================
      [ INFO: possible irq lock inversion dependency detected ]
      4.11.0-rc8-dbg+ #1 Not tainted
      ---------------------------------------------------------
      swapper/7/0 just changed the state of lock:
       (&(&ehci->lock)->rlock){-.-...}, at: [<ffffffffa0130a69>]
      ehci_hrtimer_func+0x29/0xc0 [ehci_hcd]
      but this lock took another, HARDIRQ-unsafe lock in the past:
       (hcd_urb_list_lock){+.....}
      
      and interrupts could create inverse lock ordering between them.
      
      other info that might help us debug this:
       Possible interrupt unsafe locking scenario:
      
             CPU0                    CPU1
             ----                    ----
        lock(hcd_urb_list_lock);
                                     local_irq_disable();
                                     lock(&(&ehci->lock)->rlock);
                                     lock(hcd_urb_list_lock);
        <Interrupt>
          lock(&(&ehci->lock)->rlock);
       *** DEADLOCK ***
      
      no locks held by swapper/7/0.
      the shortest dependencies between 2nd lock and 1st lock:
       -> (hcd_urb_list_lock){+.....} ops: 252 {
          HARDIRQ-ON-W at:
                            __lock_acquire+0x602/0x1280
                            lock_acquire+0xd5/0x1c0
                            _raw_spin_lock+0x2f/0x40
                            usb_hcd_unlink_urb_from_ep+0x1b/0x60 [usbcore]
                            xhci_giveback_urb_in_irq.isra.45+0x70/0x1b0 [xhci_hcd]
                            finish_td.constprop.60+0x1d8/0x2e0 [xhci_hcd]
                            xhci_irq+0xdd6/0x1fa0 [xhci_hcd]
                            usb_hcd_irq+0x26/0x40 [usbcore]
                            irq_forced_thread_fn+0x2f/0x70
                            irq_thread+0x149/0x1d0
                            kthread+0x113/0x150
                            ret_from_fork+0x2e/0x40
      
      This patch fixes the problem.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Reported-and-tested-by: NBart Van Assche <bart.vanassche@sandisk.com>
      CC: <stable@vger.kernel.org>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      63aea0db
    • P
      usb: host: xhci-ring: don't need to clear interrupt pending for MSI enabled hcd · 6a29beef
      Peter Chen 提交于
      According to xHCI spec Figure 30: Interrupt Throttle Flow Diagram
      
      	If PCI Message Signaled Interrupts (MSI or MSI-X) are enabled,
             	then the assertion of the Interrupt Pending (IP) flag in Figure 30
             	generates a PCI Dword write. The IP flag is automatically cleared
             	by the completion of the PCI write.
      
      the MSI enabled HCs don't need to clear interrupt pending bit, but
      hcd->irq = 0 doesn't equal to MSI enabled HCD. At some Dual-role
      controller software designs, it sets hcd->irq as 0 to avoid HCD
      requesting interrupt, and they want to decide when to call usb_hcd_irq
      by software.
      Signed-off-by: NPeter Chen <peter.chen@nxp.com>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6a29beef
    • M
      usb: xhci: trace URB before giving it back instead of after · 7bc5d5af
      Mathias Nyman 提交于
      Don't access any members of a URB after giving it back.
      URB might be freed by then already.
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7bc5d5af
  7. 08 4月, 2017 8 次提交
  8. 29 3月, 2017 1 次提交
  9. 25 1月, 2017 12 次提交