mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Noam Camus <noamc@ezchip.com>
To: <linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>
Cc: <davem@davemloft.net>, <Alexey.Brodkin@synopsys.com>,
	<vgupta@synopsys.com>, <talz@ezchip.com>,
	Noam Camus <noamc@ezchip.com>
Subject: [v1 4/6] NET: nps_enet: drop control frames
Date: Mon, 17 Aug 2015 08:58:37 +0300	[thread overview]
Message-ID: <1439791119-26892-5-git-send-email-noamc@ezchip.com> (raw)
In-Reply-To: <1439791119-26892-4-git-send-email-noamc@ezchip.com>

From: Noam Camus <noamc@ezchip.com>

We set controller to drop control frames and not trying
to pass them on. This is only needed for debug reasons.

Signed-off-by: Noam Camus <noamc@ezchip.com>
---
 drivers/net/ethernet/ezchip/nps_enet.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/ezchip/nps_enet.c b/drivers/net/ethernet/ezchip/nps_enet.c
index f78ad3d..0c13015 100644
--- a/drivers/net/ethernet/ezchip/nps_enet.c
+++ b/drivers/net/ethernet/ezchip/nps_enet.c
@@ -307,11 +307,8 @@ static void nps_enet_hw_enable_control(struct net_device *ndev)
 
 	/* Discard Packets bigger than max frame length */
 	max_frame_length = ETH_HLEN + ndev->mtu + ETH_FCS_LEN;
-	if (max_frame_length <= NPS_ENET_MAX_FRAME_LENGTH) {
+	if (max_frame_length <= NPS_ENET_MAX_FRAME_LENGTH)
 		ge_mac_cfg_3->max_len = max_frame_length;
-		nps_enet_reg_set(priv, NPS_ENET_REG_GE_MAC_CFG_3,
-				 ge_mac_cfg_3->value);
-	}
 
 	/* Enable interrupts */
 	buf_int_enable.rx_rdy = NPS_ENET_ENABLE;
@@ -339,11 +336,14 @@ static void nps_enet_hw_enable_control(struct net_device *ndev)
 	ge_mac_cfg_0.tx_fc_en = NPS_ENET_ENABLE;
 	ge_mac_cfg_0.rx_fc_en = NPS_ENET_ENABLE;
 	ge_mac_cfg_0.tx_fc_retr = NPS_ENET_GE_MAC_CFG_0_TX_FC_RETR;
+	ge_mac_cfg_3->cf_drop = NPS_ENET_ENABLE;
 
 	/* Enable Rx and Tx */
 	ge_mac_cfg_0.rx_en = NPS_ENET_ENABLE;
 	ge_mac_cfg_0.tx_en = NPS_ENET_ENABLE;
 
+	nps_enet_reg_set(priv, NPS_ENET_REG_GE_MAC_CFG_3,
+			 ge_mac_cfg_3->value);
 	nps_enet_reg_set(priv, NPS_ENET_REG_GE_MAC_CFG_0,
 			 ge_mac_cfg_0.value);
 }
-- 
1.7.1


  reply	other threads:[~2015-08-17  6:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-17  5:58 [v1 0/6] *** nps_enet fixups *** Noam Camus
2015-08-17  5:58 ` [v1 1/6] NET: nps_enet: replace use of cause register Noam Camus
2015-08-17  5:58   ` [v1 2/6] NET: nps_enet: reduce processing latency Noam Camus
2015-08-17  5:58     ` [v1 3/6] NET: nps_enet: TX done race condition Noam Camus
2015-08-17  5:58       ` Noam Camus [this message]
2015-08-17  5:58         ` [v1 5/6] NET: nps_enet: TX done acknowledge Noam Camus
2015-08-17  5:58           ` [v1 6/6] NET: nps_enet: minor namespace cleanup Noam Camus
2015-08-17 17:36 ` [v1 0/6] *** nps_enet fixups *** David Miller
2015-08-18  5:04   ` Noam Camus
2015-08-18  5:26     ` David Miller
2015-08-20  5:00   ` [v2 0/5] " Noam Camus
2015-08-20  5:00     ` [v2 1/5] NET: nps_enet: replace use of cause register Noam Camus
2015-08-20  5:00       ` [v2 2/5] NET: nps_enet: TX done race condition Noam Camus
2015-08-20  5:00         ` [v2 3/5] NET: nps_enet: drop control frames Noam Camus
2015-08-20  5:00           ` [v2 4/5] NET: nps_enet: TX done acknowledge Noam Camus
2015-08-20  5:00             ` [v2 5/5] NET: nps_enet: minor namespace cleanup Noam Camus
2015-08-23 23:09     ` [v2 0/5] *** nps_enet fixups *** 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=1439791119-26892-5-git-send-email-noamc@ezchip.com \
    --to=noamc@ezchip.com \
    --cc=Alexey.Brodkin@synopsys.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=talz@ezchip.com \
    --cc=vgupta@synopsys.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®