USB:ehci:fix Kunpeng920 ehci hardware problem
authorLongfang Liu <liulongfang@huawei.com>
Fri, 9 Apr 2021 08:48:01 +0000 (16:48 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 15 Aug 2021 12:00:26 +0000 (14:00 +0200)
commitcc1a4dff23a48a3759b2b024ec62b0f34f200b4d
tree96a10cc55071f42e48bbebafb82d93482acc8c1f
parentbd909fd3878d4cec9bba70d74dce3d8f3e7581fd
USB:ehci:fix Kunpeng920 ehci hardware problem

commit 26b75952ca0b8b4b3050adb9582c8e2f44d49687 upstream.

Kunpeng920's EHCI controller does not have SBRN register.
Reading the SBRN register when the controller driver is
initialized will get 0.

When rebooting the EHCI driver, ehci_shutdown() will be called.
if the sbrn flag is 0, ehci_shutdown() will return directly.
The sbrn flag being 0 will cause the EHCI interrupt signal to
not be turned off after reboot. this interrupt that is not closed
will cause an exception to the device sharing the interrupt.

Therefore, the EHCI controller of Kunpeng920 needs to skip
the read operation of the SBRN register.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Longfang Liu <liulongfang@huawei.com>
Link: https://lore.kernel.org/r/1617958081-17999-1-git-send-email-liulongfang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ehci-pci.c