summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authoraugustss <augustss@NetBSD.org>2001-11-13 07:57:22 +0000
committeraugustss <augustss@NetBSD.org>2001-11-13 07:57:22 +0000
commit9dcae667ee95cde606739dc509eac7c965bbbd7d (patch)
treeeb79bdb3f8adf1c6ef04b0889f4a4b2080cc1a36 /sys/dev/usb
parent9d2580ff165639a796db8dbf663f4eefebb572db (diff)
Small changes to behaviour when disconnecting.
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/if_aue.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c
index ed4d4eba486..9ec6a1de9e8 100644
--- a/sys/dev/usb/if_aue.c
+++ b/sys/dev/usb/if_aue.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_aue.c,v 1.68 2001/11/13 06:24:53 lukem Exp $ */
+/* $NetBSD: if_aue.c,v 1.69 2001/11/13 07:57:22 augustss Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.68 2001/11/13 06:24:53 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.69 2001/11/13 07:57:22 augustss Exp $");
#if defined(__NetBSD__)
#include "opt_inet.h"
@@ -441,6 +441,13 @@ aue_miibus_readreg(device_ptr_t dev, int phy, int reg)
int i;
u_int16_t val;
+ if (sc->aue_dying) {
+#ifdef DIAGNOSTIC
+ printf("%s: dying\n", USBDEVNAME(sc->aue_dev));
+#endif
+ return 0;
+ }
+
#if 0
/*
* The Am79C901 HomePNA PHY actually contains
@@ -545,11 +552,12 @@ aue_miibus_statchg(device_ptr_t dev)
* This turns on the 'dual link LED' bin in the auxmode
* register of the Broadcom PHY.
*/
- if (sc->aue_flags & LSYS) {
+ if (!sc->aue_dying && (sc->aue_flags & LSYS)) {
u_int16_t auxmode;
auxmode = aue_miibus_readreg(dev, 0, 0x1b);
aue_miibus_writereg(dev, 0, 0x1b, auxmode | 0x04);
}
+ DPRINTFN(5,("%s: %s: exit\n", USBDEVNAME(sc->aue_dev), __FUNCTION__));
}
#define AUE_POLY 0xEDB88320