mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-20 08:44:33 +00:00
- Fix phy address calculation
This commit is contained in:
parent
6b3a0aef3f
commit
d0c60705f1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/mips/; revision=196794
|
@ -477,7 +477,7 @@ arge_miibus_readreg(device_t dev, int phy, int reg)
|
|||
{
|
||||
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 phy, int reg, int data)
|
|||
{
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue