Skip to content

Commit

Permalink
[POWERPC] Fix IO Window Updates on P2P bridges.
Browse files Browse the repository at this point in the history
When update_bridge_base() updates the IO window on a PCI-to-PCI
bridge, it fails to zero the upper 16 bits of the base and limit
registers if the window size is less than 64K.  This fixes it.

Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Randy Vinson authored and Paul Mackerras committed Oct 16, 2006
1 parent 8ba738c commit 60b2a46
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions arch/powerpc/kernel/pci_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,14 +441,14 @@ update_bridge_base(struct pci_bus *bus, int i)
end = res->end - off;
io_base_lo = (start >> 8) & PCI_IO_RANGE_MASK;
io_limit_lo = (end >> 8) & PCI_IO_RANGE_MASK;
if (end > 0xffff) {
pci_write_config_word(dev, PCI_IO_BASE_UPPER16,
start >> 16);
pci_write_config_word(dev, PCI_IO_LIMIT_UPPER16,
end >> 16);
if (end > 0xffff)
io_base_lo |= PCI_IO_RANGE_TYPE_32;
} else
else
io_base_lo |= PCI_IO_RANGE_TYPE_16;
pci_write_config_word(dev, PCI_IO_BASE_UPPER16,
start >> 16);
pci_write_config_word(dev, PCI_IO_LIMIT_UPPER16,
end >> 16);
pci_write_config_byte(dev, PCI_IO_BASE, io_base_lo);
pci_write_config_byte(dev, PCI_IO_LIMIT, io_limit_lo);

Expand Down

0 comments on commit 60b2a46

Please sign in to comment.