diff options
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r-- | drivers/pci/probe.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 509494381a7a..ef09f5f2fe6c 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -252,6 +252,7 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, | |||
252 | /* Address above 32-bit boundary; disable the BAR */ | 252 | /* Address above 32-bit boundary; disable the BAR */ |
253 | pci_write_config_dword(dev, pos, 0); | 253 | pci_write_config_dword(dev, pos, 0); |
254 | pci_write_config_dword(dev, pos + 4, 0); | 254 | pci_write_config_dword(dev, pos + 4, 0); |
255 | res->flags |= IORESOURCE_UNSET; | ||
255 | region.start = 0; | 256 | region.start = 0; |
256 | region.end = sz64; | 257 | region.end = sz64; |
257 | bar_disabled = true; | 258 | bar_disabled = true; |
@@ -1107,10 +1108,10 @@ int pci_setup_device(struct pci_dev *dev) | |||
1107 | pci_read_config_word(dev, PCI_SUBSYSTEM_ID, &dev->subsystem_device); | 1108 | pci_read_config_word(dev, PCI_SUBSYSTEM_ID, &dev->subsystem_device); |
1108 | 1109 | ||
1109 | /* | 1110 | /* |
1110 | * Do the ugly legacy mode stuff here rather than broken chip | 1111 | * Do the ugly legacy mode stuff here rather than broken chip |
1111 | * quirk code. Legacy mode ATA controllers have fixed | 1112 | * quirk code. Legacy mode ATA controllers have fixed |
1112 | * addresses. These are not always echoed in BAR0-3, and | 1113 | * addresses. These are not always echoed in BAR0-3, and |
1113 | * BAR0-3 in a few cases contain junk! | 1114 | * BAR0-3 in a few cases contain junk! |
1114 | */ | 1115 | */ |
1115 | if (class == PCI_CLASS_STORAGE_IDE) { | 1116 | if (class == PCI_CLASS_STORAGE_IDE) { |
1116 | u8 progif; | 1117 | u8 progif; |
@@ -1121,11 +1122,15 @@ int pci_setup_device(struct pci_dev *dev) | |||
1121 | res = &dev->resource[0]; | 1122 | res = &dev->resource[0]; |
1122 | res->flags = LEGACY_IO_RESOURCE; | 1123 | res->flags = LEGACY_IO_RESOURCE; |
1123 | pcibios_bus_to_resource(dev->bus, res, ®ion); | 1124 | pcibios_bus_to_resource(dev->bus, res, ®ion); |
1125 | dev_info(&dev->dev, "legacy IDE quirk: reg 0x10: %pR\n", | ||
1126 | res); | ||
1124 | region.start = 0x3F6; | 1127 | region.start = 0x3F6; |
1125 | region.end = 0x3F6; | 1128 | region.end = 0x3F6; |
1126 | res = &dev->resource[1]; | 1129 | res = &dev->resource[1]; |
1127 | res->flags = LEGACY_IO_RESOURCE; | 1130 | res->flags = LEGACY_IO_RESOURCE; |
1128 | pcibios_bus_to_resource(dev->bus, res, ®ion); | 1131 | pcibios_bus_to_resource(dev->bus, res, ®ion); |
1132 | dev_info(&dev->dev, "legacy IDE quirk: reg 0x14: %pR\n", | ||
1133 | res); | ||
1129 | } | 1134 | } |
1130 | if ((progif & 4) == 0) { | 1135 | if ((progif & 4) == 0) { |
1131 | region.start = 0x170; | 1136 | region.start = 0x170; |
@@ -1133,11 +1138,15 @@ int pci_setup_device(struct pci_dev *dev) | |||
1133 | res = &dev->resource[2]; | 1138 | res = &dev->resource[2]; |
1134 | res->flags = LEGACY_IO_RESOURCE; | 1139 | res->flags = LEGACY_IO_RESOURCE; |
1135 | pcibios_bus_to_resource(dev->bus, res, ®ion); | 1140 | pcibios_bus_to_resource(dev->bus, res, ®ion); |
1141 | dev_info(&dev->dev, "legacy IDE quirk: reg 0x18: %pR\n", | ||
1142 | res); | ||
1136 | region.start = 0x376; | 1143 | region.start = 0x376; |
1137 | region.end = 0x376; | 1144 | region.end = 0x376; |
1138 | res = &dev->resource[3]; | 1145 | res = &dev->resource[3]; |
1139 | res->flags = LEGACY_IO_RESOURCE; | 1146 | res->flags = LEGACY_IO_RESOURCE; |
1140 | pcibios_bus_to_resource(dev->bus, res, ®ion); | 1147 | pcibios_bus_to_resource(dev->bus, res, ®ion); |
1148 | dev_info(&dev->dev, "legacy IDE quirk: reg 0x1c: %pR\n", | ||
1149 | res); | ||
1141 | } | 1150 | } |
1142 | } | 1151 | } |
1143 | break; | 1152 | break; |