Deleted Added
full compact
atphy.c (183567) atphy.c (184253)
1/*-
2 * Copyright (c) 2008, 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

--- 12 unchanged lines hidden (view full) ---

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
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#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2008, 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

--- 12 unchanged lines hidden (view full) ---

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
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#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/sys/dev/mii/atphy.c 183567 2008-10-03 10:31:31Z stas $");
29__FBSDID("$FreeBSD: head/sys/dev/mii/atphy.c 184253 2008-10-25 06:39:17Z yongari $");
30
31/*
32 * Driver for the Attansic/Atheros F1 10/100/1000 PHY.
33 */
34
35#include <sys/param.h>
36#include <sys/systm.h>
37#include <sys/kernel.h>

--- 174 unchanged lines hidden (view full) ---

212 if ((sc->mii_extcapabilities & (EXTSR_1000TFDX |
213 EXTSR_1000THDX)) != 0)
214 PHY_WRITE(sc, MII_100T2CR, 0);
215 PHY_WRITE(sc, MII_ANAR, anar | ANAR_CSMA);
216
217 /*
218 * Reset the PHY so all changes take effect.
219 */
30
31/*
32 * Driver for the Attansic/Atheros F1 10/100/1000 PHY.
33 */
34
35#include <sys/param.h>
36#include <sys/systm.h>
37#include <sys/kernel.h>

--- 174 unchanged lines hidden (view full) ---

212 if ((sc->mii_extcapabilities & (EXTSR_1000TFDX |
213 EXTSR_1000THDX)) != 0)
214 PHY_WRITE(sc, MII_100T2CR, 0);
215 PHY_WRITE(sc, MII_ANAR, anar | ANAR_CSMA);
216
217 /*
218 * Reset the PHY so all changes take effect.
219 */
220 PHY_WRITE(sc, MII_BMCR, bmcr | BMCR_RESET);
220 PHY_WRITE(sc, MII_BMCR, bmcr | BMCR_RESET | BMCR_AUTOEN |
221 BMCR_STARTNEG);
221done:
222 break;
223
224 case MII_TICK:
225 /*
226 * If we're not currently selected, just return.
227 */
228 if (IFM_INST(ife->ifm_media) != sc->mii_inst)

--- 186 unchanged lines hidden ---
222done:
223 break;
224
225 case MII_TICK:
226 /*
227 * If we're not currently selected, just return.
228 */
229 if (IFM_INST(ife->ifm_media) != sc->mii_inst)

--- 186 unchanged lines hidden ---