ip1000phy.c (215297) | ip1000phy.c (215923) |
---|---|
1/*- 2 * Copyright (c) 2006, Pyun YongHyeon <yongari@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * 27 */ 28 29#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2006, Pyun YongHyeon <yongari@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/dev/mii/ip1000phy.c 215297 2010-11-14 13:26:10Z marius $"); | 30__FBSDID("$FreeBSD: head/sys/dev/mii/ip1000phy.c 215923 2010-11-27 01:26:59Z marius $"); |
31 32/* 33 * Driver for the IC Plus IP1000A/IP1001 10/100/1000 PHY. 34 */ 35 36#include <sys/param.h> 37#include <sys/systm.h> 38#include <sys/kernel.h> --- 303 unchanged lines hidden (view full) --- 342{ 343 struct ip1000phy_softc *isc; 344 uint32_t reg; 345 346 isc = (struct ip1000phy_softc *)sc; 347 reg = 0; 348 if (isc->model == MII_MODEL_ICPLUS_IP1001) { 349 reg = PHY_READ(sc, IP1000PHY_MII_ANAR); | 31 32/* 33 * Driver for the IC Plus IP1000A/IP1001 10/100/1000 PHY. 34 */ 35 36#include <sys/param.h> 37#include <sys/systm.h> 38#include <sys/kernel.h> --- 303 unchanged lines hidden (view full) --- 342{ 343 struct ip1000phy_softc *isc; 344 uint32_t reg; 345 346 isc = (struct ip1000phy_softc *)sc; 347 reg = 0; 348 if (isc->model == MII_MODEL_ICPLUS_IP1001) { 349 reg = PHY_READ(sc, IP1000PHY_MII_ANAR); |
350 reg &= ~(IP1000PHY_ANAR_PAUSE | IP1000PHY_ANAR_APAUSE); |
|
350 reg |= IP1000PHY_ANAR_NP; 351 } 352 reg |= IP1000PHY_ANAR_10T | IP1000PHY_ANAR_10T_FDX | 353 IP1000PHY_ANAR_100TX | IP1000PHY_ANAR_100TX_FDX; 354 if ((media & IFM_FLOW) != 0 || (sc->mii_flags & MIIF_FORCEPAUSE) != 0) 355 reg |= IP1000PHY_ANAR_PAUSE | IP1000PHY_ANAR_APAUSE; 356 PHY_WRITE(sc, IP1000PHY_MII_ANAR, reg | IP1000PHY_ANAR_CSMA); 357 --- 39 unchanged lines hidden --- | 351 reg |= IP1000PHY_ANAR_NP; 352 } 353 reg |= IP1000PHY_ANAR_10T | IP1000PHY_ANAR_10T_FDX | 354 IP1000PHY_ANAR_100TX | IP1000PHY_ANAR_100TX_FDX; 355 if ((media & IFM_FLOW) != 0 || (sc->mii_flags & MIIF_FORCEPAUSE) != 0) 356 reg |= IP1000PHY_ANAR_PAUSE | IP1000PHY_ANAR_APAUSE; 357 PHY_WRITE(sc, IP1000PHY_MII_ANAR, reg | IP1000PHY_ANAR_CSMA); 358 --- 39 unchanged lines hidden --- |