> The SDHC on this machine comes with a 64-bit BAR, so we need to fix
> that XXX.  I did change the error handling a bit such that we give up
> after the first unmappable BAR.  It seems multi-slot controllers are
> rare and it is questionable whether higher numbered slots work if we
> can't properly configure a lower numbered slot.
> 
> ok?

I agree with the intent, but your diff will cause the loop to exit for
any mapping error or if an I/O BAR is found - could the latter occur on
some systems?

I'd rather see something like this:

        for (... ; ...; reg += span) {
                if (pci_mapreg_probe() fails)
                        break;  /* because there is nothing better we can do */

                if (type == PCI_MAPREG_TYPE_IO)
                        span = 4;
                else
                        span = type & PCI_MAPREG_MEM_TYPE_64BIT ? 8 : 4;

                ...
        }

Reply via email to