svn commit: r213900 - in head/sys: dev/mii modules/mii

Marius Strobl marius at FreeBSD.org
Fri Oct 15 15:46:59 UTC 2010


Author: marius
Date: Fri Oct 15 15:46:58 2010
New Revision: 213900
URL: http://svn.freebsd.org/changeset/base/213900

Log:
  Now that all previous users of mii_phy_probe() have been converted
  in r213893 and r213894 to use mii_attach() instead remove the former
  and along with it the "EVIL HACK".
  
  MFC after:	never

Modified:
  head/sys/dev/mii/mii.c
  head/sys/dev/mii/miivar.h
  head/sys/modules/mii/Makefile

Modified: head/sys/dev/mii/mii.c
==============================================================================
--- head/sys/dev/mii/mii.c	Fri Oct 15 15:37:16 2010	(r213899)
+++ head/sys/dev/mii/mii.c	Fri Oct 15 15:46:58 2010	(r213900)
@@ -454,21 +454,6 @@ mii_attach(device_t dev, device_t *miibu
 	return (rv);
 }
 
-int
-mii_phy_probe(device_t dev, device_t *child, ifm_change_cb_t ifmedia_upd,
-    ifm_stat_cb_t ifmedia_sts)
-{
-	struct ifnet *ifp;
-
-	/*
-	 * Note that each NIC's softc must start with an ifnet pointer.
-	 * XXX: EVIL HACK!
-	 */
-	ifp = *(struct ifnet **)device_get_softc(dev);
-	return (mii_attach(dev, child, ifp, ifmedia_upd, ifmedia_sts,
-	    BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, 0));
-}
-
 /*
  * Media changed; notify all PHYs.
  */

Modified: head/sys/dev/mii/miivar.h
==============================================================================
--- head/sys/dev/mii/miivar.h	Fri Oct 15 15:37:16 2010	(r213899)
+++ head/sys/dev/mii/miivar.h	Fri Oct 15 15:46:58 2010	(r213900)
@@ -232,7 +232,6 @@ void	mii_down(struct mii_data *);
 int	mii_mediachg(struct mii_data *);
 void	mii_tick(struct mii_data *);
 void	mii_pollstat(struct mii_data *);
-int	mii_phy_probe(device_t, device_t *, ifm_change_cb_t, ifm_stat_cb_t);
 void	mii_add_media(struct mii_softc *);
 void	mii_phy_add_media(struct mii_softc *);
 

Modified: head/sys/modules/mii/Makefile
==============================================================================
--- head/sys/modules/mii/Makefile	Fri Oct 15 15:37:16 2010	(r213899)
+++ head/sys/modules/mii/Makefile	Fri Oct 15 15:46:58 2010	(r213900)
@@ -14,7 +14,6 @@ SRCS+=	xmphy.c
 
 EXPORT_SYMS=	mii_attach	\
 		mii_mediachg	\
-		mii_phy_probe	\
 		mii_phy_reset	\
 		mii_pollstat	\
 		mii_tick


More information about the svn-src-head mailing list