if_hme.c (213893) | if_hme.c (220940) |
---|---|
1/*- 2 * Copyright (c) 1999 The NetBSD Foundation, Inc. 3 * Copyright (c) 2001-2003 Thomas Moestl <tmm@FreeBSD.org>. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to The NetBSD Foundation 7 * by Paul Kranenburg. 8 * --- 24 unchanged lines hidden (view full) --- 33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 * POSSIBILITY OF SUCH DAMAGE. 36 * 37 * from: NetBSD: hme.c,v 1.45 2005/02/18 00:22:11 heas Exp 38 */ 39 40#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1999 The NetBSD Foundation, Inc. 3 * Copyright (c) 2001-2003 Thomas Moestl <tmm@FreeBSD.org>. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to The NetBSD Foundation 7 * by Paul Kranenburg. 8 * --- 24 unchanged lines hidden (view full) --- 33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 * POSSIBILITY OF SUCH DAMAGE. 36 * 37 * from: NetBSD: hme.c,v 1.45 2005/02/18 00:22:11 heas Exp 38 */ 39 40#include <sys/cdefs.h> |
41__FBSDID("$FreeBSD: head/sys/dev/hme/if_hme.c 213893 2010-10-15 14:52:11Z marius $"); | 41__FBSDID("$FreeBSD: head/sys/dev/hme/if_hme.c 220940 2011-04-22 09:39:05Z marius $"); |
42 43/* 44 * HME Ethernet module driver. 45 * 46 * The HME is e.g. part of the PCIO PCI multi function device. 47 * It supports TX gathering and TX and RX checksum offloading. 48 * RX buffers must be aligned at a programmable offset modulo 16. We choose 2 49 * for this offset: mbuf clusters are usually on about 2^11 boundaries, 2 bytes --- 148 unchanged lines hidden (view full) --- 198 /* 199 * HME common initialization. 200 * 201 * hme_softc fields that must be initialized by the front-end: 202 * 203 * the DMA bus tag: 204 * sc_dmatag 205 * | 42 43/* 44 * HME Ethernet module driver. 45 * 46 * The HME is e.g. part of the PCIO PCI multi function device. 47 * It supports TX gathering and TX and RX checksum offloading. 48 * RX buffers must be aligned at a programmable offset modulo 16. We choose 2 49 * for this offset: mbuf clusters are usually on about 2^11 boundaries, 2 bytes --- 148 unchanged lines hidden (view full) --- 198 /* 199 * HME common initialization. 200 * 201 * hme_softc fields that must be initialized by the front-end: 202 * 203 * the DMA bus tag: 204 * sc_dmatag 205 * |
206 * the bus handles, tags and offsets (splitted for SBus compatability): | 206 * the bus handles, tags and offsets (splitted for SBus compatibility): |
207 * sc_seb{t,h,o} (Shared Ethernet Block registers) 208 * sc_erx{t,h,o} (Receiver Unit registers) 209 * sc_etx{t,h,o} (Transmitter Unit registers) 210 * sc_mac{t,h,o} (MAC registers) 211 * sc_mif{t,h,o} (Management Interface registers) 212 * 213 * the maximum bus burst size: 214 * sc_burst --- 1339 unchanged lines hidden (view full) --- 1554#endif 1555 1556 hme_mifinit(sc); 1557 1558 /* 1559 * If both PHYs are present reset them. This is required for 1560 * unisolating the previously isolated PHY when switching PHYs. 1561 * As the above hme_mifinit() call will set the MII drivers in | 207 * sc_seb{t,h,o} (Shared Ethernet Block registers) 208 * sc_erx{t,h,o} (Receiver Unit registers) 209 * sc_etx{t,h,o} (Transmitter Unit registers) 210 * sc_mac{t,h,o} (MAC registers) 211 * sc_mif{t,h,o} (Management Interface registers) 212 * 213 * the maximum bus burst size: 214 * sc_burst --- 1339 unchanged lines hidden (view full) --- 1554#endif 1555 1556 hme_mifinit(sc); 1557 1558 /* 1559 * If both PHYs are present reset them. This is required for 1560 * unisolating the previously isolated PHY when switching PHYs. 1561 * As the above hme_mifinit() call will set the MII drivers in |
1562 * the XIF configuration register accoring to the currently | 1562 * the XIF configuration register according to the currently |
1563 * selected media, there should be no window during which the 1564 * data paths of both transceivers are open at the same time, 1565 * even if the PHY device drivers use MIIF_NOISOLATE. 1566 */ 1567 if (sc->sc_phys[0] != -1 && sc->sc_phys[1] != -1) 1568 LIST_FOREACH(child, &sc->sc_mii->mii_phys, mii_list) 1569 mii_phy_reset(child); 1570 return (mii_mediachg(sc->sc_mii)); --- 171 unchanged lines hidden --- | 1563 * selected media, there should be no window during which the 1564 * data paths of both transceivers are open at the same time, 1565 * even if the PHY device drivers use MIIF_NOISOLATE. 1566 */ 1567 if (sc->sc_phys[0] != -1 && sc->sc_phys[1] != -1) 1568 LIST_FOREACH(child, &sc->sc_mii->mii_phys, mii_list) 1569 mii_phy_reset(child); 1570 return (mii_mediachg(sc->sc_mii)); --- 171 unchanged lines hidden --- |