diff --git a/patches.suse/USB-UHCI-adjust-zhaoxin-UHCI-controllers-OverCurrent.patch b/patches.suse/USB-UHCI-adjust-zhaoxin-UHCI-controllers-OverCurrent.patch new file mode 100644 index 0000000..72ee7f9 --- /dev/null +++ b/patches.suse/USB-UHCI-adjust-zhaoxin-UHCI-controllers-OverCurrent.patch @@ -0,0 +1,50 @@ +From dddb342b5b9e482bb213aecc08cbdb201ea4f8da Mon Sep 17 00:00:00 2001 +From: Weitao Wang +Date: Sun, 23 Apr 2023 18:59:52 +0800 +Subject: [PATCH] USB: UHCI: adjust zhaoxin UHCI controllers OverCurrent bit value +Git-commit: dddb342b5b9e482bb213aecc08cbdb201ea4f8da +Patch-mainline: v6.4-rc3 +References: git-fixes + +OverCurrent condition is not standardized in the UHCI spec. +Zhaoxin UHCI controllers report OverCurrent bit active off. +In order to handle OverCurrent condition correctly, the uhci-hcd +driver needs to be told to expect the active-off behavior. + +Suggested-by: Alan Stern +Cc: stable@vger.kernel.org +Signed-off-by: Weitao Wang +Acked-by: Alan Stern +Link: https://lore.kernel.org/r/20230423105952.4526-1-WeitaoWang-oc@zhaoxin.com +Signed-off-by: Greg Kroah-Hartman +Acked-by: Takashi Iwai + +--- + drivers/usb/host/uhci-pci.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/drivers/usb/host/uhci-pci.c b/drivers/usb/host/uhci-pci.c +index 3592f757fe05..7bd2fddde770 100644 +--- a/drivers/usb/host/uhci-pci.c ++++ b/drivers/usb/host/uhci-pci.c +@@ -119,11 +119,13 @@ static int uhci_pci_init(struct usb_hcd *hcd) + + uhci->rh_numports = uhci_count_ports(hcd); + +- /* Intel controllers report the OverCurrent bit active on. +- * VIA controllers report it active off, so we'll adjust the +- * bit value. (It's not standardized in the UHCI spec.) ++ /* ++ * Intel controllers report the OverCurrent bit active on. VIA ++ * and ZHAOXIN controllers report it active off, so we'll adjust ++ * the bit value. (It's not standardized in the UHCI spec.) + */ +- if (to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_VIA) ++ if (to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_VIA || ++ to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_ZHAOXIN) + uhci->oc_low = 1; + + /* HP's server management chip requires a longer port reset delay. */ +-- +2.35.3 + diff --git a/series.conf b/series.conf index 95a7a99..bad3d43 100644 --- a/series.conf +++ b/series.conf @@ -20156,6 +20156,7 @@ patches.suse/drm-msm-dpu-Remove-duplicate-register-defines-from-I.patch patches.suse/USB-usbtmc-Fix-direction-for-0-length-ioctl-control-.patch patches.suse/usb-dwc3-gadget-Improve-dwc3_gadget_suspend-and-dwc3.patch + patches.suse/USB-UHCI-adjust-zhaoxin-UHCI-controllers-OverCurrent.patch patches.suse/usb-dwc3-debugfs-Resume-dwc3-before-accessing-regist.patch patches.suse/usb-typec-altmodes-displayport-fix-pin_assignment_sh.patch patches.suse/usb-gadget-u_ether-Fix-host-MAC-address-case.patch