]> git.baikalelectronics.ru Git - 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Jul 2018 06:38:29 +0000 (08:38 +0200)
commit0fecf3f34a4a33d34916c959b660fce2801a4c3c
tree66fb6811f6d727c09d048b8401fda320c7d0ca43
parent91b128288fd4f235a2f89230605eccd20025a5a2
usb: core: handle hub C_PORT_OVER_CURRENT condition

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: 51274c3d7f57 ("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>
drivers/usb/core/hub.c