* [PATCH net 0/4] gianfar: Misc. fixes and updates
@ 2015-10-23 8:41 Claudiu Manoil
2015-10-23 8:41 ` [PATCH net 1/4] gianfar: Remove duplicated argument to bitwise OR Claudiu Manoil
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Claudiu Manoil @ 2015-10-23 8:41 UTC (permalink / raw)
To: David S. Miller, netdev
Various fixes for some older issues, including having a
MAINTAINERS entry for this driver.
I'd recommend applying them on top of net, thanks.
Claudiu Manoil (4):
gianfar: Remove duplicated argument to bitwise OR
gianfar: Don't enable the Filer w/o the Parser
gianfar: Fix Rx BSY error handling
MAINTAINERS: Add entry for gianfar ethernet driver
MAINTAINERS | 8 ++++++++
drivers/net/ethernet/freescale/gianfar.c | 8 +++-----
drivers/net/ethernet/freescale/gianfar_ethtool.c | 4 ++--
3 files changed, 13 insertions(+), 7 deletions(-)
--
1.7.11.7
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net 1/4] gianfar: Remove duplicated argument to bitwise OR
2015-10-23 8:41 [PATCH net 0/4] gianfar: Misc. fixes and updates Claudiu Manoil
@ 2015-10-23 8:41 ` Claudiu Manoil
2015-10-23 8:41 ` [PATCH net 2/4] gianfar: Don't enable the Filer w/o the Parser Claudiu Manoil
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Claudiu Manoil @ 2015-10-23 8:41 UTC (permalink / raw)
To: David S. Miller, netdev
RQFCR_AND is duplicated.
Add missing space as well.
Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
---
drivers/net/ethernet/freescale/gianfar_ethtool.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/freescale/gianfar_ethtool.c b/drivers/net/ethernet/freescale/gianfar_ethtool.c
index 6bdc891..a33e4a8 100644
--- a/drivers/net/ethernet/freescale/gianfar_ethtool.c
+++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c
@@ -676,14 +676,14 @@ static void ethflow_to_filer_rules (struct gfar_private *priv, u64 ethflow)
u32 fcr = 0x0, fpr = FPR_FILER_MASK;
if (ethflow & RXH_L2DA) {
- fcr = RQFCR_PID_DAH |RQFCR_CMP_NOMATCH |
+ fcr = RQFCR_PID_DAH | RQFCR_CMP_NOMATCH |
RQFCR_HASH | RQFCR_AND | RQFCR_HASHTBL_0;
priv->ftp_rqfpr[priv->cur_filer_idx] = fpr;
priv->ftp_rqfcr[priv->cur_filer_idx] = fcr;
gfar_write_filer(priv, priv->cur_filer_idx, fcr, fpr);
priv->cur_filer_idx = priv->cur_filer_idx - 1;
- fcr = RQFCR_PID_DAL | RQFCR_AND | RQFCR_CMP_NOMATCH |
+ fcr = RQFCR_PID_DAL | RQFCR_CMP_NOMATCH |
RQFCR_HASH | RQFCR_AND | RQFCR_HASHTBL_0;
priv->ftp_rqfpr[priv->cur_filer_idx] = fpr;
priv->ftp_rqfcr[priv->cur_filer_idx] = fcr;
--
1.7.11.7
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net 2/4] gianfar: Don't enable the Filer w/o the Parser
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
2015-10-23 8:42 ` [PATCH net 3/4] gianfar: Fix Rx BSY error handling Claudiu Manoil
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Claudiu Manoil @ 2015-10-23 8:41 UTC (permalink / raw)
To: David S. Miller, netdev
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net 3/4] gianfar: Fix Rx BSY error handling
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 ` [PATCH net 2/4] gianfar: Don't enable the Filer w/o the Parser Claudiu Manoil
@ 2015-10-23 8:42 ` 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
4 siblings, 0 replies; 6+ messages in thread
From: Claudiu Manoil @ 2015-10-23 8:42 UTC (permalink / raw)
To: David S. Miller, netdev
The Rx BSY error interrupt indicates that a frame was
received and discarded due to lack of buffers, so it's
a rx ring overflow condition and has nothing to do with
with bad rx packets. Use the right counter.
BSY conditions happen when the SoC is under performance
stress. Doing *more* work in stress situations by trying
to schedule NAPI is not a good idea as the stressed system
becomes still more stressed. The Rx interrupt is already
at work making sure the NAPI is scheduled.
So calling gfar_receive() here does not help. This issue
was present since day 1.
Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
---
drivers/net/ethernet/freescale/gianfar.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index 939ed8f..ce38d26 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -3462,11 +3462,9 @@ static irqreturn_t gfar_error(int irq, void *grp_id)
netif_dbg(priv, tx_err, dev, "Transmit Error\n");
}
if (events & IEVENT_BSY) {
- dev->stats.rx_errors++;
+ dev->stats.rx_over_errors++;
atomic64_inc(&priv->extra_stats.rx_bsy);
- gfar_receive(irq, grp_id);
-
netif_dbg(priv, rx_err, dev, "busy error (rstat: %x)\n",
gfar_read(®s->rstat));
}
--
1.7.11.7
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net 4/4] MAINTAINERS: Add entry for gianfar ethernet driver
2015-10-23 8:41 [PATCH net 0/4] gianfar: Misc. fixes and updates Claudiu Manoil
` (2 preceding siblings ...)
2015-10-23 8:42 ` [PATCH net 3/4] gianfar: Fix Rx BSY error handling Claudiu Manoil
@ 2015-10-23 8:42 ` Claudiu Manoil
2015-10-26 1:29 ` [PATCH net 0/4] gianfar: Misc. fixes and updates David Miller
4 siblings, 0 replies; 6+ messages in thread
From: Claudiu Manoil @ 2015-10-23 8:42 UTC (permalink / raw)
To: David S. Miller, netdev
Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
---
MAINTAINERS | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index fb7d2e4..9b43ef2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4427,6 +4427,14 @@ L: linuxppc-dev@lists.ozlabs.org
S: Maintained
F: drivers/net/ethernet/freescale/ucc_geth*
+FREESCALE eTSEC ETHERNET DRIVER (GIANFAR)
+M: Claudiu Manoil <claudiu.manoil@freescale.com>
+L: netdev@vger.kernel.org
+S: Maintained
+F: drivers/net/ethernet/freescale/gianfar*
+X: drivers/net/ethernet/freescale/gianfar_ptp.c
+F: Documentation/devicetree/bindings/net/fsl-tsec-phy.txt
+
FREESCALE QUICC ENGINE UCC UART DRIVER
M: Timur Tabi <timur@tabi.org>
L: linuxppc-dev@lists.ozlabs.org
--
1.7.11.7
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net 0/4] gianfar: Misc. fixes and updates
2015-10-23 8:41 [PATCH net 0/4] gianfar: Misc. fixes and updates Claudiu Manoil
` (3 preceding siblings ...)
2015-10-23 8:42 ` [PATCH net 4/4] MAINTAINERS: Add entry for gianfar ethernet driver Claudiu Manoil
@ 2015-10-26 1:29 ` David Miller
4 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2015-10-26 1:29 UTC (permalink / raw)
To: claudiu.manoil; +Cc: netdev
From: Claudiu Manoil <claudiu.manoil@freescale.com>
Date: Fri, 23 Oct 2015 11:41:57 +0300
> Various fixes for some older issues, including having a
> MAINTAINERS entry for this driver.
> I'd recommend applying them on top of net, thanks.
Series applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-10-26 1:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH net 2/4] gianfar: Don't enable the Filer w/o the Parser Claudiu Manoil
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
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).