aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cxgb3/common.h
diff options
context:
space:
mode:
authorDivy Le Ray <divy@chelsio.com>2008-10-08 17:39:31 -0700
committerDavid S. Miller <davem@davemloft.net>2008-10-08 17:39:31 -0700
commit9b1e36566c5fafbcc732c971acfcf8580332931a (patch)
tree2c779d712f07f0b097ad1a2041779597b7ca9bbc /drivers/net/cxgb3/common.h
parentcxgb3: More flexible support for PHY interrupts. (diff)
downloadlinux-dev-9b1e36566c5fafbcc732c971acfcf8580332931a.tar.xz
linux-dev-9b1e36566c5fafbcc732c971acfcf8580332931a.zip
cxgb3: commnonize LASI phy code
Add generic code to manage interrupt driven PHYs. Do not reset the phy after link parameters update, the new values might get lost. Return early from link change notification when the link parameters remain unchanged. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cxgb3/common.h')
-rw-r--r--drivers/net/cxgb3/common.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/net/cxgb3/common.h b/drivers/net/cxgb3/common.h
index 75b5ee61f45c..d1b6b1e62f41 100644
--- a/drivers/net/cxgb3/common.h
+++ b/drivers/net/cxgb3/common.h
@@ -522,7 +522,20 @@ enum {
MDIO_DEV_PMA_PMD = 1,
MDIO_DEV_WIS = 2,
MDIO_DEV_PCS = 3,
- MDIO_DEV_XGXS = 4
+ MDIO_DEV_XGXS = 4,
+ MDIO_DEV_ANEG = 7,
+ MDIO_DEV_VEND1 = 30,
+ MDIO_DEV_VEND2 = 31
+};
+
+/* LASI control and status registers */
+enum {
+ RX_ALARM_CTRL = 0x9000,
+ TX_ALARM_CTRL = 0x9001,
+ LASI_CTRL = 0x9002,
+ RX_ALARM_STAT = 0x9003,
+ TX_ALARM_STAT = 0x9004,
+ LASI_STAT = 0x9005
};
/* PHY loopback direction */
@@ -665,6 +678,10 @@ int t3_mdio_change_bits(struct cphy *phy, int mmd, int reg, unsigned int clear,
int t3_phy_reset(struct cphy *phy, int mmd, int wait);
int t3_phy_advertise(struct cphy *phy, unsigned int advert);
int t3_set_phy_speed_duplex(struct cphy *phy, int speed, int duplex);
+int t3_phy_lasi_intr_enable(struct cphy *phy);
+int t3_phy_lasi_intr_disable(struct cphy *phy);
+int t3_phy_lasi_intr_clear(struct cphy *phy);
+int t3_phy_lasi_intr_handler(struct cphy *phy);
void t3_intr_enable(struct adapter *adapter);
void t3_intr_disable(struct adapter *adapter);