Skip to content

Commit

Permalink
smsc75xx: replace 0xffff with PHY_INT_SRC_CLEAR_ALL
Browse files Browse the repository at this point in the history
This patch defines PHY_INT_SRC_CLEAR_ALL to replace the value 0xffff
in order to be more self-documenting.

This patch should make no functional change, it is purely cosmetic.

Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Steve Glendinning authored and David S. Miller committed May 8, 2012
1 parent 0d6c4a2 commit 7749622
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/usb/smsc75xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,8 @@ static int smsc75xx_link_reset(struct usbnet *dev)
/* read and write to clear phy interrupt status */
ret = smsc75xx_mdio_read(dev->net, mii->phy_id, PHY_INT_SRC);
check_warn_return(ret, "Error reading PHY_INT_SRC");
smsc75xx_mdio_write(dev->net, mii->phy_id, PHY_INT_SRC, 0xffff);
smsc75xx_mdio_write(dev->net, mii->phy_id, PHY_INT_SRC,
PHY_INT_SRC_CLEAR_ALL);

ret = smsc75xx_write_reg(dev, INT_STS, INT_STS_CLEAR_ALL);
check_warn_return(ret, "Error writing INT_STS");
Expand Down
1 change: 1 addition & 0 deletions drivers/net/usb/smsc75xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@
#define PHY_INT_SRC_ANEG_COMP ((u16)0x0040)
#define PHY_INT_SRC_REMOTE_FAULT ((u16)0x0020)
#define PHY_INT_SRC_LINK_DOWN ((u16)0x0010)
#define PHY_INT_SRC_CLEAR_ALL ((u16)0xffff)

#define PHY_INT_MASK (30)
#define PHY_INT_MASK_ENERGY_ON ((u16)0x0080)
Expand Down

0 comments on commit 7749622

Please sign in to comment.