aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/probe.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2014-03-05 16:07:03 -0500
committerBjorn Helgaas <bhelgaas@google.com>2014-03-19 17:00:17 -0400
commit075eb9e35578c23ee2414f87d97d2e5065aa1bc1 (patch)
treea69214a2fffc20e257681808cff1172b0b29e681 /drivers/pci/probe.c
parent664c28480c90fb8541bcdd1d4b349e9436165ec7 (diff)
PCI: Log IDE resource quirk in dmesg
Make a note in dmesg when we overwrite legacy IDE BAR info. We previously logged something like this: pci 0000:00:1f.1: reg 0x10: [io 0x0000-0x0007] and then silently overwrote the resource. There's an example in the bugzilla below. This doesn't fix the bugzilla; it just makes what's going on more obvious. No functional change; merely adds some dev_info() calls. Link: https://bugzilla.kernel.org/show_bug.cgi?id=48451 Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r--drivers/pci/probe.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 78335efbbb74..93dad114eaef 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1126,10 +1126,10 @@ int pci_setup_device(struct pci_dev *dev)
1126 pci_read_config_word(dev, PCI_SUBSYSTEM_ID, &dev->subsystem_device); 1126 pci_read_config_word(dev, PCI_SUBSYSTEM_ID, &dev->subsystem_device);
1127 1127
1128 /* 1128 /*
1129 * Do the ugly legacy mode stuff here rather than broken chip 1129 * Do the ugly legacy mode stuff here rather than broken chip
1130 * quirk code. Legacy mode ATA controllers have fixed 1130 * quirk code. Legacy mode ATA controllers have fixed
1131 * addresses. These are not always echoed in BAR0-3, and 1131 * addresses. These are not always echoed in BAR0-3, and
1132 * BAR0-3 in a few cases contain junk! 1132 * BAR0-3 in a few cases contain junk!
1133 */ 1133 */
1134 if (class == PCI_CLASS_STORAGE_IDE) { 1134 if (class == PCI_CLASS_STORAGE_IDE) {
1135 u8 progif; 1135 u8 progif;
@@ -1140,11 +1140,15 @@ int pci_setup_device(struct pci_dev *dev)
1140 res = &dev->resource[0]; 1140 res = &dev->resource[0];
1141 res->flags = LEGACY_IO_RESOURCE; 1141 res->flags = LEGACY_IO_RESOURCE;
1142 pcibios_bus_to_resource(dev->bus, res, &region); 1142 pcibios_bus_to_resource(dev->bus, res, &region);
1143 dev_info(&dev->dev, "legacy IDE quirk: reg 0x10: %pR\n",
1144 res);
1143 region.start = 0x3F6; 1145 region.start = 0x3F6;
1144 region.end = 0x3F6; 1146 region.end = 0x3F6;
1145 res = &dev->resource[1]; 1147 res = &dev->resource[1];
1146 res->flags = LEGACY_IO_RESOURCE; 1148 res->flags = LEGACY_IO_RESOURCE;
1147 pcibios_bus_to_resource(dev->bus, res, &region); 1149 pcibios_bus_to_resource(dev->bus, res, &region);
1150 dev_info(&dev->dev, "legacy IDE quirk: reg 0x14: %pR\n",
1151 res);
1148 } 1152 }
1149 if ((progif & 4) == 0) { 1153 if ((progif & 4) == 0) {
1150 region.start = 0x170; 1154 region.start = 0x170;
@@ -1152,11 +1156,15 @@ int pci_setup_device(struct pci_dev *dev)
1152 res = &dev->resource[2]; 1156 res = &dev->resource[2];
1153 res->flags = LEGACY_IO_RESOURCE; 1157 res->flags = LEGACY_IO_RESOURCE;
1154 pcibios_bus_to_resource(dev->bus, res, &region); 1158 pcibios_bus_to_resource(dev->bus, res, &region);
1159 dev_info(&dev->dev, "legacy IDE quirk: reg 0x18: %pR\n",
1160 res);
1155 region.start = 0x376; 1161 region.start = 0x376;
1156 region.end = 0x376; 1162 region.end = 0x376;
1157 res = &dev->resource[3]; 1163 res = &dev->resource[3];
1158 res->flags = LEGACY_IO_RESOURCE; 1164 res->flags = LEGACY_IO_RESOURCE;
1159 pcibios_bus_to_resource(dev->bus, res, &region); 1165 pcibios_bus_to_resource(dev->bus, res, &region);
1166 dev_info(&dev->dev, "legacy IDE quirk: reg 0x1c: %pR\n",
1167 res);
1160 } 1168 }
1161 } 1169 }
1162 break; 1170 break;