[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1336129033-15826-2-git-send-email-steve.glendinning@shawell.net>
Date: Fri, 4 May 2012 11:57:11 +0100
From: Steve Glendinning <steve.glendinning@...well.net>
To: netdev@...r.kernel.org
Cc: "David S. Miller" <davem@...emloft.net>,
Steve Glendinning <steve.glendinning@...well.net>
Subject: [PATCH 1/3] smsc75xx: replace 0xffff with PHY_INT_SRC_CLEAR_ALL
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@...well.net>
---
drivers/net/usb/smsc75xx.c | 3 ++-
drivers/net/usb/smsc75xx.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/usb/smsc75xx.c b/drivers/net/usb/smsc75xx.c
index 00103a8..ecab87b 100644
--- a/drivers/net/usb/smsc75xx.c
+++ b/drivers/net/usb/smsc75xx.c
@@ -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");
diff --git a/drivers/net/usb/smsc75xx.h b/drivers/net/usb/smsc75xx.h
index 16e98c7..67eba39 100644
--- a/drivers/net/usb/smsc75xx.h
+++ b/drivers/net/usb/smsc75xx.h
@@ -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)
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists