]> git.itanic.dy.fi Git - linux-stable/commit
usbip:vhci_hcd USB port can get stuck in the disabled state
authorShuah Khan <skhan@linuxfoundation.org>
Thu, 19 Aug 2021 22:59:37 +0000 (16:59 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Sep 2021 11:40:33 +0000 (13:40 +0200)
commit7344a8a80190f7215752f6a90d1903b1f31cc9b9
tree12f36bc48fddbb6f0748c5a031526a3a2bfa966c
parent29c8f13a345d9399648fc5cffad244db0c8e3fa6
usbip:vhci_hcd USB port can get stuck in the disabled state

[ Upstream commit 66cce9e73ec61967ed1f97f30cee79bd9a2bb7ee ]

When a remote usb device is attached to the local Virtual USB
Host Controller Root Hub port, the bound device driver may send
a port reset command.

vhci_hcd accepts port resets only when the device doesn't have
port address assigned to it. When reset happens device is in
assigned/used state and vhci_hcd rejects it leaving the port in
a stuck state.

This problem was found when a blue-tooth or xbox wireless dongle
was passed through using usbip.

A few drivers reset the port during probe including mt76 driver
specific to this bug report. Fix the problem with a change to
honor reset requests when device is in used state (VDEV_ST_USED).

Reported-and-tested-by: Michael <msbroadf@gmail.com>
Suggested-by: Michael <msbroadf@gmail.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20210819225937.41037-1-skhan@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/usbip/vhci_hcd.c