Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64228
b: refs/heads/master
c: 436bbd4
h: refs/heads/master
v: v3
  • Loading branch information
Christian Schmidt authored and Linus Torvalds committed Aug 23, 2007
1 parent 81ed47d commit 5e6266b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ad4c2aa6354fad5316565b1cff57f80db0e04db8
refs/heads/master: 436bbd431d41e0fd3bfedb0312ab764b291ddf82
17 changes: 17 additions & 0 deletions trunk/drivers/serial/8250_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1652,6 +1652,10 @@ static struct pciserial_board pci_boards[] __devinitdata = {
},
};

static const struct pci_device_id softmodem_blacklist[] = {
{ PCI_VDEVICE ( AL, 0x5457 ), }, /* ALi Corporation M5457 AC'97 Modem */
};

/*
* Given a complete unknown PCI device, try to use some heuristics to
* guess what the configuration might be, based on the pitiful PCI
Expand All @@ -1660,6 +1664,7 @@ static struct pciserial_board pci_boards[] __devinitdata = {
static int __devinit
serial_pci_guess_board(struct pci_dev *dev, struct pciserial_board *board)
{
const struct pci_device_id *blacklist;
int num_iomem, num_port, first_port = -1, i;

/*
Expand All @@ -1674,6 +1679,18 @@ serial_pci_guess_board(struct pci_dev *dev, struct pciserial_board *board)
(dev->class & 0xff) > 6)
return -ENODEV;

/*
* Do not access blacklisted devices that are known not to
* feature serial ports.
*/
for (blacklist = softmodem_blacklist;
blacklist < softmodem_blacklist + ARRAY_SIZE(softmodem_blacklist);
blacklist++) {
if (dev->vendor == blacklist->vendor &&
dev->device == blacklist->device)
return -ENODEV;
}

num_iomem = num_port = 0;
for (i = 0; i < PCI_NUM_BAR_RESOURCES; i++) {
if (pci_resource_flags(dev, i) & IORESOURCE_IO) {
Expand Down

0 comments on commit 5e6266b

Please sign in to comment.