All of lore.kernel.org
 help / color / mirror / Atom feed
* when the MTU interface is modified, the promiscuous mode is reset in gianfar driver
@ 2012-08-27  8:38 近沢 哲史
  2012-09-03 19:53 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: 近沢 哲史 @ 2012-08-27  8:38 UTC (permalink / raw)
  To: netdev; +Cc: linux-kernel

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 <chikazawa.akifu@jp.fujitsu.com>
---
 gianfar.c |    3 +++
 1 file changed, 3 insertions(+)

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(&regs->rctrl, rctrl);

-----------
Fujitsu Computer Technologies Limited
Firmware Engineering Dept.

Akifumi Chikazawa
email: chikazawa.akifu@jp.fujitsu.com




^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-09-05 17:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-27  8:38 when the MTU interface is modified, the promiscuous mode is reset in gianfar driver 近沢 哲史
2012-09-03 19:53 ` David Miller
2012-09-05 13:46   ` Claudiu Manoil
2012-09-05 17:09     ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.