Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/sys/dev/pci Pull up following revision(s) (requested by r...
details: https://anonhg.NetBSD.org/src/rev/9e19d13f0570
branches: netbsd-6
changeset: 774418:9e19d13f0570
user: martin <martin%NetBSD.org@localhost>
date: Sun Aug 12 18:51:09 2012 +0000
description:
Pull up following revision(s) (requested by riastradh in ticket #476):
sys/dev/pci/if_ath_pci.c: revision 1.46
Fix error branches in ath pci attachment.
Should fix double pci_intr_disestablish if ath_attach fails.
(Still not sure why ath_attach sometimes fails here.)
diffstat:
sys/dev/pci/if_ath_pci.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diffs (48 lines):
diff -r b5608f025fa5 -r 9e19d13f0570 sys/dev/pci/if_ath_pci.c
--- a/sys/dev/pci/if_ath_pci.c Sun Aug 12 18:44:28 2012 +0000
+++ b/sys/dev/pci/if_ath_pci.c Sun Aug 12 18:51:09 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ath_pci.c,v 1.45 2011/10/18 23:04:35 dyoung Exp $ */
+/* $NetBSD: if_ath_pci.c,v 1.45.8.1 2012/08/12 18:51:09 martin Exp $ */
/*-
* Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
@@ -63,7 +63,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ath_pci.c,v 1.45 2011/10/18 23:04:35 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ath_pci.c,v 1.45.8.1 2012/08/12 18:51:09 martin Exp $");
/*
* PCI/Cardbus front-end for the Atheros Wireless LAN controller driver.
@@ -215,8 +215,10 @@
return;
bad3:
pci_intr_disestablish(pc, psc->sc_ih);
+ psc->sc_ih = NULL;
bad1:
bus_space_unmap(psc->sc_iot, psc->sc_ioh, psc->sc_mapsz);
+ psc->sc_mapsz = 0;
bad:
return;
}
@@ -232,10 +234,16 @@
pmf_device_deregister(self);
- if (psc->sc_ih != NULL)
+ if (psc->sc_ih != NULL) {
pci_intr_disestablish(psc->sc_pc, psc->sc_ih);
+ psc->sc_ih = NULL;
+ }
- bus_space_unmap(psc->sc_iot, psc->sc_ioh, psc->sc_mapsz);
+ if (psc->sc_mapsz != 0) {
+ bus_space_unmap(psc->sc_iot, psc->sc_ioh, psc->sc_mapsz);
+ psc->sc_mapsz = 0;
+ }
+
return 0;
}
Home |
Main Index |
Thread Index |
Old Index