linux/drivers/net
Weiping Pan 98f41f694f bonding:update speed/duplex for NETDEV_CHANGE
Zheng Liang(lzheng@redhat.com) found a bug that if we config bonding with
arp monitor, sometimes bonding driver cannot get the speed and duplex from
its slaves, it will assume them to be 100Mb/sec and Full, please see
/proc/net/bonding/bond0.
But there is no such problem when uses miimon.

(Take igb for example)
I find that the reason is that after dev_open() in bond_enslave(),
bond_update_speed_duplex() will call igb_get_settings()
, but in that function,
it runs ethtool_cmd_speed_set(ecmd, -1); ecmd->duplex = -1;
because igb get an error value of status.
So even dev_open() is called, but the device is not really ready to get its
settings.

Maybe it is safe for us to call igb_get_settings() only after
this message shows up, that is "igb: p4p1 NIC Link is Up 1000 Mbps Full Duplex,
Flow Control: RX".

So I prefer to update the speed and duplex for a slave when reseices
NETDEV_CHANGE/NETDEV_UP event.

Changelog
V2:
1 remove the "fake 100/Full" logic in bond_update_speed_duplex(),
  set speed and duplex to -1 when it gets error value of speed and duplex.
2 delete the warning in bond_enslave() if bond_update_speed_duplex() returns
  error.
3 make bond_info_show_slave() handle bad values of speed and duplex.

Signed-off-by: Weiping Pan <wpan@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-01 17:52:49 -04:00
..
appletalk net: remove use of ndo_set_multicast_list in drivers 2011-08-17 20:22:03 -07:00
arcnet drivers/net: Kconfig & Makefile cleanup 2011-08-27 00:58:49 -07:00
bonding bonding:update speed/duplex for NETDEV_CHANGE 2011-11-01 17:52:49 -04:00
caif caif-hsi: Added recovery check of CA wake status. 2011-10-19 03:25:43 -04:00
can Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2011-10-25 13:25:22 +02:00
cris net: remove use of ndo_set_multicast_list in drivers 2011-08-17 20:22:03 -07:00
ethernet drivers/net/ethernet/i825xx/3c505.c: fix build with dynamic debug 2011-11-01 00:53:33 -04:00
fddi skfp: Fix SysKonnect FDDI driver compile issues 2011-08-27 00:58:23 -07:00
hamradio
hippi hippi: Move the HIPPI driver 2011-08-27 00:58:30 -07:00
irda Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2011-10-25 13:25:22 +02:00
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2011-10-25 13:25:22 +02:00
plip plip: Move the PLIP driver 2011-08-27 00:58:33 -07:00
ppp Merge branch 'master' of ra.kernel.org:/pub/scm/linux/kernel/git/davem/net 2011-10-24 18:18:09 -04:00
slip slip: Move the SLIP drivers 2011-08-27 00:58:36 -07:00
tokenring drivers/net: Kconfig & Makefile cleanup 2011-08-27 00:58:49 -07:00
usb Merge branch 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm 2011-10-25 15:18:39 +02:00
vmxnet3 net: add skb frag size accessors 2011-10-19 03:10:46 -04:00
wan wan: make LAPB callbacks const 2011-09-16 19:20:20 -04:00
wimax PM / Runtime: Add macro to test for runtime PM events 2011-08-19 23:49:48 +02:00
wireless wireless: at76c50x: follow rename pack_hex_byte to hex_byte_pack 2011-10-31 17:30:57 -07:00
xen-netback net: add skb frag size accessors 2011-10-19 03:10:46 -04:00
Kconfig Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2011-10-25 12:11:02 +02:00
LICENSE.SRC
Makefile net: Fix duplicate CONFIG_SLIP entry in driver/net/Makefile 2011-08-29 22:55:53 -04:00
Space.c
dummy.c net: remove use of ndo_set_multicast_list in drivers 2011-08-17 20:22:03 -07:00
eql.c
ifb.c
loopback.c
macvlan.c macvlan: handle fragmented multicast frames 2011-10-18 23:22:07 -04:00
macvtap.c macvtap: Fix the minor device number allocation 2011-10-21 02:53:07 -04:00
mdio.c
mii.c
netconsole.c netconsole: enable netconsole can make net_device refcnt incorrent 2011-10-18 23:55:29 -04:00
rionet.c rapidio: fix use of non-compatible registers 2011-08-25 16:25:34 -07:00
sb1000.c
sungem_phy.c net: Fix sungem_phy sharing. 2011-08-16 00:16:49 -07:00
tun.c net: remove use of ndo_set_multicast_list in drivers 2011-08-17 20:22:03 -07:00
veth.c
virtio_net.c Add ethtool -g support to virtio_net 2011-10-24 02:07:21 -04:00
xen-netfront.c net: add skb frag size accessors 2011-10-19 03:10:46 -04:00