Deleted Added
full compact
brgphy.c (166262) brgphy.c (166665)
1/*-
2 * Copyright (c) 2000
3 * Bill Paul <wpaul@ee.columbia.edu>. 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) 2000
3 * Bill Paul <wpaul@ee.columbia.edu>. 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/brgphy.c 166262 2007-01-26 17:05:24Z dwhite $");
34__FBSDID("$FreeBSD: head/sys/dev/mii/brgphy.c 166665 2007-02-12 19:33:22Z jkim $");
35
36/*
37 * Driver for the Broadcom BCR5400 1000baseTX PHY.
38 */
39
40#include <sys/param.h>
41#include <sys/systm.h>
42#include <sys/kernel.h>

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

569
570static void
571brgphy_fixup_ber_bug(struct mii_softc *sc)
572{
573 static const struct {
574 int reg;
575 u_int16_t val;
576 } dspcode[] = {
35
36/*
37 * Driver for the Broadcom BCR5400 1000baseTX PHY.
38 */
39
40#include <sys/param.h>
41#include <sys/systm.h>
42#include <sys/kernel.h>

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

569
570static void
571brgphy_fixup_ber_bug(struct mii_softc *sc)
572{
573 static const struct {
574 int reg;
575 u_int16_t val;
576 } dspcode[] = {
577 { 0x18, 0x0c00 },
578 { 0x17, 0x000a },
579 { 0x15, 0x310b },
580 { 0x17, 0x201f },
581 { 0x15, 0x9506 },
582 { 0x17, 0x401f },
583 { 0x15, 0x14e2 },
584 { 0x18, 0x0400 },
577 { BRGPHY_MII_AUXCTL, 0x0c00 },
578 { BRGPHY_MII_DSP_ADDR_REG, 0x000a },
579 { BRGPHY_MII_DSP_RW_PORT, 0x310b },
580 { BRGPHY_MII_DSP_ADDR_REG, 0x201f },
581 { BRGPHY_MII_DSP_RW_PORT, 0x9506 },
582 { BRGPHY_MII_DSP_ADDR_REG, 0x401f },
583 { BRGPHY_MII_DSP_RW_PORT, 0x14e2 },
584 { BRGPHY_MII_AUXCTL, 0x0400 },
585 { 0, 0 },
586 };
587 int i;
588
589 for (i = 0; dspcode[i].reg != 0; i++)
590 PHY_WRITE(sc, dspcode[i].reg, dspcode[i].val);
591}
592

--- 124 unchanged lines hidden ---
585 { 0, 0 },
586 };
587 int i;
588
589 for (i = 0; dspcode[i].reg != 0; i++)
590 PHY_WRITE(sc, dspcode[i].reg, dspcode[i].val);
591}
592

--- 124 unchanged lines hidden ---