From: Claudiu Manoil <claudiu.manoil@freescale.com>
To: "David S. Miller" <davem@davemloft.net>, <netdev@vger.kernel.org>
Subject: [PATCH net 2/4] gianfar: Don't enable the Filer w/o the Parser
Date: Fri, 23 Oct 2015 11:41:59 +0300 [thread overview]
Message-ID: <1445589721-26206-3-git-send-email-claudiu.manoil@freescale.com> (raw)
In-Reply-To: <1445589721-26206-1-git-send-email-claudiu.manoil@freescale.com>
Under one unusual circumstance it's possible to wrongly set
FILREN without enabling PRSDEP as well in the RCTRL register,
against the hardware specifications. With the default config
this does not happen because the default Rx offloads (Rx csum
and Rx VLAN) properly enable PRSDEP. But if anyone disables
all these offloads (via ethtool), we get a wrong configuration
were the Rx flow classification and hashing, and other Filer
based features (e.g. wake-on-filer interrupt) won't work.
This patch fixes the issue.
Also, account for Rx FCB insertion which happens every time
PRSDEP is set.
Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
---
drivers/net/ethernet/freescale/gianfar.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index 710715f..939ed8f 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -341,7 +341,7 @@ static void gfar_rx_offload_en(struct gfar_private *priv)
if (priv->ndev->features & (NETIF_F_RXCSUM | NETIF_F_HW_VLAN_CTAG_RX))
priv->uses_rxfcb = 1;
- if (priv->hwts_rx_en)
+ if (priv->hwts_rx_en || priv->rx_filer_enable)
priv->uses_rxfcb = 1;
}
@@ -351,7 +351,7 @@ static void gfar_mac_rx_config(struct gfar_private *priv)
u32 rctrl = 0;
if (priv->rx_filer_enable) {
- rctrl |= RCTRL_FILREN;
+ rctrl |= RCTRL_FILREN | RCTRL_PRSDEP_INIT;
/* Program the RIR0 reg with the required distribution */
if (priv->poll_mode == GFAR_SQ_POLLING)
gfar_write(®s->rir0, DEFAULT_2RXQ_RIR0);
--
1.7.11.7
next prev parent reply other threads:[~2015-10-23 8:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-23 8:41 [PATCH net 0/4] gianfar: Misc. fixes and updates Claudiu Manoil
2015-10-23 8:41 ` [PATCH net 1/4] gianfar: Remove duplicated argument to bitwise OR Claudiu Manoil
2015-10-23 8:41 ` Claudiu Manoil [this message]
2015-10-23 8:42 ` [PATCH net 3/4] gianfar: Fix Rx BSY error handling Claudiu Manoil
2015-10-23 8:42 ` [PATCH net 4/4] MAINTAINERS: Add entry for gianfar ethernet driver Claudiu Manoil
2015-10-26 1:29 ` [PATCH net 0/4] gianfar: Misc. fixes and updates 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=1445589721-26206-3-git-send-email-claudiu.manoil@freescale.com \
--to=claudiu.manoil@freescale.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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).