Description:
Cleans up the reporting of PCI device numbers when they are printed out by
the PCI IDE driver. The dev->devfn value holds both the device number and
the function number, so it's nicer if they are split out and displayed
separately to the user.

Applies against 2.4.0

--- drivers/ide/ide-pci.c.old   Sat Jan  6 17:51:09 2001
+++ drivers/ide/ide-pci.c       Sat Jan  6 18:09:18 2001
@@ -734,7 +734,7 @@
 
        switch(class_rev) {
                case 4:
-               case 3: printk("%s: IDE controller on PCI bus %02x dev %02x\n", 
d->name, dev->bus->number, dev->devfn);
+               case 3: printk("%s: IDE controller on PCI bus %02x dev %02x fn 
+%02x\n", d->name, dev->bus->number, dev->devfn >> 3, dev->devfn & 7);
                        ide_setup_pci_device(dev, d);
                        return;
                default:        break;
@@ -757,12 +757,12 @@
                        break;
                }
        }
-       printk("%s: IDE controller on PCI bus %02x dev %02x\n", d->name, 
dev->bus->number, dev->devfn);
+       printk("%s: IDE controller on PCI bus %02x dev %02x fn %02x\n", d->name, 
+dev->bus->number, dev->devfn >> 3, dev->devfn & 7);
        ide_setup_pci_device(dev, d);
        if (!dev2)
                return;
        d2 = d;
-       printk("%s: IDE controller on PCI bus %02x dev %02x\n", d2->name, 
dev2->bus->number, dev2->devfn);
+       printk("%s: IDE controller on PCI bus %02x dev %02x fn %02x\n", d2->name, 
+dev2->bus->number, dev2->devfn >> 3, dev2->devfn & 7);
        ide_setup_pci_device(dev2, d2);
 }
 
@@ -790,10 +790,10 @@
                hpt366_device_order_fixup(dev, d);
        else if (!IDE_PCI_DEVID_EQ(d->devid, IDE_PCI_DEVID_NULL) || (dev->class >> 8) 
== PCI_CLASS_STORAGE_IDE) {
                if (IDE_PCI_DEVID_EQ(d->devid, IDE_PCI_DEVID_NULL))
-                       printk("%s: unknown IDE controller on PCI bus %02x device 
%02x, VID=%04x, DID=%04x\n",
-                              d->name, dev->bus->number, dev->devfn, devid.vid, 
devid.did);
+                       printk("%s: unknown IDE controller on PCI bus %02x device %02x 
+fn %02x, VID=%04x, DID=%04x\n",
+                              d->name, dev->bus->number, dev->devfn >> 3, dev->devfn 
+& 7, devid.vid, devid.did);
                else
-                       printk("%s: IDE controller on PCI bus %02x dev %02x\n", 
d->name, dev->bus->number, dev->devfn);
+                       printk("%s: IDE controller on PCI bus %02x dev %02x fn 
+%02x\n", d->name, dev->bus->number, dev->devfn >> 3, dev->devfn & 7);
                ide_setup_pci_device(dev, d);
        }
 }

-- 
Peter Denison <[EMAIL PROTECTED]>
Linux Driver for Promise DC4030VL cards.
See http://www.pnd-pc.demon.co.uk/promise/promise.html for details

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to