提交 773e27a2 编写于 作者: L Longfang Liu 提交者: Yang Yingliang

USB:ehci:fix Kunpeng920 ehci hardware problem

mainline inclusion
from mainline-5.13
commit 26b75952
category: bugfix
bugzilla: NA
CVE: NA

-------------------------------------------------

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: NAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: NLongfang Liu <liulongfang@huawei.com>
Link: https://lore.kernel.org/r/1617958081-17999-1-git-send-email-liulongfang@huawei.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NWenchao Hao <haowenchao@huawei.com>
Reviewed-by: NWeifeng Su <suweifeng1@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 ff1ab644
...@@ -298,6 +298,9 @@ static int ehci_pci_setup(struct usb_hcd *hcd) ...@@ -298,6 +298,9 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
if (pdev->vendor == PCI_VENDOR_ID_STMICRO if (pdev->vendor == PCI_VENDOR_ID_STMICRO
&& pdev->device == PCI_DEVICE_ID_STMICRO_USB_HOST) && pdev->device == PCI_DEVICE_ID_STMICRO_USB_HOST)
; /* ConneXT has no sbrn register */ ; /* ConneXT has no sbrn register */
else if (pdev->vendor == PCI_VENDOR_ID_HUAWEI
&& pdev->device == 0xa239)
; /* HUAWEI Kunpeng920 USB EHCI has no sbrn register */
else else
pci_read_config_byte(pdev, 0x60, &ehci->sbrn); pci_read_config_byte(pdev, 0x60, &ehci->sbrn);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册