diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2013-08-03 15:44:33 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2013-08-03 15:44:33 +0000 |
commit | 58cc39c26ffe793f4ad536284b48b535de6229b5 (patch) | |
tree | 1eb7b792abe6e9236f998313411ff829baad5ff3 /sys/dev | |
parent | 81b190dbaa32ea102b7db84dbd7e35c56e6d7217 (diff) |
Enable MSI on RT810xE.
ok jsg@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_re_pci.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/pci/if_re_pci.c b/sys/dev/pci/if_re_pci.c index 022f00bf367..a8f388ac7fc 100644 --- a/sys/dev/pci/if_re_pci.c +++ b/sys/dev/pci/if_re_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_re_pci.c,v 1.37 2013/01/16 04:42:44 brad Exp $ */ +/* $OpenBSD: if_re_pci.c,v 1.38 2013/08/03 15:44:32 kettenis Exp $ */ /* * Copyright (c) 2005 Peter Valchev <pvalchev@openbsd.org> @@ -136,6 +136,11 @@ re_pci_attach(struct device *parent, struct device *self, void *aux) pci_intr_handle_t ih; const char *intrstr = NULL; + /* Only enable MSI on RT810xE for now. */ + if (PCI_VENDOR(pa->pa_id) != PCI_VENDOR_REALTEK || + PCI_PRODUCT(pa->pa_id) != PCI_PRODUCT_REALTEK_RT8101E) + pa->pa_flags &= ~PCI_FLAGS_MSI_ENABLED; + pci_set_powerstate(pa->pa_pc, pa->pa_tag, PCI_PMCSR_STATE_D0); #ifndef SMALL_KERNEL @@ -156,7 +161,7 @@ re_pci_attach(struct device *parent, struct device *self, void *aux) } /* Allocate interrupt */ - if (pci_intr_map(pa, &ih)) { + if (pci_intr_map_msi(pa, &ih) != 0 && pci_intr_map(pa, &ih) != 0) { printf(": couldn't map interrupt\n"); return; } |