PCI: Log IDE resource quirk in dmesg
[linux-2.6-block.git] / drivers / pci / probe.c
index 78335efbbb742f8bad8b9ecd47d7e3e26b10a504..93dad114eaef4051f333b5b856c924f7b45d1bb0 100644 (file)
@@ -1126,10 +1126,10 @@ int pci_setup_device(struct pci_dev *dev)
                pci_read_config_word(dev, PCI_SUBSYSTEM_ID, &dev->subsystem_device);
 
                /*
-                *      Do the ugly legacy mode stuff here rather than broken chip
-                *      quirk code. Legacy mode ATA controllers have fixed
-                *      addresses. These are not always echoed in BAR0-3, and
-                *      BAR0-3 in a few cases contain junk!
+                * Do the ugly legacy mode stuff here rather than broken chip
+                * quirk code. Legacy mode ATA controllers have fixed
+                * addresses. These are not always echoed in BAR0-3, and
+                * BAR0-3 in a few cases contain junk!
                 */
                if (class == PCI_CLASS_STORAGE_IDE) {
                        u8 progif;
@@ -1140,11 +1140,15 @@ int pci_setup_device(struct pci_dev *dev)
                                res = &dev->resource[0];
                                res->flags = LEGACY_IO_RESOURCE;
                                pcibios_bus_to_resource(dev->bus, res, &region);
+                               dev_info(&dev->dev, "legacy IDE quirk: reg 0x10: %pR\n",
+                                        res);
                                region.start = 0x3F6;
                                region.end = 0x3F6;
                                res = &dev->resource[1];
                                res->flags = LEGACY_IO_RESOURCE;
                                pcibios_bus_to_resource(dev->bus, res, &region);
+                               dev_info(&dev->dev, "legacy IDE quirk: reg 0x14: %pR\n",
+                                        res);
                        }
                        if ((progif & 4) == 0) {
                                region.start = 0x170;
@@ -1152,11 +1156,15 @@ int pci_setup_device(struct pci_dev *dev)
                                res = &dev->resource[2];
                                res->flags = LEGACY_IO_RESOURCE;
                                pcibios_bus_to_resource(dev->bus, res, &region);
+                               dev_info(&dev->dev, "legacy IDE quirk: reg 0x18: %pR\n",
+                                        res);
                                region.start = 0x376;
                                region.end = 0x376;
                                res = &dev->resource[3];
                                res->flags = LEGACY_IO_RESOURCE;
                                pcibios_bus_to_resource(dev->bus, res, &region);
+                               dev_info(&dev->dev, "legacy IDE quirk: reg 0x1c: %pR\n",
+                                        res);
                        }
                }
                break;