diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-02-22 22:25:28 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-02-22 22:25:28 +0000 |
commit | b0b37db7180aef18f7808ae040b60462fe03b5cb (patch) | |
tree | fef25502ac459c43b0518945a86d28ed372acd59 | |
parent | 5bc7e9270d02622890244ae7a772920086d8e0ec (diff) |
Avoid unaligned PCI config space access.
ok brad@
-rw-r--r-- | sys/dev/pci/if_bnx.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/if_bnxreg.h | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/pci/if_bnx.c b/sys/dev/pci/if_bnx.c index 8889f2737a6..691690a6317 100644 --- a/sys/dev/pci/if_bnx.c +++ b/sys/dev/pci/if_bnx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bnx.c,v 1.56 2008/02/17 19:34:40 brad Exp $ */ +/* $OpenBSD: if_bnx.c,v 1.57 2008/02/22 22:25:27 kettenis Exp $ */ /*- * Copyright (c) 2006 Broadcom Corporation @@ -3052,11 +3052,9 @@ bnx_chipinit(struct bnx_softc *sc) /* Clear the PCI-X relaxed ordering bit. See errata E3_5708CA0_570. */ if (sc->bnx_flags & BNX_PCIX_FLAG) { - u_int16_t val; - val = pci_conf_read(pa->pa_pc, pa->pa_tag, BNX_PCI_PCIX_CMD); pci_conf_write(pa->pa_pc, pa->pa_tag, BNX_PCI_PCIX_CMD, - val & ~0x2); + val & ~0x20000); } /* Enable the RX_V2P and Context state machines before access. */ diff --git a/sys/dev/pci/if_bnxreg.h b/sys/dev/pci/if_bnxreg.h index efc12af2906..7f94db70a86 100644 --- a/sys/dev/pci/if_bnxreg.h +++ b/sys/dev/pci/if_bnxreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bnxreg.h,v 1.21 2007/09/14 22:53:24 brad Exp $ */ +/* $OpenBSD: if_bnxreg.h,v 1.22 2008/02/22 22:25:27 kettenis Exp $ */ /*- * Copyright (c) 2006 Broadcom Corporation @@ -655,7 +655,7 @@ struct flash_spec { * PCI registers defined in the PCI 2.2 spec. */ #define BNX_PCI_BAR0 0x10 -#define BNX_PCI_PCIX_CMD 0x42 +#define BNX_PCI_PCIX_CMD 0x40 /****************************************************************************/ /* Convenience definitions. */ |