mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: xiong <xiong@qca.qualcomm.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Cc: <qca-linux-team@qualcomm.com>, <nic-devel@qualcomm.com>,
	xiong <xiong@qca.qualcomm.com>
Subject: [PATCH 07/12] atl1c: remove code related to rxq 1/2/3
Date: Wed, 18 Apr 2012 13:32:31 +0800	[thread overview]
Message-ID: <1334727156-6830-8-git-send-email-xiong@qca.qualcomm.com> (raw)
In-Reply-To: <1334727156-6830-1-git-send-email-xiong@qca.qualcomm.com>

remove code related to rxq 1/2/3 since multi-q not support.
refine REG_RXQ_CTRL definition as well.

Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
---
 drivers/net/ethernet/atheros/atl1c/atl1c_hw.h   |   29 +++++++++-------------
 drivers/net/ethernet/atheros/atl1c/atl1c_main.c |    3 +-
 2 files changed, 13 insertions(+), 19 deletions(-)

diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_hw.h b/drivers/net/ethernet/atheros/atl1c/atl1c_hw.h
index ca45fad..18c1f18 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_hw.h
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_hw.h
@@ -493,26 +493,21 @@ int atl1c_phy_power_saving(struct atl1c_hw *hw);
 #define ASPM_THRUPUT_LIMIT_NO		0x00
 #define ASPM_THRUPUT_LIMIT_1M		0x01
 #define ASPM_THRUPUT_LIMIT_10M		0x02
-#define ASPM_THRUPUT_LIMIT_100M		0x04
-#define RXQ1_CTRL_EN			0x10
-#define RXQ2_CTRL_EN			0x20
-#define RXQ3_CTRL_EN			0x40
-#define IPV6_CHKSUM_CTRL_EN		0x80
-#define RSS_HASH_BITS_MASK		0x00FF
-#define RSS_HASH_BITS_SHIFT		8
-#define RSS_HASH_IPV4			0x10000
-#define RSS_HASH_IPV4_TCP		0x20000
-#define RSS_HASH_IPV6			0x40000
-#define RSS_HASH_IPV6_TCP		0x80000
+#define ASPM_THRUPUT_LIMIT_100M		0x03
+#define IPV6_CHKSUM_CTRL_EN		BIT(7)
 #define RXQ_RFD_BURST_NUM_MASK		0x003F
 #define RXQ_RFD_BURST_NUM_SHIFT		20
-#define RSS_MODE_MASK			0x0003
+#define RXQ_NUM_RFD_PREF_DEF		8
+#define RSS_MODE_MASK			3UL
 #define RSS_MODE_SHIFT			26
-#define RSS_NIP_QUEUE_SEL_MASK		0x1
-#define RSS_NIP_QUEUE_SEL_SHIFT		28
-#define RRS_HASH_CTRL_EN		0x20000000
-#define RX_CUT_THRU_EN			0x40000000
-#define RXQ_CTRL_EN			0x80000000
+#define RSS_MODE_DIS			0
+#define RSS_MODE_SQSI			1
+#define RSS_MODE_MQSI			2
+#define RSS_MODE_MQMI			3
+#define RSS_NIP_QUEUE_SEL		BIT(28) /* 0:q0, 1:table */
+#define RRS_HASH_CTRL_EN		BIT(29)
+#define RX_CUT_THRU_EN			BIT(30)
+#define RXQ_CTRL_EN			BIT(31)
 
 #define REG_RFD_FREE_THRESH		0x15A4
 #define RFD_FREE_THRESH_MASK		0x003F
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
index c7d7640..ca1259d 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
@@ -1137,8 +1137,7 @@ static int atl1c_stop_mac(struct atl1c_hw *hw)
 	u32 data;
 
 	AT_READ_REG(hw, REG_RXQ_CTRL, &data);
-	data &= ~(RXQ1_CTRL_EN | RXQ2_CTRL_EN |
-		  RXQ3_CTRL_EN | RXQ_CTRL_EN);
+	data &= ~RXQ_CTRL_EN;
 	AT_WRITE_REG(hw, REG_RXQ_CTRL, data);
 
 	AT_READ_REG(hw, REG_TXQ_CTRL, &data);
-- 
1.7.7


  parent reply	other threads:[~2012-04-18  5:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-18  5:32 [PATCH 00/12] atl1c: update hardware settings - v1 xiong
2012-04-18  5:32 ` [PATCH 01/12] atl1c: update author contact info & company/driver desciption xiong
2012-04-18  5:32 ` [PATCH 02/12] atl1c: remove multiple-RX-Q code xiong
2012-04-18  5:32 ` [PATCH 03/12] atl1c: remove HDS register xiong
2012-04-18  5:32 ` [PATCH 04/12] atl1c: remove VPD register xiong
2012-04-18  5:32 ` [PATCH 05/12] atl1c: remove SMB/CMB DMA related code xiong
2012-04-18  5:32 ` [PATCH 06/12] atl1c: split 2 32bit registers of TPD to 4 16bit registers xiong
2012-04-18  5:32 ` xiong [this message]
2012-04-18  5:32 ` [PATCH 08/12] atl1c: wrong register used to stop TXQ xiong
2012-04-18  5:32 ` [PATCH 09/12] atl1c: correct wrong definition of REG_DMA_CTRL xiong
2012-04-18  5:32 ` [PATCH 10/12] atl1c: remove dmaw_block xiong
2012-04-18  5:32 ` [PATCH 11/12] atl1c: using fixed TXQ configuration for l2cb and l1c xiong
2012-04-18  5:32 ` [PATCH 12/12] atl1c: restore max-read-request-size in Device Conrol Register xiong
2012-04-18 19:37 ` [PATCH 00/12] atl1c: update hardware settings - v1 David Miller
  -- strict thread matches above, loose matches on Subject: below --
2012-04-14  9:59 [PATCH 00/12] atl1c: update hardware settings -v1 xiong
2012-04-14  9:59 ` [PATCH 07/12] atl1c: remove code related to rxq 1/2/3 xiong

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=1334727156-6830-8-git-send-email-xiong@qca.qualcomm.com \
    --to=xiong@qca.qualcomm.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nic-devel@qualcomm.com \
    --cc=qca-linux-team@qualcomm.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

all inboxes | Powered by JetHome®