summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2009-03-10 06:21:52 +0000
committermarcel <marcel@FreeBSD.org>2009-03-10 06:21:52 +0000
commita1ed5a2e8155798b76ee2be18e7cdcc3fd75ce5d (patch)
tree68c09525e00490628d09ef37918eed57535fdd6a /sys/dev/pci
parent61f8f7193225ea520b4c7e5ff153d2f754171b9b (diff)
downloadFreeBSD-src-a1ed5a2e8155798b76ee2be18e7cdcc3fd75ce5d.zip
FreeBSD-src-a1ed5a2e8155798b76ee2be18e7cdcc3fd75ce5d.tar.gz
Fix a buglet in revision 189401: when restoring a 64-bit BAR,
write the upper 32-bits in the adjacent bar. The consequences of the buglet were severe enough though: a machine check.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 8804840..d90cd6a 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -3464,7 +3464,7 @@ pci_alloc_map(device_t dev, device_t child, int type, int *rid,
*/
pci_write_config(child, *rid, map, 4);
if (maprange == 64)
- pci_write_config(child, *rid + 4, map, 4);
+ pci_write_config(child, *rid + 4, map >> 32, 4);
pci_write_config(child, PCIR_COMMAND, cmd, 2);
/* Ignore a BAR with a base of 0. */
OpenPOWER on IntegriCloud