in drivers/pci/setup-res.c: pci_update_resource() why???? new = 0; /* currently everyone zeros the high address */
if ((new & (PCI_BASE_ADDRESS_SPACE|PCI_BASE_ADDRESS_MEM_TYPE_MASK)) == (PCI_BASE_ADDRESS_SPACE_MEMORY|PCI_BASE_ADDRESS_MEM_TYPE_64)) { new = 0; /* currently everyone zeros the high address */ pci_write_config_dword(dev, reg + 4, new); pci_read_config_dword(dev, reg + 4, &check); if (check != new) { printk(KERN_ERR "PCI: Error updating region " "%s/%d (high %08x != %08x)\n", pci_name(dev), resno, new, check); } } On 8/5/05, yhlu <[EMAIL PROTECTED]> wrote: > pci_restore_bars cause that. > it didn't restore that according to if resource is 64 bit or not. So > it overwirte upper 32 bit with 0. > > YH > > file:1b34fc56067ed8ae0ba9b32f46679e13068bb86c -> > file:65ea7d25f6911d7396e19afbf4bb2738906376f7 > --- a/drivers/pci/pci.c > +++ b/drivers/pci/pci.c > @@ -222,6 +222,37 @@ pci_find_parent_resource(const struct pc > } > /** > + * pci_restore_bars - restore a devices BAR values (e.g. after wake-up) > + * @dev: PCI device to have its BARs restored > + * > + * Restore the BAR values for a given device, so as to make it > + * accessible by its driver. > + */ > +void > +pci_restore_bars(struct pci_dev *dev) > +{ > + int i, numres; > + > + switch (dev->hdr_type) { > + case PCI_HEADER_TYPE_NORMAL: > + numres = 6; > + break; > + case PCI_HEADER_TYPE_BRIDGE: > + numres = 2; > + break; > + case PCI_HEADER_TYPE_CARDBUS: > + numres = 1; > + break; > + default: > + /* Should never get here, but just in case... */ > + return; > + } > + > + for (i = 0; i < numres; i ++) > + pci_update_resource(dev, &dev->resource[i], i); > +} > + > +/** > > On 8/5/05, yhlu <[EMAIL PROTECTED]> wrote: > > before I do the cg-update this morning, it didn't mask out the upper 8 bit. > > > > YH > > > > On 8/5/05, Roland Dreier <[EMAIL PROTECTED]> wrote: > > > yhlu> ps. some kernel pci code patch broke sth yesterday night. > > > yhlu> it mask out bit [32-39] > > > > > > Is it possible that all your problems are coming from the PCI setup > > > code incorrectly assigning BARs? > > > > > > - R. > > > > > > - 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/