On 2021/3/25 下午7:08, 丁宁(富邻) wrote:
There is silmular with:
if(to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_VIA)
uhci->oc_low =1;
Reuse this snippet?
Yes.
Sincerely
LeoLiu-oc
BR
Artie Ding
------------------------------------------------------------------
发件人:LeoLiu-oc <LeoLiu-oc(a)zhaoxin.com>
发送时间:2021年3月22日(星期一) 18:45
收件人:cloud-kernel <cloud-kernel(a)lists.openanolis.org>
抄 送:TonyWWang-oc <TonyWWang-oc(a)zhaoxin.com>om>; TimGuo
<TimGuo(a)zhaoxin.com>om>; CobeChen <CobeChen(a)zhaoxin.com>
主 题:[ck] [patch v1] ck: xhci: Adjust the UHCI Controllers bit value
Over Current condition is not standardized in the UHCI spec.
Zhaoxin UHCI controllers report Over Current active off.
Intel controllers report it active on, so we'll adjust the bit value.
The patch is scheduled to be submitted to the kernel mainline in 2021.
Signed-off-by: LeoLiu-oc <LeoLiu-oc(a)zhaoxin.com>
---
drivers/usb/host/uhci-pci.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/host/uhci-pci.c b/drivers/usb/host/uhci-pci.c
index 0dd944277c99..3c0d4c43b640 100644
--- a/drivers/usb/host/uhci-pci.c
+++ b/drivers/usb/host/uhci-pci.c
@@ -134,6 +134,9 @@ static int uhci_pci_init(struct usb_hcd *hcd)
if (to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_INTEL)
device_set_wakeup_capable(uhci_dev(uhci), true);
+ if (to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_ZHAOXIN)
+ uhci->oc_low = 1;
+
/* Set up pointers to PCI-specific functions */
uhci->reset_hc = uhci_pci_reset_hc;
uhci->check_and_reset_hc = uhci_pci_check_and_reset_hc;
--
2.20.1
_______________________________________________
Cloud Kernel mailing list -- cloud-kernel(a)lists.openanolis.org
To unsubscribe send an email to cloud-kernel-leave(a)lists.openanolis.org