Ping? IMHO this patch fixes a few structural problems, and although it probably isn't the final desired result, it is a step in the right direction.
Regards, Carl-Daniel Am 22.07.2012 04:39 schrieb Carl-Daniel Hailfinger: > Am 21.07.2012 16:02 schrieb Michael Karcher: >> Am Dienstag, den 17.07.2012, 09:17 +0200 schrieb Carl-Daniel Hailfinger: >> >>> Second patch in the series. Error checking has not changed at all, and I >>> intend to fix that in a second spin of this patch. Right now I just want >>> to check if we're on the same page. > Actually, I plan to commit the error checking change separately because > Niklas Söderlund already sent a patch doing that. > > >>> Signed-off-by: Carl-Daniel Hailfinger <[email protected]> >>> -struct pci_dev *pcidev_dev = NULL; >> Yeah! >> >>> if ((addr = pcidev_readbar(dev, bar)) != 0) { >>> - curaddr = addr; >>> - pcidev_dev = dev; >>> + found_dev = dev; >>> found++; >>> } >> I wonder what to do about this: While the goal of my suggestion was to >> decouple BAR access from the PCI device scan, it is an integral part of >> the scan loop, probably to avoid disabled chips (e.g. for onboard >> components that are not used). > Intel dual port NICs are represented by two PCI devices, but only one of > them has an active BAR for our purposes. It would be unfair of us to > have users guess the right PCI device. > > >> The nice property of the code as-is is >> that you can be sure reading the "primary" BAR will not fail. >> >> As we sometimes need two BARs, having one valid BAR does not mean the >> device is necessarily usable for us, so this check is only half of what >> we need. As already discussed on IRC, passing a set of BARs into this >> function is not really the direction we want to head to, so client code >> needs to be prepared to find unusable BARs anyway. Still, we like >> autoskip. Several ideas come to my mind >> [...] >> All of these approaches of course complicate pcidev_init, but it seems >> like the only choices we have is: >> - do the BAR check the right way (TM) >> - lose the autoskip of disabled PCI devices -- http://www.hailfinger.org/ _______________________________________________ flashrom mailing list [email protected] http://www.flashrom.org/mailman/listinfo/flashrom
