patch-2.3.99-pre5 linux/drivers/pci/pci.c
Next file: linux/drivers/usb/usb.c
Previous file: linux/drivers/net/Space.c
Back to the patch index
Back to the overall index
- Lines: 33
- Date:
Tue Apr 11 16:10:32 2000
- Orig file:
v2.3.99-pre4/linux/drivers/pci/pci.c
- Orig date:
Mon Mar 27 08:08:27 2000
diff -u --recursive --new-file v2.3.99-pre4/linux/drivers/pci/pci.c linux/drivers/pci/pci.c
@@ -254,6 +254,23 @@
return 0;
}
+int
+pci_get_interrupt_pin(struct pci_dev *dev, struct pci_dev **bridge)
+{
+ u8 pin;
+
+ pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
+ if (!pin)
+ return -1;
+ pin--;
+ while (dev->bus->self) {
+ pin = (pin + PCI_SLOT(dev->devfn)) % 4;
+ dev = dev->bus->self;
+ }
+ *bridge = dev;
+ return pin;
+}
+
/*
* Registration of PCI drivers and handling of hot-pluggable devices.
*/
@@ -961,7 +978,7 @@
return max;
}
-static int __init pci_bus_exists(const struct list_head *list, int nr)
+int __init pci_bus_exists(const struct list_head *list, int nr)
{
const struct list_head *l;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)