Commit 182d090b authored by Linus Torvalds's avatar Linus Torvalds Committed by Linus Torvalds

Undo due to weird behaviour on various boxes

Cset exclude: ink@jurassic.park.msu.ru|ChangeSet|20021003201553|58706
parent d08a0a0e
...@@ -46,7 +46,7 @@ static u32 pci_size(u32 base, unsigned long mask) ...@@ -46,7 +46,7 @@ static u32 pci_size(u32 base, unsigned long mask)
static void pci_read_bases(struct pci_dev *dev, unsigned int howmany, int rom) static void pci_read_bases(struct pci_dev *dev, unsigned int howmany, int rom)
{ {
unsigned int pos, reg, next; unsigned int pos, reg, next;
u32 l, l0, sz; u32 l, sz;
struct resource *res; struct resource *res;
for(pos=0; pos<howmany; pos = next) { for(pos=0; pos<howmany; pos = next) {
...@@ -55,12 +55,10 @@ static void pci_read_bases(struct pci_dev *dev, unsigned int howmany, int rom) ...@@ -55,12 +55,10 @@ static void pci_read_bases(struct pci_dev *dev, unsigned int howmany, int rom)
res->name = dev->name; res->name = dev->name;
reg = PCI_BASE_ADDRESS_0 + (pos << 2); reg = PCI_BASE_ADDRESS_0 + (pos << 2);
pci_read_config_dword(dev, reg, &l); pci_read_config_dword(dev, reg, &l);
pci_write_config_dword(dev, reg, 0);
pci_read_config_dword(dev, reg, &l0);
pci_write_config_dword(dev, reg, ~0); pci_write_config_dword(dev, reg, ~0);
pci_read_config_dword(dev, reg, &sz); pci_read_config_dword(dev, reg, &sz);
pci_write_config_dword(dev, reg, l); pci_write_config_dword(dev, reg, l);
if (!sz || sz == 0xffffffff || sz == l0) if (!sz || sz == 0xffffffff)
continue; continue;
if (l == 0xffffffff) if (l == 0xffffffff)
l = 0; l = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment