]> Pileus Git - ~andy/linux/commitdiff
cxgb3: Use generic XENPAK LASI register definitions
authorBen Hutchings <bhutchings@solarflare.com>
Tue, 19 May 2009 13:22:30 +0000 (13:22 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 May 2009 03:51:58 +0000 (20:51 -0700)
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Acked-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/cxgb3/ael1002.c
drivers/net/cxgb3/common.h
drivers/net/cxgb3/t3_hw.c

index bebc00d2424df497a5b155f5693e1c6b05a0c089..df1f58576689908450098ae58b9267c81fc74fc2 100644 (file)
@@ -1007,7 +1007,8 @@ static int ael2005_reset(struct cphy *phy, int wait)
        int err;
        unsigned int lasi_ctrl;
 
-       err = t3_mdio_read(phy, MDIO_MMD_PMAPMD, LASI_CTRL, &lasi_ctrl);
+       err = t3_mdio_read(phy, MDIO_MMD_PMAPMD, MDIO_PMA_LASI_CTRL,
+                          &lasi_ctrl);
        if (err)
                return err;
 
index 3147789aecec85fc5a06bc24a0ee46d83657f5bd..79a113b99e2fc68102c66e492de34bb57864da87 100644 (file)
@@ -521,16 +521,6 @@ enum {
        MAC_RXFIFO_SIZE = 32768
 };
 
-/* 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 */
 enum {
        PHY_LOOPBACK_TX = 1,
index c8a865a7e26ce3a62dc8ad2358fbddf2aa696cdc..505a1871d0805bf79f2aad413ecb935f8b41ed80 100644 (file)
@@ -472,29 +472,31 @@ int t3_set_phy_speed_duplex(struct cphy *phy, int speed, int duplex)
 
 int t3_phy_lasi_intr_enable(struct cphy *phy)
 {
-       return t3_mdio_write(phy, MDIO_MMD_PMAPMD, LASI_CTRL, 1);
+       return t3_mdio_write(phy, MDIO_MMD_PMAPMD, MDIO_PMA_LASI_CTRL,
+                            MDIO_PMA_LASI_LSALARM);
 }
 
 int t3_phy_lasi_intr_disable(struct cphy *phy)
 {
-       return t3_mdio_write(phy, MDIO_MMD_PMAPMD, LASI_CTRL, 0);
+       return t3_mdio_write(phy, MDIO_MMD_PMAPMD, MDIO_PMA_LASI_CTRL, 0);
 }
 
 int t3_phy_lasi_intr_clear(struct cphy *phy)
 {
        u32 val;
 
-       return t3_mdio_read(phy, MDIO_MMD_PMAPMD, LASI_STAT, &val);
+       return t3_mdio_read(phy, MDIO_MMD_PMAPMD, MDIO_PMA_LASI_STAT, &val);
 }
 
 int t3_phy_lasi_intr_handler(struct cphy *phy)
 {
        unsigned int status;
-       int err = t3_mdio_read(phy, MDIO_MMD_PMAPMD, LASI_STAT, &status);
+       int err = t3_mdio_read(phy, MDIO_MMD_PMAPMD, MDIO_PMA_LASI_STAT,
+                              &status);
 
        if (err)
                return err;
-       return (status & 1) ?  cphy_cause_link_change : 0;
+       return (status & MDIO_PMA_LASI_LSALARM) ? cphy_cause_link_change : 0;
 }
 
 static const struct adapter_info t3_adap_info[] = {