From a27d4bdc9f6282b295ceccfbed0f3c18ff93d13c Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 12 Jul 2011 13:28:39 +0000 Subject: [PATCH] Properly align the end of a candidate back region based on the window's granularity when growing a PCI-PCI window up. Tested by: dougb MFC after: 3 days --- sys/dev/pci/pci_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c index 93bbf3ab91f..5cbfb4d043a 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -954,7 +954,7 @@ pcib_grow_window(struct pcib_softc *sc, struct pcib_window *w, int type, if (bootverbose) printf("\tback candidate range: %#lx-%#lx\n", start_free, back); - back = roundup2(back + 1, w->step) - 1; + back = roundup2(back + 1, 1ul << w->step) - 1; back -= rman_get_end(w->res); } else back = 0;