From patchwork Mon Jan 21 16:24:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cedric VONCKEN X-Patchwork-Id: 214234 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 0E1672C0080 for ; Tue, 22 Jan 2013 04:11:33 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752838Ab3AURL3 (ORCPT ); Mon, 21 Jan 2013 12:11:29 -0500 Received: from smtp-out04.msg.oleane.net ([62.161.7.2]:40403 "EHLO smtp-out04.msg.oleane.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752052Ab3AURL2 convert rfc822-to-8bit (ORCPT ); Mon, 21 Jan 2013 12:11:28 -0500 X-Greylist: delayed 1548 seconds by postgrey-1.27 at vger.kernel.org; Mon, 21 Jan 2013 12:11:28 EST Received: from smtp01.msg.oleane.net (smtp01.mail.priv [172.17.20.110]) by smtp-out04.msg.oleane.net with ESMTP id r0LGjcwU001812 for ; Mon, 21 Jan 2013 17:45:38 +0100 Received: from acksys.fr ([195.6.104.67]) (authenticated) by smtp01.msg.oleane.net (MTA) with ESMTP id r0LGOjYT026107; Mon, 21 Jan 2013 17:24:46 +0100 Subject: [patch] Gianfar : Enable promiscous mode after queue time out Date: Mon, 21 Jan 2013 17:24:43 +0100 Message-ID: <773DB8A82AB6A046AE0195C68612A319014B7309@sbs2003.acksys.local> MIME-Version: 1.0 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [patch] Gianfar : Enable promiscous mode after queue time out Content-class: urn:content-classes:message Thread-Index: Ac338zu0254uLlupQnmrM0VbLzaG1w== X-MimeOLE: Produced By Microsoft Exchange V6.5.7235.2 From: "Cedric VONCKEN" To: "Claudiu Manoil" , X-Spam-Flag: NO X-PMX-Spam: Probability=8% X-PFSI-Info: PMX 5.5.9.395186, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2013.1.21.160320 (no antivirus check) X-Orange-Auth: bWMxNDg4LTg= Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi all, 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 on the kernel 3.8-rc4 to fix it. Signed-off-by : Voncken C Acksys */ --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c @@ -349,6 +349,11 @@ static void gfar_init_mac(struct net_dev /* 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