Commit 18a5184c authored by Longfang Liu's avatar Longfang Liu Committed by Kelsey Skunberg

USB: ehci: reopen solution for Synopsys HC bug

BugLink: https://bugs.launchpad.net/bugs/1885932

commit 1ddcb71a upstream.

A Synopsys USB2.0 core used in Huawei Kunpeng920 SoC has a bug which
might cause the host controller not issuing ping.

Bug description:
After indicating an Interrupt on Async Advance, the software uses the
doorbell mechanism to delete the Next Link queue head of the last
executed queue head. At this time, the host controller still references
the removed queue head(the queue head is NULL). NULL reference causes
the host controller to lose the USB device.

Solution:
After deleting the Next Link queue head, when has_synopsys_hc_bug set
to 1,the software can write one of the valid queue head addresses to
the ASYNCLISTADDR register to allow the host controller to get
the valid queue head. in order to solve that problem, this patch set
the flag for Huawei Kunpeng920

There are detailed instructions and solutions in this patch:
commit 2f7ac6c1 ("USB: ehci: add workaround for Synopsys HC bug")
Signed-off-by: default avatarLongfang Liu <liulongfang@huawei.com>
Cc: stable <stable@vger.kernel.org>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/1591588019-44284-1-git-send-email-liulongfang@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
Signed-off-by: default avatarKelsey Skunberg <kelsey.skunberg@canonical.com>
parent 3bc54946
...@@ -229,6 +229,13 @@ static int ehci_pci_setup(struct usb_hcd *hcd) ...@@ -229,6 +229,13 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
ehci_info(ehci, "applying MosChip frame-index workaround\n"); ehci_info(ehci, "applying MosChip frame-index workaround\n");
ehci->frame_index_bug = 1; ehci->frame_index_bug = 1;
break; break;
case PCI_VENDOR_ID_HUAWEI:
/* Synopsys HC bug */
if (pdev->device == 0xa239) {
ehci_info(ehci, "applying Synopsys HC workaround\n");
ehci->has_synopsys_hc_bug = 1;
}
break;
} }
/* optional debug port, normally in the first BAR */ /* optional debug port, normally in the first BAR */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment