From e0faf22f31c48fb27b43c1825897d26e58feafc4 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 3 May 2009 17:20:00 +0200 Subject: This is my initial working version. There is a bug in boot in this version: subhurd sometimes cannot boot. --- pfinet.old/linux-src/include/linux/bios32.h | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 pfinet.old/linux-src/include/linux/bios32.h (limited to 'pfinet.old/linux-src/include/linux/bios32.h') diff --git a/pfinet.old/linux-src/include/linux/bios32.h b/pfinet.old/linux-src/include/linux/bios32.h new file mode 100644 index 00000000..2f2c14b7 --- /dev/null +++ b/pfinet.old/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 + +#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 -- cgit v1.2.3