Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Revert previous. At least AR9280 and AR9285 app...
details: https://anonhg.NetBSD.org/src/rev/be3a331d0320
branches: trunk
changeset: 341822:be3a331d0320
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Tue Nov 24 18:17:37 2015 +0000
description:
Revert previous. At least AR9280 and AR9285 apparently do not have
working-by-default MSI functionality, despite advertising such.
Fixes PR kern/50465.
diffstat:
sys/dev/pci/if_athn_pci.c | 23 +++++++++--------------
1 files changed, 9 insertions(+), 14 deletions(-)
diffs (69 lines):
diff -r 6dcbc6e887ff -r be3a331d0320 sys/dev/pci/if_athn_pci.c
--- a/sys/dev/pci/if_athn_pci.c Tue Nov 24 15:48:23 2015 +0000
+++ b/sys/dev/pci/if_athn_pci.c Tue Nov 24 18:17:37 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_athn_pci.c,v 1.11 2015/11/17 17:15:29 jakllsch Exp $ */
+/* $NetBSD: if_athn_pci.c,v 1.12 2015/11/24 18:17:37 jakllsch Exp $ */
/* $OpenBSD: if_athn_pci.c,v 1.11 2011/01/08 10:02:32 damien Exp $ */
/*-
@@ -22,7 +22,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_athn_pci.c,v 1.11 2015/11/17 17:15:29 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_athn_pci.c,v 1.12 2015/11/24 18:17:37 jakllsch Exp $");
#include "opt_inet.h"
@@ -66,7 +66,7 @@
/* PCI specific goo. */
pci_chipset_tag_t psc_pc;
pcitag_t psc_tag;
- pci_intr_handle_t *psc_pihp;
+ pci_intr_handle_t psc_pih;
void *psc_ih;
bus_space_tag_t psc_iot;
bus_space_handle_t psc_ioh;
@@ -200,15 +200,14 @@
/*
* Arrange interrupt line.
*/
- if (pci_intr_alloc(pa, &psc->psc_pihp, NULL, 0) != 0) {
+ if (pci_intr_map(pa, &psc->psc_pih) != 0) {
aprint_error_dev(self, "couldn't map interrupt\n");
goto fail1;
}
- intrstr = pci_intr_string(psc->psc_pc, psc->psc_pihp[0], intrbuf,
- sizeof(intrbuf));
- psc->psc_ih = pci_intr_establish(psc->psc_pc, psc->psc_pihp[0],
- IPL_NET, athn_intr, sc);
+ intrstr = pci_intr_string(psc->psc_pc, psc->psc_pih, intrbuf, sizeof(intrbuf));
+ psc->psc_ih = pci_intr_establish(psc->psc_pc, psc->psc_pih, IPL_NET,
+ athn_intr, sc);
if (psc->psc_ih == NULL) {
aprint_error_dev(self, "couldn't map interrupt\n");
goto fail1;
@@ -251,10 +250,6 @@
pci_intr_disestablish(psc->psc_pc, psc->psc_ih);
psc->psc_ih = NULL;
}
- if (psc->psc_pihp != NULL) {
- pci_intr_release(psc->psc_pc, psc->psc_pihp, 1);
- psc->psc_pihp = NULL;
- }
if (psc->psc_mapsz > 0) {
bus_space_unmap(psc->psc_iot, psc->psc_ioh, psc->psc_mapsz);
psc->psc_mapsz = 0;
@@ -304,8 +299,8 @@
if (reg & 0xff00)
pci_conf_write(psc->psc_pc, psc->psc_tag, 0x40, reg & ~0xff00);
- psc->psc_ih = pci_intr_establish(psc->psc_pc, psc->psc_pihp[0],
- IPL_NET, athn_intr, sc);
+ psc->psc_ih = pci_intr_establish(psc->psc_pc, psc->psc_pih, IPL_NET,
+ athn_intr, sc);
if (psc->psc_ih == NULL) {
aprint_error_dev(self, "couldn't map interrupt\n");
return false;
Home |
Main Index |
Thread Index |
Old Index