aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/serial/8250_pci.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c
index fd76542c5977..e3140e5b16cc 100644
--- a/drivers/serial/8250_pci.c
+++ b/drivers/serial/8250_pci.c
@@ -1652,6 +1652,10 @@ static struct pciserial_board pci_boards[] __devinitdata = {
1652 }, 1652 },
1653}; 1653};
1654 1654
1655static const struct pci_device_id softmodem_blacklist[] = {
1656 { PCI_VDEVICE ( AL, 0x5457 ), }, /* ALi Corporation M5457 AC'97 Modem */
1657};
1658
1655/* 1659/*
1656 * Given a complete unknown PCI device, try to use some heuristics to 1660 * Given a complete unknown PCI device, try to use some heuristics to
1657 * guess what the configuration might be, based on the pitiful PCI 1661 * guess what the configuration might be, based on the pitiful PCI
@@ -1660,6 +1664,7 @@ static struct pciserial_board pci_boards[] __devinitdata = {
1660static int __devinit 1664static int __devinit
1661serial_pci_guess_board(struct pci_dev *dev, struct pciserial_board *board) 1665serial_pci_guess_board(struct pci_dev *dev, struct pciserial_board *board)
1662{ 1666{
1667 const struct pci_device_id *blacklist;
1663 int num_iomem, num_port, first_port = -1, i; 1668 int num_iomem, num_port, first_port = -1, i;
1664 1669
1665 /* 1670 /*
@@ -1674,6 +1679,18 @@ serial_pci_guess_board(struct pci_dev *dev, struct pciserial_board *board)
1674 (dev->class & 0xff) > 6) 1679 (dev->class & 0xff) > 6)
1675 return -ENODEV; 1680 return -ENODEV;
1676 1681
1682 /*
1683 * Do not access blacklisted devices that are known not to
1684 * feature serial ports.
1685 */
1686 for (blacklist = softmodem_blacklist;
1687 blacklist < softmodem_blacklist + ARRAY_SIZE(softmodem_blacklist);
1688 blacklist++) {
1689 if (dev->vendor == blacklist->vendor &&
1690 dev->device == blacklist->device)
1691 return -ENODEV;
1692 }
1693
1677 num_iomem = num_port = 0; 1694 num_iomem = num_port = 0;
1678 for (i = 0; i < PCI_NUM_BAR_RESOURCES; i++) { 1695 for (i = 0; i < PCI_NUM_BAR_RESOURCES; i++) {
1679 if (pci_resource_flags(dev, i) & IORESOURCE_IO) { 1696 if (pci_resource_flags(dev, i) & IORESOURCE_IO) {