Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Deregister PMF handlers during detachment. Comp...
details: https://anonhg.NetBSD.org/src/rev/075b2128f7f3
branches: trunk
changeset: 763832:075b2128f7f3
user: dyoung <dyoung%NetBSD.org@localhost>
date: Mon Apr 04 22:48:15 2011 +0000
description:
Deregister PMF handlers during detachment. Complete the host controller
shutdown.
diffstat:
sys/dev/pci/ehci_pci.c | 8 +++++---
sys/dev/pci/ohci_pci.c | 9 ++++++---
sys/dev/pci/uhci_pci.c | 8 ++++----
3 files changed, 15 insertions(+), 10 deletions(-)
diffs (100 lines):
diff -r 0380111a97bb -r 075b2128f7f3 sys/dev/pci/ehci_pci.c
--- a/sys/dev/pci/ehci_pci.c Mon Apr 04 22:33:32 2011 +0000
+++ b/sys/dev/pci/ehci_pci.c Mon Apr 04 22:48:15 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ehci_pci.c,v 1.51 2011/04/04 20:37:56 dyoung Exp $ */
+/* $NetBSD: ehci_pci.c,v 1.52 2011/04/04 22:48:15 dyoung Exp $ */
/*
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.51 2011/04/04 20:37:56 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.52 2011/04/04 22:48:15 dyoung Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -282,11 +282,13 @@
struct ehci_pci_softc *sc = device_private(self);
int rv;
- pmf_device_deregister(self);
rv = ehci_detach(&sc->sc, flags);
if (rv)
return rv;
+ pmf_device_deregister(self);
+ ehci_shutdown(self, flags);
+
/* disable interrupts */
EOWRITE2(&sc->sc, EHCI_USBINTR, 0);
/* XXX grotty hack to flush the write */
diff -r 0380111a97bb -r 075b2128f7f3 sys/dev/pci/ohci_pci.c
--- a/sys/dev/pci/ohci_pci.c Mon Apr 04 22:33:32 2011 +0000
+++ b/sys/dev/pci/ohci_pci.c Mon Apr 04 22:48:15 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ohci_pci.c,v 1.46 2010/05/25 08:37:10 pgoyette Exp $ */
+/* $NetBSD: ohci_pci.c,v 1.47 2011/04/04 22:48:15 dyoung Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci_pci.c,v 1.46 2010/05/25 08:37:10 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci_pci.c,v 1.47 2011/04/04 22:48:15 dyoung Exp $");
#include "ehci.h"
@@ -186,11 +186,14 @@
struct ohci_pci_softc *sc = device_private(self);
int rv;
- pmf_device_deregister(self);
rv = ohci_detach(&sc->sc, flags);
if (rv)
return rv;
+ pmf_device_deregister(self);
+
+ ohci_shutdown(self, flags);
+
if (sc->sc.sc_size) {
/* Disable interrupts, so we don't get any spurious ones. */
bus_space_write_4(sc->sc.iot, sc->sc.ioh,
diff -r 0380111a97bb -r 075b2128f7f3 sys/dev/pci/uhci_pci.c
--- a/sys/dev/pci/uhci_pci.c Mon Apr 04 22:33:32 2011 +0000
+++ b/sys/dev/pci/uhci_pci.c Mon Apr 04 22:48:15 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uhci_pci.c,v 1.52 2010/05/25 08:50:54 cegger Exp $ */
+/* $NetBSD: uhci_pci.c,v 1.53 2011/04/04 22:48:15 dyoung Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhci_pci.c,v 1.52 2010/05/25 08:50:54 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci_pci.c,v 1.53 2011/04/04 22:48:15 dyoung Exp $");
#include "ehci.h"
@@ -203,12 +203,12 @@
struct uhci_pci_softc *sc = device_private(self);
int rv;
- pmf_device_deregister(self);
-
rv = uhci_detach(&sc->sc, flags);
if (rv)
return (rv);
+ pmf_device_deregister(self);
+
/* disable interrupts and acknowledge any pending */
bus_space_write_2(sc->sc.iot, sc->sc.ioh, UHCI_INTR, 0);
bus_space_write_2(sc->sc.iot, sc->sc.ioh, UHCI_STS,
Home |
Main Index |
Thread Index |
Old Index