]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
usb: core: handle hub C_PORT_OVER_CURRENT condition
authorBin Liu <b-liu@ti.com>
Thu, 19 Jul 2018 19:39:37 +0000 (14:39 -0500)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 1 Mar 2019 13:20:24 +0000 (14:20 +0100)
commit9adb52708d36238b86ba5e8d4905da00470c8a41
tree7e31ea7269c6ea65001ad2f6df7ca554986dac70
parent53a93d93423a03e4179c0998d19691bed5f893b6
usb: core: handle hub C_PORT_OVER_CURRENT condition

BugLink: http://bugs.launchpad.net/bugs/1814813
commit 249a32b7eeb3edb6897dd38f89651a62163ac4ed upstream.

Based on USB2.0 Spec Section 11.12.5,

  "If a hub has per-port power switching and per-port current limiting,
  an over-current on one port may still cause the power on another port
  to fall below specific minimums. In this case, the affected port is
  placed in the Power-Off state and C_PORT_OVER_CURRENT is set for the
  port, but PORT_OVER_CURRENT is not set."

so let's check C_PORT_OVER_CURRENT too for over current condition.

Fixes: 08d1dec6f405 ("usb:hub set hub->change_bits when over-current happens")
Cc: <stable@vger.kernel.org>
Tested-by: Alessandro Antenucci <antenucci@korg.it>
Signed-off-by: Bin Liu <b-liu@ti.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/usb/core/hub.c