summaryrefslogtreecommitdiff
path: root/pfinet/linux-src/include/linux/bios32.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2000-02-04 03:21:18 +0000
committerRoland McGrath <roland@gnu.org>2000-02-04 03:21:18 +0000
commit9fd51e9b0ad33a89a83fdbbb66bd20d85f7893fb (patch)
tree8845b79f170028cb4380045c50277bbf075b5b7d /pfinet/linux-src/include/linux/bios32.h
Import of Linux 2.2.12 subset (ipv4 stack and related)
Diffstat (limited to 'pfinet/linux-src/include/linux/bios32.h')
-rw-r--r--pfinet/linux-src/include/linux/bios32.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/pfinet/linux-src/include/linux/bios32.h b/pfinet/linux-src/include/linux/bios32.h
new file mode 100644
index 00000000..2f2c14b7
--- /dev/null
+++ b/pfinet/linux-src/include/linux/bios32.h
@@ -0,0 +1,34 @@
+/*
+ * This is only a stub file to make drivers not yet converted to the new
+ * PCI probing mechanism work. [mj]
+ */
+
+#ifndef BIOS32_H
+#define BIOS32_H
+
+#include <linux/pci.h>
+
+#warning This driver uses the old PCI interface, please fix it (see Documentation/pci.txt)
+
+extern inline int __pcibios_read_irq(unsigned char bus, unsigned char dev_fn, unsigned char *to)
+{
+ struct pci_dev *pdev = pci_find_slot(bus, dev_fn);
+ if (!pdev) {
+ *to = 0;
+ return PCIBIOS_DEVICE_NOT_FOUND;
+ } else {
+ *to = pdev->irq;
+ return PCIBIOS_SUCCESSFUL;
+ }
+}
+
+extern inline int __pcibios_read_config_byte(unsigned char bus,
+ unsigned char dev_fn, unsigned char where, unsigned char *to)
+{
+ return pcibios_read_config_byte(bus, dev_fn, where, to);
+}
+
+#define pcibios_read_config_byte(b,d,w,p) \
+ (((w) == PCI_INTERRUPT_LINE) ? __pcibios_read_irq(b,d,p) : __pcibios_read_config_byte(b,d,w,p))
+
+#endif