From 03c2f978e87612ff9e8575dacd5b0ab76182d24c Mon Sep 17 00:00:00 2001 From: dyoung Date: Tue, 7 Apr 2009 18:05:02 +0000 Subject: [PATCH] In mii_phy_detach(), destroy the NWay callout. --- sys/dev/mii/mii_physubr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/mii/mii_physubr.c b/sys/dev/mii/mii_physubr.c index fb9a9c28f11f..f8d73ccedd84 100644 --- a/sys/dev/mii/mii_physubr.c +++ b/sys/dev/mii/mii_physubr.c @@ -1,4 +1,4 @@ -/* $NetBSD: mii_physubr.c,v 1.62 2009/01/16 20:51:18 cegger Exp $ */ +/* $NetBSD: mii_physubr.c,v 1.63 2009/04/07 18:05:02 dyoung Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.62 2009/01/16 20:51:18 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.63 2009/04/07 18:05:02 dyoung Exp $"); #include #include @@ -560,6 +560,8 @@ mii_phy_detach(struct device *self, int flags) if (sc->mii_flags & MIIF_DOINGAUTO) callout_stop(&sc->mii_nway_ch); + callout_destroy(&sc->mii_nway_ch); + mii_phy_delete_media(sc); LIST_REMOVE(sc, mii_list);