Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jan 2007 23:27:35 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 112847 for review
Message-ID:  <200701122327.l0CNRYLp017243@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=112847

Change 112847 by hselasky@hselasky_mini_itx on 2007/01/12 23:26:37

	Fix "EVIL HACK" regression. Obviously some parts of
	the network stack, the MII-bus at least, still depends
	on a "struct ifnet" pointer at the beginning of the
	network device's softc.

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/if_aue.c#15 edit
.. //depot/projects/usb/src/sys/dev/usb/if_auereg.h#10 edit
.. //depot/projects/usb/src/sys/dev/usb/if_axe.c#14 edit
.. //depot/projects/usb/src/sys/dev/usb/if_axereg.h#10 edit
.. //depot/projects/usb/src/sys/dev/usb/if_cdce.c#10 edit
.. //depot/projects/usb/src/sys/dev/usb/if_cdcereg.h#9 edit
.. //depot/projects/usb/src/sys/dev/usb/if_cue.c#12 edit
.. //depot/projects/usb/src/sys/dev/usb/if_cuereg.h#7 edit
.. //depot/projects/usb/src/sys/dev/usb/if_kue.c#14 edit
.. //depot/projects/usb/src/sys/dev/usb/if_kuefw.h#3 edit
.. //depot/projects/usb/src/sys/dev/usb/if_kuereg.h#7 edit
.. //depot/projects/usb/src/sys/dev/usb/if_rue.c#13 edit
.. //depot/projects/usb/src/sys/dev/usb/if_ruereg.h#8 edit
.. //depot/projects/usb/src/sys/dev/usb/if_udav.c#13 edit
.. //depot/projects/usb/src/sys/dev/usb/if_udavreg.h#8 edit
.. //depot/projects/usb/src/sys/dev/usb/if_ural.c#16 edit
.. //depot/projects/usb/src/sys/dev/usb/if_uralreg.h#8 edit
.. //depot/projects/usb/src/sys/dev/usb/if_uralvar.h#11 edit
.. //depot/projects/usb/src/sys/dev/usb/if_zyd.c#2 edit
.. //depot/projects/usb/src/sys/dev/usb/if_zydfw.h#2 edit
.. //depot/projects/usb/src/sys/dev/usb/if_zydreg.h#2 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb/if_aue.c#15 (text+ko) ====

@@ -905,6 +905,8 @@
 	    goto done;
 	}
 
+	sc->sc_evilhack = ifp;
+
 	ifp->if_softc = sc;
 	if_initname(ifp, "aue", sc->sc_unit);
 	ifp->if_mtu = ETHERMTU;

==== //depot/projects/usb/src/sys/dev/usb/if_auereg.h#10 (text+ko) ====

@@ -198,6 +198,8 @@
 
 
 struct aue_softc {
+	void			*sc_evilhack; /* XXX this pointer must be first */
+
 	struct usbd_config_td	sc_config_td;
 	struct __callout	sc_watchdog;
 	struct mtx		sc_mtx;

==== //depot/projects/usb/src/sys/dev/usb/if_axe.c#14 (text+ko) ====

@@ -719,6 +719,8 @@
 	    goto done;
 	}
 
+	sc->sc_evilhack = ifp;
+
 	ifp->if_softc = sc;
 	if_initname(ifp, "axe", sc->sc_unit);
 	ifp->if_mtu = ETHERMTU;

==== //depot/projects/usb/src/sys/dev/usb/if_axereg.h#10 (text+ko) ====

@@ -113,6 +113,8 @@
 			    device_get_softc((sc)->sc_miibus) : NULL)
 
 struct axe_softc {
+	void			*sc_evilhack; /* XXX this pointer must be first */
+
 	struct usbd_config_td	sc_config_td;
 	struct __callout	sc_watchdog;
 	struct mtx		sc_mtx;

==== //depot/projects/usb/src/sys/dev/usb/if_cdce.c#10 (text+ko) ====

@@ -379,6 +379,8 @@
 	    goto detach;
 	}
 
+	sc->sc_evilhack = ifp;
+
 	ifp->if_softc = sc;
 	if_initname(ifp, "cdce", sc->sc_unit);
 	ifp->if_mtu = ETHERMTU;

==== //depot/projects/usb/src/sys/dev/usb/if_cdcereg.h#9 (text+ko) ====

@@ -43,6 +43,8 @@
 };
 
 struct cdce_softc {
+	void			*sc_evilhack; /* XXX this pointer must be first */
+
 	struct ifmedia		sc_ifmedia;
 	struct mtx		sc_mtx;
 

==== //depot/projects/usb/src/sys/dev/usb/if_cue.c#12 (text+ko) ====

@@ -582,6 +582,8 @@
 	    goto done;
 	}
 
