usb: core: hub: fix race condition about TRSMRCY of resume
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Wed, 12 May 2021 02:07:38 +0000 (10:07 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 May 2021 08:40:32 +0000 (10:40 +0200)
commitc4307d4d058801352cf3fa57db097ad4106b9231
treea0d96284def250af7f75ff51d8778356d8c34930
parentffaf604283d773dd0b69df96a842d8af91b2f3fc
usb: core: hub: fix race condition about TRSMRCY of resume

commit 975f94c7d6c306b833628baa9aec3f79db1eb3a1 upstream.

This may happen if the port becomes resume status exactly
when usb_port_resume() gets port status, it still need provide
a TRSMCRY time before access the device.

CC: <stable@vger.kernel.org>
Reported-by: Tianping Fang <tianping.fang@mediatek.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/20210512020738.52961-1-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hub.c