lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 26 Feb 2021 16:21:37 +0800
From:   Longfang Liu <liulongfang@...wei.com>
To:     <gregkh@...uxfoundation.org>, <mathias.nyman@...el.com>
CC:     <linux-usb@...r.kernel.org>, <yisen.zhuang@...wei.com>,
        <linux-kernel@...r.kernel.org>
Subject: [RFC PATCH] USB:XHCI:Modify XHCI driver for USB2.0 controller

Our current XHCI hardware controller has been customized to only
support USB 2.0 ports. When using the current xhci driver, an xhci
controller device and an ehci controller device will be created
automatically. We want the driver to create only one ehci controller.
After modifying the driver as follows, an error will occur.
Is there any other modification method?

Signed-off-by: Longfang Liu <liulongfang@...wei.com>
---
 drivers/usb/host/xhci-pci.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index ef513c2..7296aad 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -364,26 +364,15 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 	/* USB 2.0 roothub is stored in the PCI device now. */
 	hcd = dev_get_drvdata(&dev->dev);
 	xhci = hcd_to_xhci(hcd);
-	xhci->shared_hcd = usb_create_shared_hcd(&xhci_pci_hc_driver, &dev->dev,
-						 pci_name(dev), hcd);
-	if (!xhci->shared_hcd) {
-		retval = -ENOMEM;
-		goto dealloc_usb2_hcd;
-	}
-
+	xhci->shared_hcd = NULL;
 	retval = xhci_ext_cap_init(xhci);
 	if (retval)
 		goto put_usb3_hcd;
 
-	retval = usb_add_hcd(xhci->shared_hcd, dev->irq,
+	retval = usb_add_hcd(xhci->main_hcd, dev->irq,
 			IRQF_SHARED);
 	if (retval)
 		goto put_usb3_hcd;
-	/* Roothub already marked as USB 3.0 speed */
-
-	if (!(xhci->quirks & XHCI_BROKEN_STREAMS) &&
-			HCC_MAX_PSA(xhci->hcc_params) >= 4)
-		xhci->shared_hcd->can_do_streams = 1;
 
 	/* USB-2 and USB-3 roothubs initialized, allow runtime pm suspend */
 	pm_runtime_put_noidle(&dev->dev);
-- 
2.8.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