From patchwork Mon Aug 27 08:38:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?6L+R5rKiID0/SVNPLTIwMjItSlA/Qj9JQnNrUWtVdk8wc2JLRUk9Pz0=?= X-Patchwork-Id: 180156 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 33C502C00FD for ; Mon, 27 Aug 2012 18:39:24 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752805Ab2H0Iih (ORCPT ); Mon, 27 Aug 2012 04:38:37 -0400 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:53771 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751194Ab2H0Iig (ORCPT ); Mon, 27 Aug 2012 04:38:36 -0400 Received: from m1.gw.fujitsu.co.jp (unknown [10.0.50.71]) by fgwmail5.fujitsu.co.jp (Postfix) with ESMTP id AEDCA3EE081; Mon, 27 Aug 2012 17:38:34 +0900 (JST) Received: from smail (m1 [127.0.0.1]) by outgoing.m1.gw.fujitsu.co.jp (Postfix) with ESMTP id 9819D45DE55; Mon, 27 Aug 2012 17:38:34 +0900 (JST) Received: from s1.gw.fujitsu.co.jp (s1.gw.fujitsu.co.jp [10.0.50.91]) by m1.gw.fujitsu.co.jp (Postfix) with ESMTP id 7E8FE45DE54; Mon, 27 Aug 2012 17:38:34 +0900 (JST) Received: from s1.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id 72C221DB8045; Mon, 27 Aug 2012 17:38:34 +0900 (JST) Received: from m003.s.css.fujitsu.com (m003.s.css.fujitsu.com [10.23.4.33]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id 30EF41DB803A; Mon, 27 Aug 2012 17:38:34 +0900 (JST) Received: from m003.css.fujitsu.com (m003 [127.0.0.1]) by m003.s.css.fujitsu.com (Postfix) with ESMTP id A2DEE2E080E; Mon, 27 Aug 2012 17:38:33 +0900 (JST) Received: from VF09040P.jp.fujitsu.com (chikazawa.utsfd.cs.fujitsu.co.jp [10.24.19.49]) by m003.s.css.fujitsu.com (Postfix) with SMTP id 0E41C2E082B; Mon, 27 Aug 2012 17:38:32 +0900 (JST) X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Received: from VF09040P[10.24.19.49] by VF09040P (FujitsuOutboundMailChecker v1.3.1/9992[10.24.19.49]); Mon, 27 Aug 2012 17:38:38 +0900 (JST) Message-Id: <201208270838.AA02326@VF09040P.jp.fujitsu.com> From: chikazawa.akifu@jp.fujitsu.com (=?ISO-2022-JP?B?GyRCNmFCdBsoQg==?= =?ISO-2022-JP?B?IBskQkUvO0sbKEI=?=) Date: Mon, 27 Aug 2012 17:38:34 +0900 To: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: when the MTU interface is modified, the promiscuous mode is reset in gianfar driver MIME-Version: 1.0 X-Mailer: AL-Mail32 Version 1.13 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi I am using the gianfar ethernet driver. I am having a problem with the interface settings. Under promiscuous mode, when the MTU interface is modified, the promiscuous mode setting is turned off in gianfar driver when it should not be. The details are as follows: After changing MTU with ifconfig, I could see that the interface flag of eth0 is still PROMISC. However, when I checked value of RCTL register with ethtool, PROM bit of RTCL register is cleared. It seems to be cause that is the gfar_init_mac() function, it doesn't set the PROM bit after the interface MTU is changed. This problem was detected on linux-2.6.32.2, but it seems to same on linux-3.6.0-rc3. Is this behavior on purpose? I also attach the amended file,I think it would be so. Signed-off-by: Akifumi Chikazawa --- gianfar.c | 3 +++ 1 file changed, 3 insertions(+) ----------- Fujitsu Computer Technologies Limited Firmware Engineering Dept. Akifumi Chikazawa email: chikazawa.akifu@jp.fujitsu.com -- 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 diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c index 4605f72..6991e0e 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c @@ -389,6 +389,9 @@ static void gfar_init_mac(struct net_device *ndev) if (ndev->features & NETIF_F_HW_VLAN_RX) rctrl |= RCTRL_VLEX | RCTRL_PRSDEP_INIT; + if (ndev->flags & IFF_PROMISC) + rctrl |= RCTRL_PROM; + /* Init rctrl based on our settings */ gfar_write(®s->rctrl, rctrl);