From 7850efa68d7cf0af09c5d54fe308a8649f96f974 Mon Sep 17 00:00:00 2001 From: "Jayachandran C." Date: Wed, 20 Oct 2010 09:50:11 +0000 Subject: [PATCH] Network driver updates - Fix network driver issue on a XLS eval board (major# 8). - Fix issue uncovered by r213475 in check for XGMII Submitted by: Sriram Gorti (srgorti at netlogicmicro dot com) --- sys/mips/rmi/board.c | 12 ++++++------ sys/mips/rmi/dev/nlge/if_nlge.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/mips/rmi/board.c b/sys/mips/rmi/board.c index 3bee863226c3..4c49dacc5cee 100644 --- a/sys/mips/rmi/board.c +++ b/sys/mips/rmi/board.c @@ -283,14 +283,14 @@ xls_board_specific_overrides(struct xlr_board_info* board) break; case RMI_XLR_BOARD_ARIZONA_VIII: - - if (blk1->enabled) { + if (blk1->enabled) { /* There is just one Octal PHY on the board and it is * connected to the MII interface for NA Quad 0. */ - blk1->gmac_port[0].mii_addr = XLR_IO_GMAC_0_OFFSET; - blk1->gmac_port[1].mii_addr = XLR_IO_GMAC_0_OFFSET; - blk1->gmac_port[2].mii_addr = XLR_IO_GMAC_0_OFFSET; - blk1->gmac_port[3].mii_addr = XLR_IO_GMAC_0_OFFSET; + for (i = 0; i < 4; i++) { + blk1->gmac_port[i].mii_addr = + XLR_IO_GMAC_0_OFFSET; + blk1->gmac_port[i].mdint_id = 0; + } } break; diff --git a/sys/mips/rmi/dev/nlge/if_nlge.c b/sys/mips/rmi/dev/nlge/if_nlge.c index 6495e4bf1f68..37e1c54c3c10 100644 --- a/sys/mips/rmi/dev/nlge/if_nlge.c +++ b/sys/mips/rmi/dev/nlge/if_nlge.c @@ -861,7 +861,7 @@ nlge_mii_read(struct device *dev, int phyaddr, int regidx) int val; sc = device_get_softc(dev); - val = (sc->port_type != XLR_XGMII) ? (0xffff) : + val = (sc->port_type == XLR_XGMII) ? (0xffff) : nlge_mii_read_internal(sc->mii_base, phyaddr, regidx); return (val);