svn commit: r196794 - projects/mips/sys/mips/atheros
Oleksandr Tymoshenko
gonzo at FreeBSD.org
Thu Sep 3 18:23:24 UTC 2009
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);
More information about the svn-src-projects
mailing list