mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
usb: cdnsp: changes PCI Device ID to fix conflict with CNDS3 driver
commit96b96b2a56upstream. Patch changes CDNS_DEVICE_ID in USBSSP PCI Glue driver to remove the conflict with Cadence USBSS driver. cc: <stable@vger.kernel.org> Fixes:3d82904559("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver") Signed-off-by: Pawel Laszczak <pawell@cadence.com> Link: https://lore.kernel.org/r/20230309063048.299378-1-pawell@cadence.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9ea58b69f9
commit
ae90481ebd
@@ -29,32 +29,25 @@
|
|||||||
#define PLAT_DRIVER_NAME "cdns-usbssp"
|
#define PLAT_DRIVER_NAME "cdns-usbssp"
|
||||||
|
|
||||||
#define CDNS_VENDOR_ID 0x17cd
|
#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)
|
#define CDNS_DRD_IF (PCI_CLASS_SERIAL_USB << 8 | 0x80)
|
||||||
|
|
||||||
static struct pci_dev *cdnsp_get_second_fun(struct pci_dev *pdev)
|
static struct pci_dev *cdnsp_get_second_fun(struct pci_dev *pdev)
|
||||||
{
|
{
|
||||||
struct pci_dev *func;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Gets the second function.
|
* Gets the second function.
|
||||||
* It's little tricky, but this platform has two function.
|
* Platform has two function. The fist keeps resources for
|
||||||
* The fist keeps resources for Host/Device while the second
|
* Host/Device while the secon keeps resources for DRD/OTG.
|
||||||
* keeps resources for DRD/OTG.
|
|
||||||
*/
|
*/
|
||||||
func = pci_get_device(pdev->vendor, pdev->device, NULL);
|
if (pdev->device == CDNS_DEVICE_ID)
|
||||||
if (!func)
|
return pci_get_device(pdev->vendor, CDNS_DRD_ID, NULL);
|
||||||
return 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 NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return func;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int cdnsp_pci_probe(struct pci_dev *pdev,
|
static int cdnsp_pci_probe(struct pci_dev *pdev,
|
||||||
const struct pci_device_id *id)
|
const struct pci_device_id *id)
|
||||||
{
|
{
|
||||||
@@ -230,6 +223,8 @@ static const struct pci_device_id cdnsp_pci_ids[] = {
|
|||||||
PCI_CLASS_SERIAL_USB_DEVICE, PCI_ANY_ID },
|
PCI_CLASS_SERIAL_USB_DEVICE, PCI_ANY_ID },
|
||||||
{ PCI_VENDOR_ID_CDNS, CDNS_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,
|
{ PCI_VENDOR_ID_CDNS, CDNS_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,
|
||||||
CDNS_DRD_IF, 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, }
|
{ 0, }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user