Index: drivers/pci/pci.c =================================================================== RCS file: /cvs/linuxppc64/linuxppc64_2_4/drivers/pci/pci.c,v retrieving revision 1.15 diff -u -r1.15 pci.c --- drivers/pci/pci.c 23 Aug 2002 19:17:49 -0000 1.15 +++ drivers/pci/pci.c 4 Sep 2002 18:59:01 -0000 @@ -1040,13 +1040,15 @@ next++; #if BITS_PER_LONG == 64 res->start |= ((unsigned long) l) << 32; - res->end = res->start + sz; - pci_write_config_dword(dev, reg+4, ~0); - pci_read_config_dword(dev, reg+4, &sz); - pci_write_config_dword(dev, reg+4, l); - if (~sz) + if (sz == 0xffffffff) { + pci_write_config_dword(dev, reg+4, ~0); + pci_read_config_dword(dev, reg+4, &sz); + pci_write_config_dword(dev, reg+4, l); + sz = pci_size(sz, 0xffffffff); res->end = res->start + 0xffffffff + - (((unsigned long) ~sz) << 32); + (((unsigned long) sz) << 32); + } + res->end = res->start + sz; #else if (l) { printk(KERN_ERR "PCI: Unable to handle 64-bit address for device %s\n", dev->slot_name);