diff options
author | Divy Le Ray <divy@chelsio.com> | 2008-10-08 20:39:31 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-08 20:39:31 -0400 |
commit | 9b1e36566c5fafbcc732c971acfcf8580332931a (patch) | |
tree | 2c779d712f07f0b097ad1a2041779597b7ca9bbc /drivers/net/cxgb3/common.h | |
parent | f231e0a5a2d01da40515c24f1daa689fe8cfd8d7 (diff) |
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.h | 19 |
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 { | |||
522 | MDIO_DEV_PMA_PMD = 1, | 522 | MDIO_DEV_PMA_PMD = 1, |
523 | MDIO_DEV_WIS = 2, | 523 | MDIO_DEV_WIS = 2, |
524 | MDIO_DEV_PCS = 3, | 524 | MDIO_DEV_PCS = 3, |
525 | MDIO_DEV_XGXS = 4 | 525 | MDIO_DEV_XGXS = 4, |
526 | MDIO_DEV_ANEG = 7, | ||
527 | MDIO_DEV_VEND1 = 30, | ||
528 | MDIO_DEV_VEND2 = 31 | ||
529 | }; | ||
530 | |||
531 | /* LASI control and status registers */ | ||
532 | enum { | ||
533 | RX_ALARM_CTRL = 0x9000, | ||
534 | TX_ALARM_CTRL = 0x9001, | ||
535 | LASI_CTRL = 0x9002, | ||
536 | RX_ALARM_STAT = 0x9003, | ||
537 | TX_ALARM_STAT = 0x9004, | ||
538 | LASI_STAT = 0x9005 | ||
526 | }; | 539 | }; |
527 | 540 | ||
528 | /* PHY loopback direction */ | 541 | /* PHY loopback direction */ |
@@ -665,6 +678,10 @@ int t3_mdio_change_bits(struct cphy *phy, int mmd, int reg, unsigned int clear, | |||
665 | int t3_phy_reset(struct cphy *phy, int mmd, int wait); | 678 | int t3_phy_reset(struct cphy *phy, int mmd, int wait); |
666 | int t3_phy_advertise(struct cphy *phy, unsigned int advert); | 679 | int t3_phy_advertise(struct cphy *phy, unsigned int advert); |
667 | int t3_set_phy_speed_duplex(struct cphy *phy, int speed, int duplex); | 680 | int t3_set_phy_speed_duplex(struct cphy *phy, int speed, int duplex); |
681 | int t3_phy_lasi_intr_enable(struct cphy *phy); | ||
682 | int t3_phy_lasi_intr_disable(struct cphy *phy); | ||
683 | int t3_phy_lasi_intr_clear(struct cphy *phy); | ||
684 | int t3_phy_lasi_intr_handler(struct cphy *phy); | ||
668 | 685 | ||
669 | void t3_intr_enable(struct adapter *adapter); | 686 | void t3_intr_enable(struct adapter *adapter); |
670 | void t3_intr_disable(struct adapter *adapter); | 687 | void t3_intr_disable(struct adapter *adapter); |