]> www.infradead.org Git - users/dwmw2/linux.git/commit
USB:fix USB3 devices behind USB3 hubs not resuming at hibernate thaw
authorZhengjun Xing <zhengjun.xing@linux.intel.com>
Wed, 21 Mar 2018 05:29:42 +0000 (13:29 +0800)
committerSasha Levin <alexander.levin@microsoft.com>
Wed, 23 May 2018 01:36:32 +0000 (21:36 -0400)
commit486b5dc1dac74173ba52cb61920a14a8993f7cca
treea6eee74146bfa32d730fdea895c2bb1c2a1f5af9
parenta72042114282da974f8e7547a045af421d65bb35
USB:fix USB3 devices behind USB3 hubs not resuming at hibernate thaw

[ Upstream commit 64627388b50158fd24d6ad88132525b95a5ef573 ]

USB3 hubs don't support global suspend.

USB3 specification 10.10, Enhanced SuperSpeed hubs only support selective
suspend and resume, they do not support global suspend/resume where the
hub downstream facing ports states are not affected.

When system enters hibernation it first enters freeze process where only
the root hub enters suspend, usb_port_suspend() is not called for other
devices, and suspend status flags are not set for them. Other devices are
expected to suspend globally. Some external USB3 hubs will suspend the
downstream facing port at global suspend. These devices won't be resumed
at thaw as the suspend status flag is not set.

A USB3 removable hard disk connected through a USB3 hub that won't resume
at thaw will fail to synchronize SCSI cache, return “cmd cmplt err -71”
error, and needs a 60 seconds timeout which causing system hang for 60s
before the USB host reset the port for the USB3 removable hard disk to
recover.

Fix this by always calling usb_port_suspend() during freeze for USB3
devices.

Signed-off-by: Zhengjun Xing <zhengjun.xing@linux.intel.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
drivers/usb/core/generic.c