* [PATCH 2/2] cxgb3: Use generic XENPAK LASI register definitions
@ 2009-05-19 23:22 Ben Hutchings
2009-05-21 1:52 ` Divy Le Ray
0 siblings, 1 reply; 3+ messages in thread
From: Ben Hutchings @ 2009-05-19 23:22 UTC (permalink / raw)
To: David Miller; +Cc: Divy Le Ray, netdev
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
drivers/net/cxgb3/ael1002.c | 3 ++-
drivers/net/cxgb3/common.h | 10 ----------
drivers/net/cxgb3/t3_hw.c | 12 +++++++-----
3 files changed, 9 insertions(+), 16 deletions(-)
diff --git a/drivers/net/cxgb3/ael1002.c b/drivers/net/cxgb3/ael1002.c
index bebc00d..df1f585 100644
--- a/drivers/net/cxgb3/ael1002.c
+++ b/drivers/net/cxgb3/ael1002.c
@@ -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;
diff --git a/drivers/net/cxgb3/common.h b/drivers/net/cxgb3/common.h
index 3147789..79a113b 100644
--- a/drivers/net/cxgb3/common.h
+++ b/drivers/net/cxgb3/common.h
@@ -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,
diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c
index c8a865a..505a187 100644
--- a/drivers/net/cxgb3/t3_hw.c
+++ b/drivers/net/cxgb3/t3_hw.c
@@ -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[] = {
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 2/2] cxgb3: Use generic XENPAK LASI register definitions
2009-05-19 23:22 [PATCH 2/2] cxgb3: Use generic XENPAK LASI register definitions Ben Hutchings
@ 2009-05-21 1:52 ` Divy Le Ray
2009-05-21 3:52 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Divy Le Ray @ 2009-05-21 1:52 UTC (permalink / raw)
To: Ben Hutchings; +Cc: David Miller, netdev
Ben Hutchings wrote:
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
>
Acked-by: Divy Le Ray <divy@chelsio.com>
> ---
> drivers/net/cxgb3/ael1002.c | 3 ++-
> drivers/net/cxgb3/common.h | 10 ----------
> drivers/net/cxgb3/t3_hw.c | 12 +++++++-----
> 3 files changed, 9 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/net/cxgb3/ael1002.c b/drivers/net/cxgb3/ael1002.c
> index bebc00d..df1f585 100644
> --- a/drivers/net/cxgb3/ael1002.c
> +++ b/drivers/net/cxgb3/ael1002.c
> @@ -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;
>
> diff --git a/drivers/net/cxgb3/common.h b/drivers/net/cxgb3/common.h
> index 3147789..79a113b 100644
> --- a/drivers/net/cxgb3/common.h
> +++ b/drivers/net/cxgb3/common.h
> @@ -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,
> diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c
> index c8a865a..505a187 100644
> --- a/drivers/net/cxgb3/t3_hw.c
> +++ b/drivers/net/cxgb3/t3_hw.c
> @@ -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[] = {
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-05-21 3:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-19 23:22 [PATCH 2/2] cxgb3: Use generic XENPAK LASI register definitions Ben Hutchings
2009-05-21 1:52 ` Divy Le Ray
2009-05-21 3:52 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).