Date: Thu, 3 Sep 2009 18:23:23 +0000 (UTC) From: Oleksandr Tymoshenko <gonzo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r196794 - projects/mips/sys/mips/atheros Message-ID: <200909031823.n83INNZE041309@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gonzo Date: Thu Sep 3 18:23:23 2009 New Revision: 196794 URL: http://svn.freebsd.org/changeset/base/196794 Log: - Fix phy address calculation Modified: projects/mips/sys/mips/atheros/if_arge.c Modified: projects/mips/sys/mips/atheros/if_arge.c ============================================================================== --- projects/mips/sys/mips/atheros/if_arge.c Thu Sep 3 18:16:03 2009 (r196793) +++ projects/mips/sys/mips/atheros/if_arge.c Thu Sep 3 18:23:23 2009 (r196794) @@ -477,7 +477,7 @@ arge_miibus_readreg(device_t dev, int ph { struct arge_softc * sc = device_get_softc(dev); int i, result; - uint32_t addr = 0x1000 | (phy << MAC_MII_PHY_ADDR_SHIFT) + uint32_t addr = (phy << MAC_MII_PHY_ADDR_SHIFT) | (reg & MAC_MII_REG_MASK); if (phy != sc->arge_phy_num) @@ -511,8 +511,8 @@ arge_miibus_writereg(device_t dev, int p { struct arge_softc * sc = device_get_softc(dev); int i; - uint32_t addr = 0x1000 - | (phy << MAC_MII_PHY_ADDR_SHIFT) | (reg & MAC_MII_REG_MASK); + uint32_t addr = + (phy << MAC_MII_PHY_ADDR_SHIFT) | (reg & MAC_MII_REG_MASK); dprintf("%s: phy=%d, reg=%02x, value=%04x\n", __func__, phy, reg, data);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909031823.n83INNZE041309>