USB: Verify the port status when timeout happens during port suspend
authorChris Chiu <chris.chiu@canonical.com>
Fri, 14 May 2021 04:54:04 +0000 (12:54 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 May 2021 12:06:29 +0000 (14:06 +0200)
commit7142452387c72207f34683382b04f38499da58f7
tree67b4b0394587153959731efae70d3b1d7e48be43
parent106133dacc001e4e3a7ebcdb96368f523bf44a89
USB: Verify the port status when timeout happens during port suspend

On the Realtek high-speed Hub(0bda:5487), the port which has wakeup
enabled_descendants will sometimes timeout when setting PORT_SUSPEND
feature. After checking the PORT_SUSPEND bit in wPortStatus, it is
already set which means the port has been suspended. We should treat
it suspended to make sure it will be resumed correctly.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
Link: https://lore.kernel.org/r/20210514045405.5261-2-chris.chiu@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hub.c