Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263545
b: refs/heads/master
c: 6e6f400
h: refs/heads/master
i:
  263543: b47a7be
v: v3
  • Loading branch information
Giuseppe CAVALLARO authored and David S. Miller committed Aug 26, 2011
1 parent 0dde180 commit d71adff
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 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: e2e6be56df37c371f564e127c154036b0c2211a1
refs/heads/master: 6e6f400f5381e08dc80e1b5a37ed02a081c179d9
17 changes: 11 additions & 6 deletions trunk/drivers/net/phy/national.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
/* DP83865 phy identifier values */
#define DP83865_PHY_ID 0x20005c7a

#define DP83865_INT_MASK_REG 0x15
#define DP83865_INT_MASK_STATUS 0x14
#define DP83865_INT_STATUS 0x14
#define DP83865_INT_MASK 0x15
#define DP83865_INT_CLEAR 0x17

#define DP83865_INT_REMOTE_FAULT 0x0008
#define DP83865_INT_ANE_COMPLETED 0x0010
Expand Down Expand Up @@ -68,21 +69,25 @@ static int ns_config_intr(struct phy_device *phydev)
int err;

if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
err = phy_write(phydev, DP83865_INT_MASK_REG,
err = phy_write(phydev, DP83865_INT_MASK,
DP83865_INT_MASK_DEFAULT);
else
err = phy_write(phydev, DP83865_INT_MASK_REG, 0);
err = phy_write(phydev, DP83865_INT_MASK, 0);

return err;
}

static int ns_ack_interrupt(struct phy_device *phydev)
{
int ret = phy_read(phydev, DP83865_INT_MASK_STATUS);
int ret = phy_read(phydev, DP83865_INT_STATUS);
if (ret < 0)
return ret;

return 0;
/* Clear the interrupt status bit by writing a “1”
* to the corresponding bit in INT_CLEAR (2:0 are reserved) */
ret = phy_write(phydev, DP83865_INT_CLEAR, ret & ~0x7);

return ret;
}

static void ns_giga_speed_fallback(struct phy_device *phydev, int mode)
Expand Down

0 comments on commit d71adff

Please sign in to comment.