Re: Always zero test in arch/i386/pci/mmconfig-shared.c
Robert Hancock wrote: > You missed this code: name = pci_mmcfg_probes[i].probe(); This calls one of the probe functions above, which will set pci_mmcfg_config_num to something else, as with the name variable. It may set the name but not the config num, if the chipset is recognized but MMCONFIG isn't enabled, etc. Obvious now you've pointed it out. Bit of of a weird way to do things. I might brew up a patch which adds the names to the pci_mmcfg_hostbridge_probe struct, since they appear to be always returned if the probe function is called, and make the probe functions return the config num. Cheers, Scott - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Always zero test in arch/i386/pci/mmconfig-shared.c
Scott Ashcroft wrote: I don't think it makes any change to subsequent flow but the code in pci_mmcfg_check_hostbridge is: pci_mmcfg_config_num = 0; You missed this code: name = pci_mmcfg_probes[i].probe(); This calls one of the probe functions above, which will set pci_mmcfg_config_num to something else, as with the name variable. It may set the name but not the config num, if the chipset is recognized but MMCONFIG isn't enabled, etc. if (name) { printk(KERN_INFO "PCI: Found %s %s MMCONFIG support.\n", name, pci_mmcfg_config_num ? "with" : "without"); } So it will always prints "without". I'd make a patch but I'm not sure what this fix is. Just drop the test, the printk or make it say "which might possibly have"? Cheers, Scott -- Robert Hancock Saskatoon, SK, Canada To email, remove "nospam" from [EMAIL PROTECTED] Home Page: http://www.roberthancock.com/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Always zero test in arch/i386/pci/mmconfig-shared.c
Scott Ashcroft wrote: I don't think it makes any change to subsequent flow but the code in pci_mmcfg_check_hostbridge is: pci_mmcfg_config_num = 0; You missed this code: name = pci_mmcfg_probes[i].probe(); This calls one of the probe functions above, which will set pci_mmcfg_config_num to something else, as with the name variable. It may set the name but not the config num, if the chipset is recognized but MMCONFIG isn't enabled, etc. if (name) { printk(KERN_INFO PCI: Found %s %s MMCONFIG support.\n, name, pci_mmcfg_config_num ? with : without); } So it will always prints without. I'd make a patch but I'm not sure what this fix is. Just drop the test, the printk or make it say which might possibly have? Cheers, Scott -- Robert Hancock Saskatoon, SK, Canada To email, remove nospam from [EMAIL PROTECTED] Home Page: http://www.roberthancock.com/ - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Always zero test in arch/i386/pci/mmconfig-shared.c
Robert Hancock wrote: You missed this code: name = pci_mmcfg_probes[i].probe(); This calls one of the probe functions above, which will set pci_mmcfg_config_num to something else, as with the name variable. It may set the name but not the config num, if the chipset is recognized but MMCONFIG isn't enabled, etc. Obvious now you've pointed it out. Bit of of a weird way to do things. I might brew up a patch which adds the names to the pci_mmcfg_hostbridge_probe struct, since they appear to be always returned if the probe function is called, and make the probe functions return the config num. Cheers, Scott - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/