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
arcnet
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
ethernet drivers/net/ethernet/i825xx/3c505.c: fix build with dynamic debug 2011-11-01 00:53:33 -04:00
fddi
hamradio
hippi
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
ppp Merge branch 'master' of ra.kernel.org:/pub/scm/linux/kernel/git/davem/net 2011-10-24 18:18:09 -04:00
slip
tokenring
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
wimax
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
Space.c
dummy.c
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
sb1000.c
sungem_phy.c
tun.c
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