USB: ehci: reopen solution for Synopsys HC bug
Subsystems (2)
PATCH 1/1 USB: ehci: reopen solution for Synopsys HC bug
A Synopsys USB2.0 core used in Huawei Kunpeng920 SoC has a bug which might cause the host controller not issuing ping.
The detailed description and solution:
--- drivers/usb/host/ehci-pci.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/usb/host/ehci-pci.c +7 -0
@@ -216,6 +216,13 @@ static int ehci_pci_setup(struct usb_hcd *hcd)ehci_info (ehci,"applying MosChip frame-index workaround\n" ); ehci->frame_index_bug =1 ;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 */
Signature · 1 line
2.8.1
Greg KH
maintainerQuoted 5 lines · Longfang Liu
A Synopsys USB2.0 core used in Huawei Kunpeng920 SoC has a bug which might cause the host controller not issuing ping.
The detailed description and solution:
That just points to an existing patch in the tree. Why link to it here in another patch? And that patch is from 2011?
If you want to refer to an id already in the tree, you can do it like:2f7ac6c19997 ("USB: ehci: add workaround for Synopsys HC bug")
Quoted 11 lines
Signed-off-by Longfang Liu <[email protected]>Reviewed-by Yicong Yang <[email protected]>--- drivers/usb/host/ehci-pci.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/usb/host/ehci-pci.c +0
-0
drivers/usb/host/ehci-pci.c static int ehci_pci_setup(struct usb_hcd *hcd) · line 225
Quoted 10 lines
drivers/usb/host/ehci-pci.c +7
-0@@ -216,6 +216,13 @@ static int ehci_pci_setup(struct usb_hcd *hcd)ehci_info (ehci,"applying MosChip frame-index workaround\n" ); ehci->frame_index_bug =1 ;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 ;
Ah, you are adding another "broken" device to the tree, that makes more sense. Can you reword the above description a bit?
thanks,
greg k-h
Quoted 11 lines · Greg KH
Quoted 5 lines · Longfang Liu
A Synopsys USB2.0 core used in Huawei Kunpeng920 SoC has a bug which might cause the host controller not issuing ping.
The detailed description and solution:
That just points to an existing patch in the tree. Why link to it here in another patch? And that patch is from 2011?
If you want to refer to an id already in the tree, you can do it like:
2f7ac6c19997("USB: ehci: add workaround for Synopsys HC bug")
Yes, It's necessary to add this reference.
I will change it in the next patch.
Quoted 15 lines
Quoted 15 lines
Signed-off-by Longfang Liu <[email protected]>Reviewed-by Yicong Yang <[email protected]>--- drivers/usb/host/ehci-pci.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/usb/host/ehci-pci.c +1
-0@@ -216,6 +216,13 @@ static int ehci_pci_setup(struct usb_hcd *hcd)ehci_info (ehci,"applying MosChip frame-index workaround\n" ); ehci->frame_index_bug =1 ;break ; +case PCI_VENDOR_ID_HUAWEI :
Quoted 8 lines
drivers/usb/host/ehci-pci.c static int ehci_pci_setup(struct usb_hcd *hcd) · line 225
Quoted 6 lines
drivers/usb/host/ehci-pci.c +6
-0+/* Synopsys HC bug */ +if (pdev->device ==0xa239 ) { +ehci_info (ehci,"applying Synopsys HC workaround\n" ); + ehci->has_synopsys_hc_bug =1 ; + } +break ;Ah, you are adding another "broken" device to the tree, that makes more sense. Can you reword the above description a bit?
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, 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.
Quoted 6 lines
thanks,
greg k-h
.
Thanks,
Longfang