ethtool: Call ethtool's get/set_settings callbacks with cleaned data
This makes sure that when a driver calls the ethtool's get/set_settings() callback of another driver, the data passed to it is clean. This guarantees that speed_hi will be zeroed correctly if the called callback doesn't explicitely set it: we are sure we don't get a corrupted speed from the underlying driver. We also take care of setting the cmd field appropriately (ETHTOOL_GSET/SSET). This applies to dev_ethtool_get_settings(), which now makes sure it sets up that ethtool command parameter correctly before passing it to drivers. This also means that whoever calls dev_ethtool_get_settings() does not have to clean the ethtool command parameter. This function also becomes an exported symbol instead of an inline. All drivers visible to make allyesconfig under x86_64 have been updated. Signed-off-by:David Decotigny <decot@google.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- arch/mips/txx9/generic/setup_tx4939.c 8 additions, 13 deletionsarch/mips/txx9/generic/setup_tx4939.c
- drivers/net/e100.c 1 addition, 1 deletiondrivers/net/e100.c
- drivers/net/mdio.c 3 additions, 0 deletionsdrivers/net/mdio.c
- drivers/net/mii.c 3 additions, 0 deletionsdrivers/net/mii.c
- drivers/net/pch_gbe/pch_gbe_main.c 3 additions, 3 deletionsdrivers/net/pch_gbe/pch_gbe_main.c
- drivers/net/pch_gbe/pch_gbe_phy.c 1 addition, 1 deletiondrivers/net/pch_gbe/pch_gbe_phy.c
- drivers/net/pcnet32.c 8 additions, 8 deletionsdrivers/net/pcnet32.c
- drivers/net/sfc/mdio_10g.c 2 additions, 2 deletionsdrivers/net/sfc/mdio_10g.c
- drivers/net/stmmac/stmmac_ethtool.c 2 additions, 3 deletionsdrivers/net/stmmac/stmmac_ethtool.c
- drivers/net/usb/asix.c 15 additions, 13 deletionsdrivers/net/usb/asix.c
- drivers/net/usb/dm9601.c 3 additions, 3 deletionsdrivers/net/usb/dm9601.c
- drivers/net/usb/smsc75xx.c 4 additions, 3 deletionsdrivers/net/usb/smsc75xx.c
- drivers/net/usb/smsc95xx.c 4 additions, 3 deletionsdrivers/net/usb/smsc95xx.c
- drivers/scsi/bnx2fc/bnx2fc_fcoe.c 7 additions, 4 deletionsdrivers/scsi/bnx2fc/bnx2fc_fcoe.c
- drivers/scsi/fcoe/fcoe.c 7 additions, 4 deletionsdrivers/scsi/fcoe/fcoe.c
- include/linux/ethtool.h 3 additions, 1 deletioninclude/linux/ethtool.h
- include/linux/netdevice.h 2 additions, 7 deletionsinclude/linux/netdevice.h
- include/rdma/ib_addr.h 7 additions, 6 deletionsinclude/rdma/ib_addr.h
- net/core/dev.c 24 additions, 0 deletionsnet/core/dev.c
- net/core/net-sysfs.c 10 additions, 14 deletionsnet/core/net-sysfs.c
Loading
Please register or sign in to comment