In mii_phy_detach(), destroy the NWay callout.

This commit is contained in:
dyoung 2009-04-07 18:05:02 +00:00
parent 336480339e
commit 03c2f978e8

View File

@ -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 <sys/cdefs.h>
__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 <sys/param.h>
#include <sys/device.h>
@ -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);