patch "usb: cdnsp: changes PCI Device ID to fix conflict with CNDS3 driver" added to usb-linus
Subsystems (3)
This is a note to let you know that I've just added the patch titled
usb: cdnsp: changes PCI Device ID to fix conflict with CNDS3 driver
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
From 96b96b2a567fb34dd41c87e6cf01f6902ce8cae4 Mon Sep 17 00:00:00 2001
From: Pawel Laszczak <[email protected]>
Date: Thu, 9 Mar 2023 01:30:48 -0500
Subject: usb: cdnsp: changes PCI Device ID to fix conflict with CNDS3 driver
Patch changes CDNS_DEVICE_ID in USBSSP PCI Glue driver to remove the conflict with Cadence USBSS driver.
--- drivers/usb/cdns3/cdnsp-pci.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-)
drivers/usb/cdns3/cdnsp-pci.c +11 -16
@@ -29,30 +29,23 @@#define PLAT_DRIVER_NAME "cdns-usbssp"#define CDNS_VENDOR_ID 0x17cd -#define CDNS_DEVICE_ID 0x0100 +#define CDNS_DEVICE_ID 0x0200 +#define CDNS_DRD_ID 0x0100#define CDNS_DRD_IF (PCI_CLASS_SERIAL_USB << 8 | 0x80)static struct pci_dev *cdnsp_get_second_fun (struct pci_dev *pdev) { -struct pci_dev *func; -/* * Gets the second function. -* It's little tricky, but this platform has two function. -* The fist keeps resources for Host/Device while the second -* keeps resources for DRD/OTG. +* Platform has two function. The fist keeps resources for +* Host/Device while the secon keeps resources for DRD/OTG. */ - func =pci_get_device (pdev->vendor, pdev->device,NULL ); -if (!func) -return NULL ; +if (pdev->device ==CDNS_DEVICE_ID ) +return pci_get_device (pdev->vendor,CDNS_DRD_ID ,NULL ); +else if (pdev->device ==CDNS_DRD_ID ) +return pci_get_device (pdev->vendor,CDNS_DEVICE_ID ,NULL ); -if (func->devfn == pdev->devfn) { - func =pci_get_device (pdev->vendor, pdev->device, func); -if (!func) -return NULL ; - } - -return func; +return NULL ; } static int cdnsp_pci_probe(struct pci_dev *pdev,
@@ -230,6 +223,8 @@ static const struct pci_device_id cdnsp_pci_ids[] = { PCI_CLASS_SERIAL_USB_DEVICE, PCI_ANY_ID }, { PCI_VENDOR_ID_CDNS, CDNS_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID, CDNS_DRD_IF, PCI_ANY_ID }, + { PCI_VENDOR_ID_CDNS, CDNS_DRD_ID, PCI_ANY_ID, PCI_ANY_ID, + CDNS_DRD_IF, PCI_ANY_ID }, { 0, } };
Signature · 1 line
2.40.0