mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 22:21:42 +00:00
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>
This commit is contained in:
parent
664c28480c
commit
075eb9e355
@ -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, ®ion);
|
||||
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, ®ion);
|
||||
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, ®ion);
|
||||
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, ®ion);
|
||||
dev_info(&dev->dev, "legacy IDE quirk: reg 0x1c: %pR\n",
|
||||
res);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user