From: Divy Le Ray <divy@chelsio.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
swise@opengridcomputing.com
Subject: [PATCH net-next 2/2] cxgb3: minor aq100x phy fixes
Date: Wed, 03 Jun 2009 09:19:15 -0700 [thread overview]
Message-ID: <20090603161915.17960.58081.stgit@speedy5> (raw)
In-Reply-To: <20090603161910.17960.28171.stgit@speedy5>
From: Divy Le Ray <divy@chelsio.com>
Use generic MDIO generic values.
Based on Ben Hutchings'review comments.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
---
drivers/net/cxgb3/aq100x.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/net/cxgb3/aq100x.c b/drivers/net/cxgb3/aq100x.c
index c51e50d..b1fd5bf 100644
--- a/drivers/net/cxgb3/aq100x.c
+++ b/drivers/net/cxgb3/aq100x.c
@@ -43,8 +43,6 @@ enum {
AQ_XAUI_TX_CFG = 0xe400,
/* MDIO_DEV_ANEG registers */
- AQ_100M_CTRL = 0x0010,
- AQ_10G_CTRL = 0x0020,
AQ_1G_CTRL = 0xc400,
AQ_ANEG_STAT = 0xc800,
@@ -54,14 +52,15 @@ enum {
AQ_IMASK_GLOBAL = 0xff00,
};
-#define AQBIT(x) (1 << (x))
-#define IMASK_PMA AQBIT(0x2)
-#define IMASK_GLOBAL AQBIT(0xf)
-#define ADV_1G_FULL AQBIT(0xf)
-#define ADV_1G_HALF AQBIT(0xe)
-#define ADV_10G_FULL AQBIT(0xc)
-#define AQ_RESET (AQBIT(0xe) | AQBIT(0xf))
-#define AQ_LOWPOWER AQBIT(0xb)
+enum {
+ IMASK_PMA = 1 << 2,
+ IMASK_GLOBAL = 1 << 15,
+ ADV_1G_FULL = 1 << 15,
+ ADV_1G_HALF = 1 << 14,
+ ADV_10G_FULL = 1 << 12,
+ AQ_RESET = (1 << 14) | (1 << 15),
+ AQ_LOWPOWER = 1 << 12,
+};
static int aq100x_reset(struct cphy *phy, int wait)
{
@@ -160,7 +159,7 @@ static int aq100x_advertise(struct cphy *phy, unsigned int advertise_map)
adv = 0;
if (advertise_map & ADVERTISED_10000baseT_Full)
adv |= ADV_10G_FULL;
- err = t3_mdio_change_bits(phy, MDIO_MMD_AN, AQ_10G_CTRL,
+ err = t3_mdio_change_bits(phy, MDIO_MMD_AN, MDIO_AN_10GBT_CTRL,
ADV_10G_FULL, adv);
if (err)
return err;
@@ -186,7 +185,8 @@ static int aq100x_advertise(struct cphy *phy, unsigned int advertise_map)
adv |= ADVERTISE_PAUSE_CAP;
if (advertise_map & ADVERTISED_Asym_Pause)
adv |= ADVERTISE_PAUSE_ASYM;
- err = t3_mdio_change_bits(phy, MDIO_MMD_AN, AQ_100M_CTRL, 0xfe0, adv);
+ err = t3_mdio_change_bits(phy, MDIO_MMD_AN, MDIO_AN_ADVERTISE,
+ 0xfe0, adv);
return err;
}
next prev parent reply other threads:[~2009-06-03 16:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-03 16:19 [PATCH net-next 1/2] cxgb3: Update FW to 7.4.0 Divy Le Ray
2009-06-03 16:19 ` Divy Le Ray [this message]
2009-06-04 4:02 ` [PATCH net-next 2/2] cxgb3: minor aq100x phy fixes David Miller
2009-06-03 23:39 ` [PATCH net-next 1/2] cxgb3: Update FW to 7.4.0 Divy Le Ray
2009-06-04 0:54 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090603161915.17960.58081.stgit@speedy5 \
--to=divy@chelsio.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=swise@opengridcomputing.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox