david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

Place the call to adjust_pci_device() back in the individual drivers,

since we probably shouldn't be doing this to arbitrary devices during a
PCI bus scan...
This commit is contained in:
Michael Brown 2005-04-16 17:30:37 +00:00
parent b7c55c3951
commit 5ca20abf95
9 changed files with 16 additions and 6 deletions

View File

@ -185,9 +185,6 @@ int find_pci_device ( struct pci_device *pci,
continue;
}
/* Fix up PCI device */
adjust_pci_device ( pci );
/* If driver has a class, and class matches, use it */
if ( driver->class &&
( driver->class == pci->class ) ) {

View File

@ -703,6 +703,8 @@ static int a3c90x_probe ( struct dev *dev, struct pci_device *pci ) {
if (pci->ioaddr == 0)
return 0;
adjust_pci_device(pci);
nic->ioaddr = pci->ioaddr;
nic->irqno = 0;

View File

@ -620,6 +620,8 @@ static int eepro100_probe ( struct dev *dev, struct pci_device *p ) {
ioaddr = p->ioaddr;
nic->ioaddr = ioaddr;
adjust_pci_device(p);
/* Copy IRQ from PCI information */
nic->irqno = p->irq;

View File

@ -684,6 +684,8 @@ static int mtd_probe ( struct dev *dev, struct pci_device *pci ) {
/* Mask the bit that says "this is an io addr" */
mtdx.ioaddr = pci->ioaddr;
adjust_pci_device(pci);
mtdx.nic_name = dev->name;
mtdx.dev_id = pci->dev_id;

View File

@ -253,6 +253,8 @@ natsemi_probe ( struct dev *dev, struct pci_device *pci ) {
if (pci->ioaddr == 0)
return 0;
adjust_pci_device(pci);
/* initialize some commonly used globals */
nic->irqno = 0;

View File

@ -194,6 +194,8 @@ static int rtl8139_probe ( struct dev *dev, struct pci_device *pci ) {
nic->ioaddr = pci->ioaddr;
nic->irqno = pci->irq;
adjust_pci_device(pci);
/* Bring the chip out of low-power mode. */
outb(0x00, nic->ioaddr + Config1);

View File

@ -3239,6 +3239,8 @@ static int tg3_probe ( struct dev *dev, struct pci_device *pdev ) {
memset(tp, 0, sizeof(*tp));
adjust_pci_device(pdev);
nic->irqno = 0;
nic->ioaddr = pdev->ioaddr;
@ -3342,7 +3344,6 @@ static int tg3_probe ( struct dev *dev, struct pci_device *pdev ) {
}
nic->nic_op = &tg3_operations;
return 1;
err_out_iounmap:

View File

@ -794,6 +794,9 @@ static int tlan_probe ( struct dev *dev, struct pci_device *pci ) {
nic->ioaddr = pci->ioaddr;
BASE = pci->ioaddr;
/* Set nic as PCI bus master */
adjust_pci_device(pci);
/* Point to private storage */
priv = &TLanPrivateInfo;

View File

@ -962,12 +962,11 @@ rhine_probe ( struct dev *dev, struct pci_device *pci ) {
return 0;
rhine_probe1 (nic, pci, pci->ioaddr, pci->dev_id, -1);
adjust_pci_device ( pci );
rhine_reset (nic);
nic->nic_op = &rhine_operations;
nic->irqno = pci->irq;
nic->ioaddr = tp->ioaddr;
return 1;
}