1. 20 7月, 2017 1 次提交
  2. 20 6月, 2017 1 次提交
  3. 16 6月, 2017 3 次提交
  4. 03 6月, 2017 2 次提交
  5. 27 4月, 2017 1 次提交
    • A
      usb: host: xhci: remove #ifdef around PM functions · d852ed98
      Arnd Bergmann 提交于
      The #ifdef is slightly wrong as it doesn't cover the xhci_priv_resume_quirk()
      function, causing a harmless warning:
      
      drivers/usb/host/xhci-plat.c:58:12: error: 'xhci_priv_resume_quirk' defined but not used [-Werror=unused-function]
       static int xhci_priv_resume_quirk(struct usb_hcd *hcd)
      
      A simpler way to do this correctly is to use __maybe_unused annotations
      that let the compiler silently drop the functions when there is no
      reference.
      
      Fixes: b0c69b4b ("usb: host: plat: Enable xHCI plat runtime PM")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d852ed98
  6. 20 4月, 2017 2 次提交
  7. 08 4月, 2017 16 次提交
  8. 25 1月, 2017 9 次提交
  9. 04 1月, 2017 2 次提交
    • O
      xhci: Fix race related to abort operation · 1c111b6c
      OGAWA Hirofumi 提交于
      Current abort operation has race.
      
          xhci_handle_command_timeout()
            xhci_abort_cmd_ring()
              xhci_write_64(CMD_RING_ABORT)
              xhci_handshake(5s)
      	  do {
      	    check CMD_RING_RUNNING
                  udelay(1)
      					 ...
      					 COMP_CMD_ABORT event
      					 COMP_CMD_STOP event
      					 xhci_handle_stopped_cmd_ring()
      					   restart cmd_ring
                                                 CMD_RING_RUNNING become 1 again
      	  } while ()
                return -ETIMEDOUT
              xhci_write_64(CMD_RING_ABORT)
              /* can abort random command */
      
      To do abort operation correctly, we have to wait both of COMP_CMD_STOP
      event and negation of CMD_RING_RUNNING.
      
      But like above, while timeout handler is waiting negation of
      CMD_RING_RUNNING, event handler can restart cmd_ring. So timeout
      handler never be notice negation of CMD_RING_RUNNING, and retry of
      CMD_RING_ABORT can abort random command (BTW, I guess retry of
      CMD_RING_ABORT was workaround of this race).
      
      To fix this race, this moves xhci_handle_stopped_cmd_ring() to
      xhci_abort_cmd_ring().  And timeout handler waits COMP_CMD_STOP event.
      
      At this point, timeout handler is owner of cmd_ring, and safely
      restart cmd_ring by using xhci_handle_stopped_cmd_ring().
      
      [FWIW, as bonus, this way would be easily extend to add CMD_RING_PAUSE
      operation]
      
      [locks edited as patch is rebased on other locking fixes -Mathias]
      Signed-off-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1c111b6c
    • O
      xhci: Use delayed_work instead of timer for command timeout · cb4d5ce5
      OGAWA Hirofumi 提交于
      This is preparation to fix abort operation race (See "xhci: Fix race
      related to abort operation"). To make timeout sleepable, use
      delayed_work instead of timer.
      
      [change a newly added pending timer fix to pending work -Mathias]
      Signed-off-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cb4d5ce5
  10. 14 11月, 2016 3 次提交