Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150347
b: refs/heads/master
c: aa22437
h: refs/heads/master
i:
  150345: b239cbc
  150343: d05ba88
v: v3
  • Loading branch information
Ben Hutchings authored and David S. Miller committed May 21, 2009
1 parent a0f9a41 commit 78b78c3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9f29f6de56462a363d3cc1d5f000961d622c5888
refs/heads/master: aa22437e87469fdee94b5344780b4a3dbb87a154
17 changes: 9 additions & 8 deletions trunk/drivers/net/chelsio/mv88x201x.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ static int mv88x201x_reset(struct cphy *cphy, int wait)
static int mv88x201x_interrupt_enable(struct cphy *cphy)
{
/* Enable PHY LASI interrupts. */
cphy_mdio_write(cphy, MDIO_MMD_PMAPMD, 0x9002, 0x1);
cphy_mdio_write(cphy, MDIO_MMD_PMAPMD, MDIO_PMA_LASI_CTRL,
MDIO_PMA_LASI_LSALARM);

/* Enable Marvell interrupts through Elmer0. */
if (t1_is_asic(cphy->adapter)) {
Expand All @@ -102,7 +103,7 @@ static int mv88x201x_interrupt_enable(struct cphy *cphy)
static int mv88x201x_interrupt_disable(struct cphy *cphy)
{
/* Disable PHY LASI interrupts. */
cphy_mdio_write(cphy, MDIO_MMD_PMAPMD, 0x9002, 0x0);
cphy_mdio_write(cphy, MDIO_MMD_PMAPMD, MDIO_PMA_LASI_CTRL, 0x0);

/* Disable Marvell interrupts through Elmer0. */
if (t1_is_asic(cphy->adapter)) {
Expand All @@ -122,9 +123,9 @@ static int mv88x201x_interrupt_clear(struct cphy *cphy)

#ifdef MV88x2010_LINK_STATUS_BUGS
/* Required to read twice before clear takes affect. */
cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, 0x9003, &val);
cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, 0x9004, &val);
cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, 0x9005, &val);
cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, MDIO_PMA_LASI_RXSTAT, &val);
cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, MDIO_PMA_LASI_TXSTAT, &val);
cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, MDIO_PMA_LASI_STAT, &val);

/* Read this register after the others above it else
* the register doesn't clear correctly.
Expand All @@ -135,12 +136,12 @@ static int mv88x201x_interrupt_clear(struct cphy *cphy)
/* Clear link status. */
cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, MDIO_STAT1, &val);
/* Clear PHY LASI interrupts. */
cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, 0x9005, &val);
cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, MDIO_PMA_LASI_STAT, &val);

#ifdef MV88x2010_LINK_STATUS_BUGS
/* Do it again. */
cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, 0x9003, &val);
cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, 0x9004, &val);
cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, MDIO_PMA_LASI_RXSTAT, &val);
cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, MDIO_PMA_LASI_TXSTAT, &val);
#endif

/* Clear Marvell interrupts through Elmer0. */
Expand Down

0 comments on commit 78b78c3

Please sign in to comment.