* Gianfar driver issue
@ 2012-12-11 9:59 Cedric VONCKEN
2012-12-11 14:35 ` Claudiu Manoil
0 siblings, 1 reply; 3+ messages in thread
From: Cedric VONCKEN @ 2012-12-11 9:59 UTC (permalink / raw)
To: netdev
Hi all,
I think he have an issue in Gianfar driver.
When the Netdev tx queue timeout occurred, the function
gfar_timeout(..) is called. This function calls indirectly the
gfar_init_mac(..) function.
In this function, the rctrl register is set to a default value.
If the Promiscuous is enable on the net dev ( flag IFF_PROMISC
is set), the gfar_init_function does not reactivate it.
The Promiscuous mode is used for example when the netdev is
bridged.
I apply this patch to fix it.
--- a/drivers/net/ethernet/freescale/gianfar.c. 2012-06-01
09:16:13.000000000 +0200
+++ b/drivers/net/ethernet/freescale/gianfar.c 2012-12-11
10:38:23.000000000 +0100
@@ -356,6 +356,11 @@
/* Configure the coalescing support */
gfar_configure_coalescing(priv, 0xFF, 0xFF);
+ if (ndev->flags & IFF_PROMISC) {
+ /* Set RCTRL to PROM */
+ rctrl |= RCTRL_PROM;
+ }
+
if (priv->rx_filer_enable) {
rctrl |= RCTRL_FILREN;
/* Program the RIR0 reg with the required distribution
*/
Cedric Voncken
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Gianfar driver issue
2012-12-11 9:59 Gianfar driver issue Cedric VONCKEN
@ 2012-12-11 14:35 ` Claudiu Manoil
2012-12-12 8:46 ` voncken
0 siblings, 1 reply; 3+ messages in thread
From: Claudiu Manoil @ 2012-12-11 14:35 UTC (permalink / raw)
To: Cedric VONCKEN; +Cc: netdev
On 12/11/2012 11:59 AM, Cedric VONCKEN wrote:
> Hi all,
>
> I think he have an issue in Gianfar driver.
>
> When the Netdev tx queue timeout occurred, the function
> gfar_timeout(..) is called. This function calls indirectly the
> gfar_init_mac(..) function.
>
> In this function, the rctrl register is set to a default value.
>
> If the Promiscuous is enable on the net dev ( flag IFF_PROMISC
> is set), the gfar_init_function does not reactivate it.
>
> The Promiscuous mode is used for example when the netdev is
> bridged.
>
> I apply this patch to fix it.
>
> --- a/drivers/net/ethernet/freescale/gianfar.c. 2012-06-01
> 09:16:13.000000000 +0200
> +++ b/drivers/net/ethernet/freescale/gianfar.c 2012-12-11
> 10:38:23.000000000 +0100
> @@ -356,6 +356,11 @@
> /* Configure the coalescing support */
> gfar_configure_coalescing(priv, 0xFF, 0xFF);
>
> + if (ndev->flags & IFF_PROMISC) {
> + /* Set RCTRL to PROM */
> + rctrl |= RCTRL_PROM;
> + }
> +
> if (priv->rx_filer_enable) {
> rctrl |= RCTRL_FILREN;
> /* Program the RIR0 reg with the required distribution
> */
Hello,
I don't see any issue with this code change, and there are other drivers
too reconfiguring the promiscuous mode upon tx timeout.
A valid (formatted) patch needs to be sent however.
Thanks,
Claudiu
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Gianfar driver issue
2012-12-11 14:35 ` Claudiu Manoil
@ 2012-12-12 8:46 ` voncken
0 siblings, 0 replies; 3+ messages in thread
From: voncken @ 2012-12-12 8:46 UTC (permalink / raw)
To: 'Claudiu Manoil'; +Cc: netdev
Thanks claudiu,
I will reformat my patch and resend it.
Regards.
Cedric Voncken
-----Message d'origine-----
De : Claudiu Manoil [mailto:claudiu.manoil@freescale.com]
Envoyé : mardi 11 décembre 2012 15:36
À : Cedric VONCKEN
Cc : netdev@vger.kernel.org
Objet : Re: Gianfar driver issue
On 12/11/2012 11:59 AM, Cedric VONCKEN wrote:
> Hi all,
>
> I think he have an issue in Gianfar driver.
>
> When the Netdev tx queue timeout occurred, the function
> gfar_timeout(..) is called. This function calls indirectly the
> gfar_init_mac(..) function.
>
> In this function, the rctrl register is set to a default value.
>
> If the Promiscuous is enable on the net dev ( flag IFF_PROMISC is
> set), the gfar_init_function does not reactivate it.
>
> The Promiscuous mode is used for example when the netdev is bridged.
>
> I apply this patch to fix it.
>
> --- a/drivers/net/ethernet/freescale/gianfar.c. 2012-06-01
> 09:16:13.000000000 +0200
> +++ b/drivers/net/ethernet/freescale/gianfar.c 2012-12-11
> 10:38:23.000000000 +0100
> @@ -356,6 +356,11 @@
> /* Configure the coalescing support */
> gfar_configure_coalescing(priv, 0xFF, 0xFF);
>
> + if (ndev->flags & IFF_PROMISC) {
> + /* Set RCTRL to PROM */
> + rctrl |= RCTRL_PROM;
> + }
> +
> if (priv->rx_filer_enable) {
> rctrl |= RCTRL_FILREN;
> /* Program the RIR0 reg with the required distribution */
Hello,
I don't see any issue with this code change, and there are other drivers too
reconfiguring the promiscuous mode upon tx timeout.
A valid (formatted) patch needs to be sent however.
Thanks,
Claudiu
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-12-12 8:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-11 9:59 Gianfar driver issue Cedric VONCKEN
2012-12-11 14:35 ` Claudiu Manoil
2012-12-12 8:46 ` voncken
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).