Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58355
b: refs/heads/master
c: 4117b5b
h: refs/heads/master
i:
  58353: 99ea066
  58351: 21c818f
v: v3
  • Loading branch information
Kapil Juneja authored and Jeff Garzik committed Jul 9, 2007
1 parent f3c0985 commit 03f3049
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d3c12873c36005263286cf5660663c8c10f9d2b5
refs/heads/master: 4117b5be4b877cec7c34058f0c239fcf78274e3d
16 changes: 16 additions & 0 deletions trunk/drivers/net/phy/marvell.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
#define MII_M1111_PHY_EXT_SR 0x1b
#define MII_M1111_HWCFG_MODE_MASK 0xf
#define MII_M1111_HWCFG_MODE_RGMII 0xb
#define MII_M1111_HWCFG_MODE_SGMII_NO_CLK 0x4

MODULE_DESCRIPTION("Marvell PHY driver");
MODULE_AUTHOR("Andy Fleming");
Expand Down Expand Up @@ -169,6 +170,21 @@ static int m88e1111_config_init(struct phy_device *phydev)
return err;
}

if (phydev->interface == PHY_INTERFACE_MODE_SGMII) {
int temp;

temp = phy_read(phydev, MII_M1111_PHY_EXT_SR);
if (temp < 0)
return temp;

temp &= ~(MII_M1111_HWCFG_MODE_MASK);
temp |= MII_M1111_HWCFG_MODE_SGMII_NO_CLK;

err = phy_write(phydev, MII_M1111_PHY_EXT_SR, temp);
if (err < 0)
return err;
}

err = phy_write(phydev, MII_BMCR, BMCR_RESET);
if (err < 0)
return err;
Expand Down

0 comments on commit 03f3049

Please sign in to comment.