summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2011-07-05 16:51:34 +0000
committerkettenis <kettenis@openbsd.org>2011-07-05 16:51:34 +0000
commit40db20dead9463ab8e22b6b16094f93c05b48122 (patch)
treec6f9dceb09c63d37f740824c1d73db19bf4c3228
parentwhen all you have is a hammer, make it a big one. add more checks to pool_chk (diff)
downloadwireguard-openbsd-40db20dead9463ab8e22b6b16094f93c05b48122.tar.xz
wireguard-openbsd-40db20dead9463ab8e22b6b16094f93c05b48122.zip
Stupid driver makes a copy of struct pci_attach_args. Make sure we clear
the MSI enabled flag there such that the driver actually pays attention to it. Found out the hard way by Chris Smith on an 82540EM, which defenitely does not like MSI. ok deraadt@
-rw-r--r--sys/dev/pci/if_em.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index d3e7b5b545c..6d6995e19a0 100644
--- a/sys/dev/pci/if_em.c
+++ b/sys/dev/pci/if_em.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_em.c,v 1.258 2011/06/16 13:21:00 kettenis Exp $ */
+/* $OpenBSD: if_em.c,v 1.259 2011/07/05 16:51:34 kettenis Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
@@ -329,9 +329,9 @@ em_attach(struct device *parent, struct device *self, void *aux)
/* Determine hardware revision */
em_identify_hardware(sc);
- /* Only use MSIe on the newer PCIe parts */
+ /* Only use MSI on the newer PCIe parts */
if (sc->hw.mac_type < em_82571)
- pa->pa_flags &= ~PCI_FLAGS_MSI_ENABLED;
+ sc->osdep.em_pa.pa_flags &= ~PCI_FLAGS_MSI_ENABLED;
/* Parameters (to be read from user) */
if (sc->hw.mac_type >= em_82544) {