On Wednesday 31 March 2010 12:45:14 pm Ira W. Snyder wrote: > On Wed, Mar 31, 2010 at 12:13:46PM -0600, Bjorn Helgaas wrote: > > On Wednesday 31 March 2010 10:38:42 am Ira W. Snyder wrote: > > The CNB20LE might also be used in systems that *do* have ACPI, and in > > that case, I think we should use ACPI rather than read the info out of > > the hardware. I expect that's what Windows will do, and Linux should > > do the same as Windows when it's practical. Also, that's what the BIOS > > writers expect the OS to do, and _CRS is the logical place for them to > > put platform-specific workarounds. > > Is there any way to detect if we do have ACPI and shouldn't run this > quirk? How? Probably check "acpi_disabled". > > > + pci_read_config_byte(dev, 0x44, &fbus); > > > + pci_read_config_byte(dev, 0x45, &lbus); > > > + dev_dbg(&dev->dev, "CNB20LE: busses: %d to %d\n", fbus, lbus); > > > > Please print the bus number, I/O port, and memory ranges in the same > > format used by %pR, e.g., "[bus 00-ff]", etc. You might as well use > > text similar to that in arch/x86/pci/acpi.c, e.g., "host bridge window". > > Should these have the "window" text that IORESOURCE_WINDOW would print, > too? Just for IORESOURCE_(MEM|IO), or for IORESOURCE_BUS too? Oh, I forgot about the %pR "window" piece. We don't actually use that yet, so I'd just make it match what we do have today, e.g., pci_root PNP0A03:00: host bridge window [io 0x0000-0x0cf7] pci_root PNP0A03:00: host bridge window [mem 0x0c000000-0xffffffff] Obviously, yours will have PCI dev strings like "pci 0000:00:00.0" instead of "pci_root PNP0A03:00". Please use it for the bus range, too. I have a couple patches in flight somewhere that will make us print this for ACPI host bridges: ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff]) Oh, and I also forgot to mention that I think this information is important enough to use dev_info() rather than dev_dbg(). The dev_dbg() is compiled out completely unless CONFIG_PCI_DEBUG is set, so I usually use "dev_printk(KERN_DEBUG, ...)" for things I want to be in dmesg but not on the console. And I think this whole file probably should go under a config option, since it's really pretty specialized and only of interest to a few boards that use this chipset but don't have ACPI. Bjorn -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html