+	sc->sc_evilhack = ifp;
+
 	ifp->if_softc = sc;
 	if_initname(ifp, "cue", sc->sc_unit);
 	ifp->if_mtu = ETHERMTU;

==== //depot/projects/usb/src/sys/dev/usb/if_cuereg.h#7 (text+ko) ====

@@ -121,6 +121,8 @@
 };
 
 struct cue_softc {
+	void			*sc_evilhack; /* XXX this pointer must be first */
+
 	struct usbd_config_td	sc_config_td;
 	struct __callout	sc_watchdog;
 	struct mtx		sc_mtx;

==== //depot/projects/usb/src/sys/dev/usb/if_kue.c#14 (text+ko) ====

@@ -617,6 +617,8 @@
 	    goto done;
 	}
 
+	sc->sc_evilhack = ifp;
+
 	ifp->if_softc = sc;
 	if_initname(ifp, "kue", sc->sc_unit);
 	ifp->if_mtu = ETHERMTU;

==== //depot/projects/usb/src/sys/dev/usb/if_kuefw.h#3 (text+ko) ====


==== //depot/projects/usb/src/sys/dev/usb/if_kuereg.h#7 (text+ko) ====

@@ -126,6 +126,7 @@
 };
 
 struct kue_softc {
+	void			*sc_evilhack; /* XXX this pointer must be first */
 
 	struct usbd_config_td	sc_config_td;
 	struct __callout	sc_watchdog;

==== //depot/projects/usb/src/sys/dev/usb/if_rue.c#13 (text+ko) ====

@@ -817,6 +817,8 @@
 	    goto done;
 	}
 
+	sc->sc_evilhack = ifp;
+
 	ifp->if_softc = sc;
 	if_initname(ifp, "rue", sc->sc_unit);
 	ifp->if_mtu = ETHERMTU;

==== //depot/projects/usb/src/sys/dev/usb/if_ruereg.h#8 (text+ko) ====

@@ -166,6 +166,7 @@
 };
 
 struct rue_softc {
+	void			*sc_evilhack; /* XXX this pointer must be first */
 
 	struct usbd_config_td	sc_config_td;
 	struct __callout	sc_watchdog;

==== //depot/projects/usb/src/sys/dev/usb/if_udav.c#13 (text+ko) ====

@@ -425,6 +425,8 @@
 	    goto done;
 	}
 
+	sc->sc_evilhack = ifp;
+
 	ifp->if_softc = sc;
 	if_initname(ifp, "udav",  sc->sc_unit);
 	ifp->if_mtu = ETHERMTU;

==== //depot/projects/usb/src/sys/dev/usb/if_udavreg.h#8 (text+ko) ====

@@ -137,6 +137,8 @@
 			    device_get_softc((sc)->sc_miibus) : NULL)
 
 struct udav_softc {
+	void			*sc_evilhack; /* XXX this pointer must be first */
+
 	struct usbd_config_td	sc_config_td;
 	struct __callout	sc_watchdog;
 	struct mtx		sc_mtx;

==== //depot/projects/usb/src/sys/dev/usb/if_ural.c#16 (text+ko) ====

@@ -869,6 +869,7 @@
 	    goto done;
 	}
 
+	sc->sc_evilhack = ifp;
 	sc->sc_ifp = ifp;
 
 	ifp->if_softc = sc;

==== //depot/projects/usb/src/sys/dev/usb/if_uralreg.h#8 (text+ko) ====


==== //depot/projects/usb/src/sys/dev/usb/if_uralvar.h#11 (text+ko) ====

@@ -108,6 +108,7 @@
 } __packed;
 
 struct ural_softc {
+	void				*sc_evilhack; /* XXX this pointer must be first */
 
 	struct usbd_config_td		sc_config_td;
 	struct ural_tx_desc		sc_tx_desc;

==== //depot/projects/usb/src/sys/dev/usb/if_zyd.c#2 (text+ko) ====

@@ -2060,6 +2060,7 @@
 	    goto done;
 	}
 
+	sc->sc_evilhack = ifp;
 	sc->sc_ifp = ifp;
 
 	ifp->if_softc = sc;

==== //depot/projects/usb/src/sys/dev/usb/if_zydfw.h#2 (text+ko) ====


==== //depot/projects/usb/src/sys/dev/usb/if_zydreg.h#2 (text+ko) ====

@@ -1278,6 +1278,8 @@
 	 (1 << IEEE80211_RADIOTAP_CHANNEL))
 
 struct zyd_softc {
+	void			*sc_evilhack; /* XXX this pointer must be first */
+
 	struct ieee80211com	sc_ic;
 	struct zyd_rf		sc_rf;
 	struct __callout	sc_scan_callout;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701122327.l0CNRYLp017243>