This is linux/include/linux/pci.h:
--- pci.h- Wed Mar 6 01:01:45 1996
+++ pci.h Wed Mar 6 01:01:53 1996
@@ -536,8 +536,8 @@
* devices. The slot/function address of each device is encoded
* in a single byte as follows:
*
- * 7:4 = slot
- * 3:0 = function
+ * 7:3 = slot
+ * 2:0 = function
*/
#define PCI_DEVFN(slot,func) ((((slot) & 0x1f) << 3) | ((func) & 0x07))
#define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f)