The old way before 2.3.15:
if (device_fn & 0x80)
return PCIBIOS_DEVICE_NOT_FOUND;
outb (FUNC(device_fn), 0xCF8);
outb (bus, 0xCFA);
The new way after 2.3.15:
#define SET(dev) if (dev->devfn) return PCIBIOS_DEVICE_NOT_FOUND; \
outb(FUNC(dev->devfn), 0xCF8); \
outb(dev->bus->number, 0xCFA);
Basically those 4 lines up in the "old way" were all replaced by SET(dev)
macro calls in about 6 functions.
Maybe it's just me, but (dev->devfn) != (dev->devfn & 0x80)... Miss that
& and you hit that return for every device other than the first one (#0)!
So, here's the patch that works for me (tm) and makes the SCSI adapter
(among others) show up again. The "RFC" is to get some input from those
in the know... am I breaking something fundamental by "fixing" it this
way, or was the 2.3.15 patch which introduced SET() just broken?
This is against 2.3.20.
--- linux/arch/i386/kernel/pci-pc.c.stock Tue Oct 12 10:50:47 1999
+++ linux/arch/i386/kernel/pci-pc.c Tue Oct 12 11:00:20 1999
@@ -120,7 +120,7 @@
#define IOADDR(devfn, where) ((0xC000 | ((devfn & 0x78) << 5)) + where)
#define FUNC(devfn) (((devfn & 7) << 1) | 0xf0)
-#define SET(dev) if (dev->devfn) return PCIBIOS_DEVICE_NOT_FOUND; \
+#define SET(dev) if (dev->devfn & 0x80) return PCIBIOS_DEVICE_NOT_FOUND; \
outb(FUNC(dev->devfn), 0xCF8); \
outb(dev->bus->number, 0xCFA);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/