Commit b9d42395 authored by Kevin Cernekee's avatar Kevin Cernekee Committed by Greg Kroah-Hartman

tty: rocket: Explicitly list supported PCI IDs

Matching PCI_ANY_ID causes conflicts with RocketPort 2 adapters, which
are supported by a different driver.
Signed-off-by: default avatarKevin Cernekee <cernekee@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 40530365
...@@ -1756,8 +1756,29 @@ static void rp_flush_buffer(struct tty_struct *tty) ...@@ -1756,8 +1756,29 @@ static void rp_flush_buffer(struct tty_struct *tty)
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
static struct pci_device_id __used rocket_pci_ids[] = { static DEFINE_PCI_DEVICE_TABLE(rocket_pci_ids) = {
{ PCI_DEVICE(PCI_VENDOR_ID_RP, PCI_ANY_ID) }, { PCI_DEVICE(PCI_VENDOR_ID_RP, PCI_DEVICE_ID_RP4QUAD) },
{ PCI_DEVICE(PCI_VENDOR_ID_RP, PCI_DEVICE_ID_RP8OCTA) },
{ PCI_DEVICE(PCI_VENDOR_ID_RP, PCI_DEVICE_ID_URP8OCTA) },
{ PCI_DEVICE(PCI_VENDOR_ID_RP, PCI_DEVICE_ID_RP8INTF) },
{ PCI_DEVICE(PCI_VENDOR_ID_RP, PCI_DEVICE_ID_URP8INTF) },
{ PCI_DEVICE(PCI_VENDOR_ID_RP, PCI_DEVICE_ID_RP8J) },
{ PCI_DEVICE(PCI_VENDOR_ID_RP, PCI_DEVICE_ID_RP4J) },
{ PCI_DEVICE(PCI_VENDOR_ID_RP, PCI_DEVICE_ID_RP8SNI) },
{ PCI_DEVICE(PCI_VENDOR_ID_RP, PCI_DEVICE_ID_RP16SNI) },
{ PCI_DEVICE(PCI_VENDOR_ID_RP, PCI_DEVICE_ID_RP16INTF) },
{ PCI_DEVICE(PCI_VENDOR_ID_RP, PCI_DEVICE_ID_URP16INTF) },
{ PCI_DEVICE(PCI_VENDOR_ID_RP, PCI_DEVICE_ID_CRP16INTF) },
{ PCI_DEVICE(PCI_VENDOR_ID_RP, PCI_DEVICE_ID_RP32INTF) },
{ PCI_DEVICE(PCI_VENDOR_ID_RP, PCI_DEVICE_ID_URP32INTF) },
{ PCI_DEVICE(PCI_VENDOR_ID_RP, PCI_DEVICE_ID_RPP4) },
{ PCI_DEVICE(PCI_VENDOR_ID_RP, PCI_DEVICE_ID_RPP8) },
{ PCI_DEVICE(PCI_VENDOR_ID_RP, PCI_DEVICE_ID_RP2_232) },
{ PCI_DEVICE(PCI_VENDOR_ID_RP, PCI_DEVICE_ID_RP2_422) },
{ PCI_DEVICE(PCI_VENDOR_ID_RP, PCI_DEVICE_ID_RP6M) },
{ PCI_DEVICE(PCI_VENDOR_ID_RP, PCI_DEVICE_ID_RP4M) },
{ PCI_DEVICE(PCI_VENDOR_ID_RP, PCI_DEVICE_ID_UPCI_RM3_8PORT) },
{ PCI_DEVICE(PCI_VENDOR_ID_RP, PCI_DEVICE_ID_UPCI_RM3_4PORT) },
{ } { }
}; };
MODULE_DEVICE_TABLE(pci, rocket_pci_ids); MODULE_DEVICE_TABLE(pci, rocket_pci_ids);
...@@ -1779,7 +1800,8 @@ static __init int register_PCI(int i, struct pci_dev *dev) ...@@ -1779,7 +1800,8 @@ static __init int register_PCI(int i, struct pci_dev *dev)
WordIO_t ConfigIO = 0; WordIO_t ConfigIO = 0;
ByteIO_t UPCIRingInd = 0; ByteIO_t UPCIRingInd = 0;
if (!dev || pci_enable_device(dev)) if (!dev || !pci_match_id(rocket_pci_ids, dev) ||
pci_enable_device(dev))
return 0; return 0;
rcktpt_io_addr[i] = pci_resource_start(dev, 0); rcktpt_io_addr[i] = pci_resource_start(dev, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment