From: sunil.kovvuri@gmail.com
To: netdev@vger.kernel.org
Cc: Sunil Goutham <sgoutham@cavium.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH 21/21] net: thunderx: Don't set RX_PACKET_DIS while initializing
Date: Wed, 10 Aug 2016 12:12:53 +0530 [thread overview]
Message-ID: <1470811373-28277-22-git-send-email-sunil.kovvuri@gmail.com> (raw)
In-Reply-To: <1470811373-28277-1-git-send-email-sunil.kovvuri@gmail.com>
From: Sunil Goutham <sgoutham@cavium.com>
Setting BGXX_SPUX_MISC_CONTROL::RX_PACKET_DIS is not needed as
packet reception is anyway disabled by BGXX_CMRX_CONFIG::DATA_PKT_RX_EN.
Also setting RX_PACKET_DIS causes a bogus remote fault condition
which delays link detection.
Signed-off-by: Sunil Goutham <sgoutham@cavium.com>
---
drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
index ca58d7f..8bbaedb 100644
--- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
+++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
@@ -459,12 +459,14 @@ static int bgx_lmac_xaui_init(struct bgx *bgx, struct lmac *lmac)
bgx_reg_modify(bgx, lmacid, BGX_SPUX_CONTROL1, SPU_CTL_LOW_POWER);
/* Set interleaved running disparity for RXAUI */
- if (lmac->lmac_type != BGX_MODE_RXAUI)
- bgx_reg_modify(bgx, lmacid,
- BGX_SPUX_MISC_CONTROL, SPU_MISC_CTL_RX_DIS);
- else
+ if (lmac->lmac_type == BGX_MODE_RXAUI)
bgx_reg_modify(bgx, lmacid, BGX_SPUX_MISC_CONTROL,
- SPU_MISC_CTL_RX_DIS | SPU_MISC_CTL_INTLV_RDISP);
+ SPU_MISC_CTL_INTLV_RDISP);
+
+ /* Clear receive packet disable */
+ cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_MISC_CONTROL);
+ cfg &= ~SPU_MISC_CTL_RX_DIS;
+ bgx_reg_write(bgx, lmacid, BGX_SPUX_MISC_CONTROL, cfg);
/* clear all interrupts */
cfg = bgx_reg_read(bgx, lmacid, BGX_SMUX_RX_INT);
@@ -537,7 +539,6 @@ static int bgx_xaui_check_link(struct lmac *lmac)
int lmac_type = lmac->lmac_type;
u64 cfg;
- bgx_reg_modify(bgx, lmacid, BGX_SPUX_MISC_CONTROL, SPU_MISC_CTL_RX_DIS);
if (lmac->use_training) {
cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_INT);
if (!(cfg & (1ull << 13))) {
@@ -607,11 +608,6 @@ static int bgx_xaui_check_link(struct lmac *lmac)
return -1;
}
- /* Clear receive packet disable */
- cfg = bgx_reg_read(bgx, lmacid, BGX_SPUX_MISC_CONTROL);
- cfg &= ~SPU_MISC_CTL_RX_DIS;
- bgx_reg_write(bgx, lmacid, BGX_SPUX_MISC_CONTROL, cfg);
-
/* Check for MAC RX faults */
cfg = bgx_reg_read(bgx, lmacid, BGX_SMUX_RX_CTL);
/* 0 - Link is okay, 1 - Local fault, 2 - Remote fault */
--
2.7.4
prev parent reply other threads:[~2016-08-10 6:42 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-10 6:42 [PATCH 00/21] net: thunderx: Support for newer chips and miscellaneous patches sunil.kovvuri
2016-08-10 6:42 ` [PATCH 01/21] net: thunderx: Moved HW capability info from macros to structure sunil.kovvuri
2016-08-10 6:42 ` [PATCH 02/21] net: thunderx: Add VNIC's PCI devid on future chips sunil.kovvuri
2016-08-10 6:42 ` [PATCH 03/21] net: thunderx: Add support for 81xx and 83xx chips sunil.kovvuri
2016-08-10 6:42 ` [PATCH 04/21] net: thunderx: Set queue count based on number of CPUs sunil.kovvuri
2016-08-11 9:36 ` Yuval Mintz
2016-08-11 9:57 ` Sunil Kovvuri
2016-08-10 6:42 ` [PATCH 05/21] net: thunderx: Enable CQE_RX desc's extension fields sunil.kovvuri
2016-08-10 6:42 ` [PATCH 06/21] net: thunderx: Enable mailbox interrupts on 81xx/83xx sunil.kovvuri
2016-08-10 6:42 ` [PATCH 07/21] net: thunderx: Support for different LMAC types within BGX sunil.kovvuri
2016-08-10 6:42 ` [PATCH 08/21] net: thunderx: Add 81xx support to BGX driver sunil.kovvuri
2016-08-10 6:42 ` [PATCH 09/21] net: thunderx: Add QSGMII interface type support sunil.kovvuri
2016-08-10 6:42 ` [PATCH 10/21] net: thunderx: Add RGMII " sunil.kovvuri
2016-08-10 6:42 ` [PATCH 11/21] net: thunderx: Add support for 16 LMACs of 83xx sunil.kovvuri
2016-08-11 2:45 ` kbuild test robot
2016-08-10 6:42 ` [PATCH 12/21] net: thunderx: Support for 83xx mixed QLM/DLM config sunil.kovvuri
2016-08-10 6:42 ` [PATCH 13/21] net: thunderx: Use netdev's name for naming VF's interrupts sunil.kovvuri
2016-08-10 6:42 ` [PATCH 14/21] net: thunderx: Use skb_add_rx_frag() for split buffer Rx pkts sunil.kovvuri
2016-08-10 6:42 ` [PATCH 15/21] net: thunderx: Improvement for MBX interface debug messages sunil.kovvuri
2016-08-10 6:42 ` [PATCH 16/21] net: thunderx: Reset RXQ HW stats when interface is brought down sunil.kovvuri
2016-08-10 6:42 ` [PATCH 17/21] net: thunderx: Don't set mac address for secondary Qset VFs sunil.kovvuri
2016-08-10 6:42 ` [PATCH 18/21] net: thunderx: Use napi_consume_skb for bulk free sunil.kovvuri
2016-08-10 6:42 ` [PATCH 19/21] net: thunderx: Configure tunnelling protocol parsing sunil.kovvuri
2016-08-10 6:42 ` [PATCH 20/21] net: thunderx: Use netdev_rss_key_fill() helper sunil.kovvuri
2016-08-10 6:42 ` sunil.kovvuri [this message]
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=1470811373-28277-22-git-send-email-sunil.kovvuri@gmail.com \
--to=sunil.kovvuri@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sgoutham@cavium.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;
as well as URLs for NNTP newsgroup(s).