ciphy.c (183492) | ciphy.c (184192) |
---|---|
1/*- 2 * Copyright (c) 2004 3 * Bill Paul <wpaul@windriver.com>. 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 --- 17 unchanged lines hidden (view full) --- 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2004 3 * Bill Paul <wpaul@windriver.com>. 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 --- 17 unchanged lines hidden (view full) --- 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/sys/dev/mii/ciphy.c 183492 2008-09-30 07:30:05Z yongari $"); | 34__FBSDID("$FreeBSD: head/sys/dev/mii/ciphy.c 184192 2008-10-23 01:27:15Z yongari $"); |
35 36/* 37 * Driver for the Cicada/Vitesse CS/VSC8xxx 10/100/1000 copper PHY. 38 */ 39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/kernel.h> --- 44 unchanged lines hidden (view full) --- 87static void ciphy_reset(struct mii_softc *); 88static void ciphy_fixup(struct mii_softc *); 89 90static const struct mii_phydesc ciphys[] = { 91 MII_PHY_DESC(CICADA, CS8201), 92 MII_PHY_DESC(CICADA, CS8201A), 93 MII_PHY_DESC(CICADA, CS8201B), 94 MII_PHY_DESC(CICADA, CS8204), | 35 36/* 37 * Driver for the Cicada/Vitesse CS/VSC8xxx 10/100/1000 copper PHY. 38 */ 39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/kernel.h> --- 44 unchanged lines hidden (view full) --- 87static void ciphy_reset(struct mii_softc *); 88static void ciphy_fixup(struct mii_softc *); 89 90static const struct mii_phydesc ciphys[] = { 91 MII_PHY_DESC(CICADA, CS8201), 92 MII_PHY_DESC(CICADA, CS8201A), 93 MII_PHY_DESC(CICADA, CS8201B), 94 MII_PHY_DESC(CICADA, CS8204), |
95 MII_PHY_DESC(CICADA, VSC8211), |
|
95 MII_PHY_DESC(CICADA, CS8244), 96 MII_PHY_DESC(VITESSE, VSC8601), | 96 MII_PHY_DESC(CICADA, CS8244), 97 MII_PHY_DESC(VITESSE, VSC8601), |
97 MII_PHY_DESC(VITESSE, VSC8211), | |
98 MII_PHY_END 99}; 100 101static int 102ciphy_probe(device_t dev) 103{ 104 105 return (mii_phy_dev_probe(dev, ciphys, BUS_PROBE_DEFAULT)); --- 312 unchanged lines hidden (view full) --- 418 if ((speed == CIPHY_SPEED10 || speed == CIPHY_SPEED100) && 419 (status & CIPHY_AUXCSR_FDX)) { 420 PHY_SETBIT(sc, CIPHY_MII_10BTCSR, CIPHY_10BTCSR_ECHO); 421 } else { 422 PHY_CLRBIT(sc, CIPHY_MII_10BTCSR, CIPHY_10BTCSR_ECHO); 423 } 424 425 break; | 98 MII_PHY_END 99}; 100 101static int 102ciphy_probe(device_t dev) 103{ 104 105 return (mii_phy_dev_probe(dev, ciphys, BUS_PROBE_DEFAULT)); --- 312 unchanged lines hidden (view full) --- 418 if ((speed == CIPHY_SPEED10 || speed == CIPHY_SPEED100) && 419 (status & CIPHY_AUXCSR_FDX)) { 420 PHY_SETBIT(sc, CIPHY_MII_10BTCSR, CIPHY_10BTCSR_ECHO); 421 } else { 422 PHY_CLRBIT(sc, CIPHY_MII_10BTCSR, CIPHY_10BTCSR_ECHO); 423 } 424 425 break; |
426 case MII_MODEL_CICADA_VSC8211: |
|
426 case MII_MODEL_CICADA_CS8244: 427 case MII_MODEL_VITESSE_VSC8601: | 427 case MII_MODEL_CICADA_CS8244: 428 case MII_MODEL_VITESSE_VSC8601: |
428 case MII_MODEL_VITESSE_VSC8211: | |
429 break; 430 default: 431 device_printf(sc->mii_dev, "unknown CICADA PHY model %x\n", 432 model); 433 break; 434 } 435} | 429 break; 430 default: 431 device_printf(sc->mii_dev, "unknown CICADA PHY model %x\n", 432 model); 433 break; 434 } 435} |