ethtool: stop the line wrapping madness
Subsystems (72)
PATCH 1/1 ethtool: stop the line wrapping madness
Folks, we have a hard limit of 80 characters per line in the kernel, mostly due to Linus' insistence on printing out each release on greenbar with his Decwriter. So why do we have function and macro names that are over 30 characters long? Add a tab or two and a few parameters and boom! you're wrapping lines.
This patch is a search-n-replace of the newly-added ethtool link settings API with shorter names. In general, I replaced 'ksettings' with 'ks' and elided some unnecessary verbiage. In nearly every instance I unwrapped lines and made the code easier to read, especially on a VT102.
In the case of the Amazon Ethernet driver, I found a bug where they were setting bits in the 'settings' field twice. Almost certainly this was supposed to set bits in the 'advertising' field instead. So I fixed it.
--- drivers/infiniband/hw/nes/nes_nic.c | 12 +- drivers/net/ethernet/3com/3c509.c | 3 +- drivers/net/ethernet/3com/typhoon.c | 6 +- drivers/net/ethernet/alteon/acenic.c | 3 +- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 6 +- drivers/net/ethernet/amd/pcnet32.c | 5 +- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 6 +- drivers/net/ethernet/amd/xgbe/xgbe.h | 24 +- .../ethernet/apm/xgene/xgene_enet_ethtool.c | 16 +- .../net/ethernet/aquantia/atlantic/aq_nic.c | 53 +-- drivers/net/ethernet/atheros/alx/ethtool.c | 9 +- .../ethernet/atheros/atl1c/atl1c_ethtool.c | 6 +- .../ethernet/atheros/atl1e/atl1e_ethtool.c | 9 +- drivers/net/ethernet/atheros/atlx/atl1.c | 6 +- drivers/net/ethernet/atheros/atlx/atl2.c | 9 +- drivers/net/ethernet/broadcom/b44.c | 9 +- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 6 +- drivers/net/ethernet/broadcom/bnx2.c | 9 +- .../ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 24 +- .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 84 ++-- drivers/net/ethernet/broadcom/tg3.c | 14 +- .../net/ethernet/brocade/bna/bnad_ethtool.c | 6 +- drivers/net/ethernet/calxeda/xgmac.c | 4 +- .../ethernet/cavium/liquidio/lio_ethtool.c | 149 +++--- .../ethernet/cavium/thunder/nicvf_ethtool.c | 6 +- drivers/net/ethernet/chelsio/cxgb/cxgb2.c | 9 +- .../net/ethernet/chelsio/cxgb3/cxgb3_main.c | 13 +- .../ethernet/chelsio/cxgb4/cxgb4_ethtool.c | 25 +- .../ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 25 +- .../net/ethernet/cisco/enic/enic_ethtool.c | 10 +- drivers/net/ethernet/dec/tulip/de2104x.c | 9 +- drivers/net/ethernet/dec/tulip/uli526x.c | 6 +- drivers/net/ethernet/dlink/dl2k.c | 6 +- .../net/ethernet/emulex/benet/be_ethtool.c | 6 +- .../net/ethernet/hisilicon/hns/hns_ethtool.c | 12 +- .../ethernet/hisilicon/hns3/hns3_ethtool.c | 6 +- .../net/ethernet/huawei/hinic/hinic_main.c | 8 +- drivers/net/ethernet/ibm/ehea/ehea_ethtool.c | 6 +- drivers/net/ethernet/ibm/emac/core.c | 9 +- drivers/net/ethernet/ibm/ibmveth.c | 6 +- drivers/net/ethernet/ibm/ibmvnic.c | 6 +- .../net/ethernet/intel/e1000/e1000_ethtool.c | 9 +- drivers/net/ethernet/intel/e1000e/ethtool.c | 9 +- .../net/ethernet/intel/i40e/i40e_ethtool.c | 432 +++++++----------- .../ethernet/intel/i40evf/i40evf_ethtool.c | 2 +- drivers/net/ethernet/intel/ice/ice_ethtool.c | 42 +- drivers/net/ethernet/intel/igb/igb_ethtool.c | 9 +- drivers/net/ethernet/intel/igbvf/ethtool.c | 8 +- .../net/ethernet/intel/ixgb/ixgb_ethtool.c | 12 +- .../net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 15 +- drivers/net/ethernet/intel/ixgbevf/ethtool.c | 4 +- drivers/net/ethernet/marvell/mv643xx_eth.c | 24 +- drivers/net/ethernet/marvell/pxa168_eth.c | 3 +- drivers/net/ethernet/marvell/skge.c | 9 +- drivers/net/ethernet/marvell/sky2.c | 9 +- .../net/ethernet/mellanox/mlx4/en_ethtool.c | 49 +- .../ethernet/mellanox/mlx5/core/en_ethtool.c | 73 ++- .../mellanox/mlx5/core/ipoib/ethtool.c | 4 +- .../net/ethernet/mellanox/mlxsw/spectrum.c | 14 +- .../net/ethernet/mellanox/mlxsw/switchx2.c | 12 +- drivers/net/ethernet/micrel/ks8695net.c | 9 +- drivers/net/ethernet/micrel/ksz884x.c | 11 +- drivers/net/ethernet/microchip/enc28j60.c | 8 +- drivers/net/ethernet/microchip/encx24j600.c | 3 +- .../net/ethernet/myricom/myri10ge/myri10ge.c | 4 +- drivers/net/ethernet/natsemi/natsemi.c | 9 +- drivers/net/ethernet/natsemi/ns83820.c | 3 +- drivers/net/ethernet/neterion/s2io.c | 12 +- .../net/ethernet/neterion/vxge/vxge-ethtool.c | 12 +- .../ethernet/netronome/nfp/nfp_net_ethtool.c | 14 +- drivers/net/ethernet/nvidia/forcedeth.c | 9 +- .../oki-semi/pch_gbe/pch_gbe_ethtool.c | 15 +- .../qlogic/netxen/netxen_nic_ethtool.c | 6 +- .../net/ethernet/qlogic/qede/qede_ethtool.c | 6 +- drivers/net/ethernet/qlogic/qla3xxx.c | 6 +- .../ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 9 +- .../ethernet/qlogic/qlcnic/qlcnic_ethtool.c | 6 +- .../net/ethernet/qlogic/qlge/qlge_ethtool.c | 6 +- drivers/net/ethernet/qualcomm/qca_debug.c | 4 +- drivers/net/ethernet/realtek/r8169.c | 9 +- drivers/net/ethernet/rocker/rocker_main.c | 4 +- drivers/net/ethernet/sfc/ethtool.c | 6 +- drivers/net/ethernet/sfc/falcon/ethtool.c | 4 +- drivers/net/ethernet/sfc/falcon/mdio_10g.c | 9 +- drivers/net/ethernet/silan/sc92031.c | 9 +- drivers/net/ethernet/smsc/smc911x.c | 3 +- drivers/net/ethernet/smsc/smc91c92_cs.c | 3 +- drivers/net/ethernet/smsc/smc91x.c | 3 +- .../ethernet/stmicro/stmmac/stmmac_ethtool.c | 20 +- drivers/net/ethernet/sun/cassini.c | 6 +- drivers/net/ethernet/sun/niu.c | 9 +- drivers/net/ethernet/sun/sungem.c | 12 +- drivers/net/ethernet/sun/sunhme.c | 3 +- drivers/net/ethernet/tehuti/tehuti.c | 14 +- drivers/net/ethernet/ti/netcp_ethss.c | 6 +- drivers/net/ethernet/toshiba/ps3_gelic_net.c | 6 +- .../net/ethernet/toshiba/spider_net_ethtool.c | 12 +- drivers/net/ethernet/via/via-velocity.c | 6 +- drivers/net/fjes/fjes_ethtool.c | 4 +- drivers/net/hyperv/netvsc_drv.c | 2 +- drivers/net/mdio.c | 9 +- drivers/net/mii.c | 12 +- drivers/net/ntb_netdev.c | 8 +- drivers/net/phy/marvell10g.c | 2 +- drivers/net/phy/phy.c | 13 +- drivers/net/phy/phylink.c | 7 +- drivers/net/tun.c | 4 +- drivers/net/usb/catc.c | 12 +- drivers/net/usb/lan78xx.c | 6 +- drivers/net/usb/rtl8150.c | 3 +- drivers/net/virtio_net.c | 2 +- drivers/net/vmxnet3/vmxnet3_ethtool.c | 12 +- drivers/s390/net/qeth_core_main.c | 58 +-- include/linux/ethtool.h | 24 +- net/core/ethtool.c | 40 +- 115 files changed, 723 insertions(+), 1176 deletions(-)
drivers/infiniband/hw/nes/nes_nic.c +4 -8
@@ -1502,10 +1502,8 @@ static int nes_netdev_get_link_ksettings(struct net_device *netdev, cmd->base.autoneg =AUTONEG_DISABLE ; cmd->base.phy_address = phy_index; } -ethtool_convert_legacy_u32_to_link_mode ( - cmd->link_modes.supported, supported); -ethtool_convert_legacy_u32_to_link_mode ( - cmd->link_modes.advertising, advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; } if ((phy_type == NES_PHY_TYPE_ARGUS) ||
@@ -1522,10 +1520,8 @@ static int nes_netdev_get_link_ksettings(struct net_device *netdev, } cmd->base.speed =SPEED_10000 ; cmd->base.autoneg =AUTONEG_DISABLE ; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
drivers/net/ethernet/3com/3c509.c +1 -2
@@ -1078,8 +1078,7 @@ el3_netdev_get_ecmd(struct net_device *dev, struct ethtool_link_ksettings *cmd) cmd->base.duplex =DUPLEX_FULL ; } -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); cmd->base.speed =SPEED_10 ;EL3WINDOW (1 ); }
drivers/net/ethernet/3com/typhoon.c +2 -4
@@ -1048,10 +1048,8 @@ typhoon_get_link_ksettings(struct net_device *dev,else cmd->base.autoneg =AUTONEG_DISABLE ; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
drivers/net/ethernet/alteon/acenic.c +1 -2
@@ -2630,8 +2630,7 @@ static int ace_get_link_ksettings(struct net_device *dev, ecmd->rxcoal =readl (®s->TuneRxCoalTicks);#endif -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); +ethtool_u32_to_ks (cmd->link_modes.supported, supported);return 0 ; }
drivers/net/ethernet/amazon/ena/ena_ethtool.c +2 -4
@@ -282,10 +282,8 @@ static int ena_get_link_ksettings(struct net_device *netdev, link_ksettings->base.speed = link->speed;if (link->flags &ENA_ADMIN_GET_FEATURE_LINK_DESC_AUTONEG_MASK ) { -ethtool_link_ksettings_add_link_mode (link_ksettings, - supported, Autoneg); -ethtool_link_ksettings_add_link_mode (link_ksettings, - supported, Autoneg); +ethtool_ks_add_mode (link_ksettings, supported, Autoneg); +ethtool_ks_add_mode (link_ksettings, supported, Autoneg); } link_ksettings->base.autoneg =
drivers/net/ethernet/amd/pcnet32.c +2 -3
@@ -748,9 +748,8 @@ static int pcnet32_get_link_ksettings(struct net_device *dev, } cmd->base.duplex = lp->fdx ?DUPLEX_FULL :DUPLEX_HALF ; cmd->base.speed =SPEED_10 ; -ethtool_convert_legacy_u32_to_link_mode ( - cmd->link_modes.supported, -SUPPORTED_TP |SUPPORTED_AUI ); +ethtool_u32_to_ks (cmd->link_modes.supported, +SUPPORTED_TP |SUPPORTED_AUI ); }spin_unlock_irqrestore (&lp->lock, flags);return 0 ;
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c +2 -4
@@ -960,8 +960,7 @@ static int xgbe_phy_find_phy_device(struct xgbe_prv_data *pdata)xgbe_phy_external_phy_quirks (pdata); -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - lks->link_modes.advertising); +ethtool_ks_to_u32 (&advertising, lks->link_modes.advertising); phydev->advertising &= advertising;phy_start_aneg (phy_data->phydev);
@@ -1666,8 +1665,7 @@ static int xgbe_phy_an_config(struct xgbe_prv_data *pdata)if (!phy_data->phydev)return 0 ; -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - lks->link_modes.advertising); +ethtool_ks_to_u32 (&advertising, lks->link_modes.advertising); phy_data->phydev->autoneg = pdata->phy.autoneg; phy_data->phydev->advertising = phy_data->phydev->supported &
drivers/net/ethernet/amd/xgbe/xgbe.h +12 -12
@@ -300,40 +300,40 @@/* Link mode bit operations */ #define XGBE_ZERO_SUP (_ls) \ - ethtool_link_ksettings_zero_link_mode((_ls), supported) + ethtool_ks_clear((_ls), supported)#define XGBE_SET_SUP (_ls, _mode) \ - ethtool_link_ksettings_add_link_mode((_ls), supported, _mode) + ethtool_ks_add_mode((_ls), supported, _mode)#define XGBE_CLR_SUP (_ls, _mode) \ - ethtool_link_ksettings_del_link_mode((_ls), supported, _mode) + ethtool_ks_del_mode((_ls), supported, _mode)#define XGBE_IS_SUP (_ls, _mode) \ - ethtool_link_ksettings_test_link_mode((_ls), supported, _mode) + ethtool_ks_test((_ls), supported, _mode)#define XGBE_ZERO_ADV (_ls) \ - ethtool_link_ksettings_zero_link_mode((_ls), advertising) + ethtool_ks_clear((_ls), advertising)#define XGBE_SET_ADV (_ls, _mode) \ - ethtool_link_ksettings_add_link_mode((_ls), advertising, _mode) + ethtool_ks_add_mode((_ls), advertising, _mode)#define XGBE_CLR_ADV (_ls, _mode) \ - ethtool_link_ksettings_del_link_mode((_ls), advertising, _mode) + ethtool_ks_del_mode((_ls), advertising, _mode)#define XGBE_ADV (_ls, _mode) \ - ethtool_link_ksettings_test_link_mode((_ls), advertising, _mode) + ethtool_ks_test((_ls), advertising, _mode)#define XGBE_ZERO_LP_ADV (_ls) \ - ethtool_link_ksettings_zero_link_mode((_ls), lp_advertising) + ethtool_ks_clear((_ls), lp_advertising)#define XGBE_SET_LP_ADV (_ls, _mode) \ - ethtool_link_ksettings_add_link_mode((_ls), lp_advertising, _mode) + ethtool_ks_add_mode((_ls), lp_advertising, _mode)#define XGBE_CLR_LP_ADV (_ls, _mode) \ - ethtool_link_ksettings_del_link_mode((_ls), lp_advertising, _mode) + ethtool_ks_del_mode((_ls), lp_advertising, _mode)#define XGBE_LP_ADV (_ls, _mode) \ - ethtool_link_ksettings_test_link_mode((_ls), lp_advertising, _mode) + ethtool_ks_test((_ls), lp_advertising, _mode)#define XGBE_LM_COPY (_dst, _dname, _src, _sname) \ bitmap_copy((_dst)->link_modes._dname, \
drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c +4 -12
@@ -146,12 +146,8 @@ static int xgene_get_link_ksettings(struct net_device *ndev, supported = SUPPORTED_1000baseT_Full | SUPPORTED_Autoneg |SUPPORTED_MII ; -ethtool_convert_legacy_u32_to_link_mode ( - cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode ( - cmd->link_modes.advertising, - supported); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, supported); cmd->base.speed =SPEED_1000 ; cmd->base.duplex =DUPLEX_FULL ;
@@ -159,12 +155,8 @@ static int xgene_get_link_ksettings(struct net_device *ndev, cmd->base.autoneg =AUTONEG_ENABLE ; }else { supported = SUPPORTED_10000baseT_Full |SUPPORTED_FIBRE ; -ethtool_convert_legacy_u32_to_link_mode ( - cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode ( - cmd->link_modes.advertising, - supported); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, supported); cmd->base.speed =SPEED_10000 ; cmd->base.duplex =DUPLEX_FULL ;
drivers/net/ethernet/aquantia/atlantic/aq_nic.c +21 -32
98 lines not on this page · raw message
drivers/net/ethernet/atheros/alx/ethtool.c +3 -6
@@ -166,10 +166,8 @@ static int alx_get_link_ksettings(struct net_device *netdev, cmd->base.speed = hw->link_speed; cmd->base.duplex = hw->duplex; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
@@ -184,8 +182,7 @@ static int alx_set_link_ksettings(struct net_device *netdev,ASSERT_RTNL (); -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising); +ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising);if (cmd->base.autoneg ==AUTONEG_ENABLE ) {if (advertising & ~alx_get_supported_speeds (hw))
drivers/net/ethernet/atheros/atl1c/atl1c_ethtool.c +2 -4
@@ -62,10 +62,8 @@ static int atl1c_get_link_ksettings(struct net_device *netdev, cmd->base.autoneg =AUTONEG_ENABLE ; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
drivers/net/ethernet/atheros/atl1e/atl1e_ethtool.c +3 -6
@@ -63,10 +63,8 @@ static int atl1e_get_link_ksettings(struct net_device *netdev, cmd->base.autoneg =AUTONEG_ENABLE ; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
@@ -78,8 +76,7 @@ static int atl1e_set_link_ksettings(struct net_device *netdev,struct atl1e_hw *hw = &adapter->hw;u32 advertising; -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising); +ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising);while (test_and_set_bit (__AT_RESETTING, &adapter->flags))msleep (1 );
drivers/net/ethernet/atheros/atlx/atl1.c +2 -4
@@ -3262,10 +3262,8 @@ static int atl1_get_link_ksettings(struct net_device *netdev,else cmd->base.autoneg =AUTONEG_DISABLE ; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
drivers/net/ethernet/atheros/atlx/atl2.c +3 -6
@@ -1770,10 +1770,8 @@ static int atl2_get_link_ksettings(struct net_device *netdev, cmd->base.autoneg =AUTONEG_ENABLE ; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
@@ -1785,8 +1783,7 @@ static int atl2_set_link_ksettings(struct net_device *netdev,struct atl2_hw *hw = &adapter->hw;u32 advertising; -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising); +ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising);while (test_and_set_bit (__ATL2_RESETTING, &adapter->flags))msleep (1 );
drivers/net/ethernet/broadcom/b44.c +3 -6
@@ -1867,10 +1867,8 @@ static int b44_get_link_ksettings(struct net_device *dev,if (cmd->base.autoneg ==AUTONEG_ENABLE ) advertising |= ADVERTISED_Autoneg; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);if (!netif_running (dev)){ cmd->base.speed =0 ;
@@ -1903,8 +1901,7 @@ static int b44_set_link_ksettings(struct net_device *dev, speed = cmd->base.speed; -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising); +ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising);/* We do not support gigabit. */ if (cmd->base.autoneg ==AUTONEG_ENABLE ) {
drivers/net/ethernet/broadcom/bcm63xx_enet.c +2 -4
@@ -1465,10 +1465,8 @@ static int bcm_enet_get_link_ksettings(struct net_device *dev, ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full; advertising =0 ; -ethtool_convert_legacy_u32_to_link_mode ( - cmd->link_modes.supported, supported); -ethtool_convert_legacy_u32_to_link_mode ( - cmd->link_modes.advertising, advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising); cmd->base.port =PORT_MII ; }return 0 ;
drivers/net/ethernet/broadcom/bnx2.c +3 -6
@@ -6955,10 +6955,8 @@ bnx2_get_link_ksettings(struct net_device *dev, cmd->base.phy_address = bp->phy_addr; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
@@ -6992,8 +6990,7 @@ bnx2_set_link_ksettings(struct net_device *dev,if (cmd->base.autoneg ==AUTONEG_ENABLE ) { autoneg |=AUTONEG_SPEED ; -ethtool_convert_link_mode_to_legacy_u32 ( - &advertising, cmd->link_modes.advertising); +ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising);if (cmd->base.port ==PORT_TP ) { advertising &=ETHTOOL_ALL_COPPER_SPEED ;
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c +8 -16
@@ -222,10 +222,8 @@ static int bnx2x_get_vf_link_ksettings(struct net_device *dev,struct bnx2x *bp =netdev_priv (dev);u32 supported, advertising; -ethtool_convert_link_mode_to_legacy_u32 (&supported, - cmd->link_modes.supported); -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising); +ethtool_ks_to_u32 (&supported, cmd->link_modes.supported); +ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising);if (bp->state ==BNX2X_STATE_OPEN ) { if (test_bit(BNX2X_LINK_REPORT_FD,
@@ -264,8 +262,7 @@ static int bnx2x_get_link_ksettings(struct net_device *dev,u32 media_type;u32 supported, advertising, lp_advertising; -ethtool_convert_link_mode_to_legacy_u32 (&lp_advertising, - cmd->link_modes.lp_advertising); +ethtool_ks_to_u32 (&lp_advertising, cmd->link_modes.lp_advertising);/* Dual Media boards present all available port types */ supported = bp->port.supported[cfg_idx] |
@@ -344,12 +341,9 @@ static int bnx2x_get_link_ksettings(struct net_device *dev, lp_advertising |= ADVERTISED_20000baseKR2_Full; } -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.lp_advertising, - lp_advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising); +ethtool_u32_to_ks (cmd->link_modes.lp_advertising, lp_advertising);DP (BNX2X_MSG_ETHTOOL ,"ethtool_cmd: cmd %d\n" " supported 0x%x advertising 0x%x speed %u\n"
@@ -372,10 +366,8 @@ static int bnx2x_set_link_ksettings(struct net_device *dev,u32 supported;u8 duplex = cmd->base.duplex; -ethtool_convert_link_mode_to_legacy_u32 (&supported, - cmd->link_modes.supported); -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising); +ethtool_ks_to_u32 (&supported, cmd->link_modes.supported); +ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising);if (IS_MF_SD (bp))return 0 ;
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +29 -55
136 lines not on this page · raw message
drivers/net/ethernet/broadcom/tg3.c +5 -9
@@ -12141,8 +12141,7 @@ static int tg3_get_link_ksettings(struct net_device *dev, supported |=SUPPORTED_FIBRE ; cmd->base.port =PORT_FIBRE ; } -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); advertising = tp->link_config.advertising;if (tg3_flag (tp,PAUSE_AUTONEG )) {
@@ -12157,15 +12156,13 @@ static int tg3_get_link_ksettings(struct net_device *dev, advertising |= ADVERTISED_Asym_Pause; } } -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);if (netif_running (dev) && tp->link_up) { cmd->base.speed = tp->link_config.active_speed; cmd->base.duplex = tp->link_config.active_duplex; -ethtool_convert_legacy_u32_to_link_mode ( - cmd->link_modes.lp_advertising, - tp->link_config.rmt_adv); +ethtool_u32_to_ks (cmd->link_modes.lp_advertising, + tp->link_config.rmt_adv);if (!(tp->phy_flags &TG3_PHYFLG_ANY_SERDES )) {if (tp->phy_flags &TG3_PHYFLG_MDIX_STATE )
@@ -12207,8 +12204,7 @@ static int tg3_set_link_ksettings(struct net_device *dev, cmd->base.duplex != DUPLEX_HALF)return -EINVAL ; -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising); +ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising);if (cmd->base.autoneg ==AUTONEG_ENABLE ) { u32 mask = ADVERTISED_Autoneg |
drivers/net/ethernet/brocade/bna/bnad_ethtool.c +2 -4
@@ -261,10 +261,8 @@ bnad_get_link_ksettings(struct net_device *netdev, cmd->base.duplex =DUPLEX_UNKNOWN ; } -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
drivers/net/ethernet/calxeda/xgmac.c +2 -2
@@ -1535,8 +1535,8 @@ static int xgmac_ethtool_get_link_ksettings(struct net_device *dev, cmd->base.autoneg =0 ; cmd->base.duplex =DUPLEX_FULL ; cmd->base.speed =10000 ; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported,0 ); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising,0 ); +ethtool_u32_to_ks (cmd->link_modes.supported,0 ); +ethtool_u32_to_ks (cmd->link_modes.advertising,0 );return 0 ; }
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c +62 -87
190 lines not on this page · raw message
drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c +2 -4
@@ -174,10 +174,8 @@ static int nicvf_get_link_ksettings(struct net_device *netdev, cmd->base.duplex = nic->duplex; cmd->base.speed = nic->speed; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
drivers/net/ethernet/chelsio/cxgb/cxgb2.c +3 -6
@@ -590,10 +590,8 @@ static int get_link_ksettings(struct net_device *dev, cmd->base.phy_address = p->phy->mdio.prtad; cmd->base.autoneg = p->link_config.autoneg; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
@@ -641,8 +639,7 @@ static int set_link_ksettings(struct net_device *dev,struct link_config *lc = &p->link_config;u32 advertising; -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising); +ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising);if (!(lc->supported & SUPPORTED_Autoneg))return -EOPNOTSUPP ;/* can't change speed/duplex */
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c +5 -8
@@ -1807,10 +1807,9 @@ static int get_link_ksettings(struct net_device *dev,struct port_info *p =netdev_priv (dev);u32 supported; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - p->link_config.supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - p->link_config.advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, p->link_config.supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, + p->link_config.advertising);if (netif_carrier_ok (dev)) { cmd->base.speed = p->link_config.speed;
@@ -1820,8 +1819,7 @@ static int get_link_ksettings(struct net_device *dev, cmd->base.duplex =DUPLEX_UNKNOWN ; } -ethtool_convert_link_mode_to_legacy_u32 (&supported, - cmd->link_modes.supported); +ethtool_ks_to_u32 (&supported, cmd->link_modes.supported); cmd->base.port = (supported &SUPPORTED_TP ) ?PORT_TP :PORT_FIBRE ; cmd->base.phy_address = p->phy.mdio.prtad;
@@ -1871,8 +1869,7 @@ static int set_link_ksettings(struct net_device *dev,struct link_config *lc = &p->link_config;u32 advertising; -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising); +ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising);if (!(lc->supported & SUPPORTED_Autoneg)) {/*
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c +9 -16
@@ -728,9 +728,9 @@ static int get_link_ksettings(struct net_device *dev,if (!netif_running (dev)) (void )t4_update_port_info (pi); -ethtool_link_ksettings_zero_link_mode (link_ksettings, supported); -ethtool_link_ksettings_zero_link_mode (link_ksettings, advertising); -ethtool_link_ksettings_zero_link_mode (link_ksettings, lp_advertising); +ethtool_ks_clear (link_ksettings, supported); +ethtool_ks_clear (link_ksettings, advertising); +ethtool_ks_clear (link_ksettings, lp_advertising); base->port =from_fw_port_mod_type (pi->port_type, pi->mod_type);
@@ -761,27 +761,20 @@ static int get_link_ksettings(struct net_device *dev,if (pi->link_cfg.fc &PAUSE_RX ) {if (pi->link_cfg.fc &PAUSE_TX ) { -ethtool_link_ksettings_add_link_mode (link_ksettings, - advertising, - Pause); +ethtool_ks_add_mode (link_ksettings, advertising, Pause); }else { -ethtool_link_ksettings_add_link_mode (link_ksettings, - advertising, - Asym_Pause); +ethtool_ks_add_mode (link_ksettings, advertising, + Asym_Pause); } }else if (pi->link_cfg.fc &PAUSE_TX ) { -ethtool_link_ksettings_add_link_mode (link_ksettings, - advertising, - Asym_Pause); +ethtool_ks_add_mode (link_ksettings, advertising, Asym_Pause); } base->autoneg = pi->link_cfg.autoneg;if (pi->link_cfg.pcaps &FW_PORT_CAP32_ANEG ) -ethtool_link_ksettings_add_link_mode (link_ksettings, - supported, Autoneg); +ethtool_ks_add_mode (link_ksettings, supported, Autoneg);if (pi->link_cfg.autoneg) -ethtool_link_ksettings_add_link_mode (link_ksettings, - advertising, Autoneg); +ethtool_ks_add_mode (link_ksettings, advertising, Autoneg);return 0 ; }
drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c +9 -16
@@ -1388,9 +1388,9 @@ static int cxgb4vf_get_link_ksettings(struct net_device *dev,if (!netif_running (dev)) (void )t4vf_update_port_info (pi); -ethtool_link_ksettings_zero_link_mode (link_ksettings, supported); -ethtool_link_ksettings_zero_link_mode (link_ksettings, advertising); -ethtool_link_ksettings_zero_link_mode (link_ksettings, lp_advertising); +ethtool_ks_clear (link_ksettings, supported); +ethtool_ks_clear (link_ksettings, advertising); +ethtool_ks_clear (link_ksettings, lp_advertising); base->port =from_fw_port_mod_type (pi->port_type, pi->mod_type);
@@ -1421,27 +1421,20 @@ static int cxgb4vf_get_link_ksettings(struct net_device *dev,if (pi->link_cfg.fc &PAUSE_RX ) {if (pi->link_cfg.fc &PAUSE_TX ) { -ethtool_link_ksettings_add_link_mode (link_ksettings, - advertising, - Pause); +ethtool_ks_add_mode (link_ksettings, advertising, Pause); }else { -ethtool_link_ksettings_add_link_mode (link_ksettings, - advertising, - Asym_Pause); +ethtool_ks_add_mode (link_ksettings, advertising, + Asym_Pause); } }else if (pi->link_cfg.fc &PAUSE_TX ) { -ethtool_link_ksettings_add_link_mode (link_ksettings, - advertising, - Asym_Pause); +ethtool_ks_add_mode (link_ksettings, advertising, Asym_Pause); } base->autoneg = pi->link_cfg.autoneg;if (pi->link_cfg.pcaps &FW_PORT_CAP32_ANEG ) -ethtool_link_ksettings_add_link_mode (link_ksettings, - supported, Autoneg); +ethtool_ks_add_mode (link_ksettings, supported, Autoneg);if (pi->link_cfg.autoneg) -ethtool_link_ksettings_add_link_mode (link_ksettings, - advertising, Autoneg); +ethtool_ks_add_mode (link_ksettings, advertising, Autoneg);return 0 ; }
drivers/net/ethernet/cisco/enic/enic_ethtool.c +4 -6
@@ -110,12 +110,10 @@ static int enic_get_ksettings(struct net_device *netdev,struct enic *enic =netdev_priv (netdev);struct ethtool_link_settings *base = &ecmd->base; -ethtool_link_ksettings_add_link_mode (ecmd, supported, - 10000baseT_Full); -ethtool_link_ksettings_add_link_mode (ecmd, supported,FIBRE ); -ethtool_link_ksettings_add_link_mode (ecmd, advertising, - 10000baseT_Full); -ethtool_link_ksettings_add_link_mode (ecmd, advertising,FIBRE ); + ethtool_ks_add_mode(ecmd, supported, 10000baseT_Full); +ethtool_ks_add_mode (ecmd, supported,FIBRE ); + ethtool_ks_add_mode(ecmd, advertising, 10000baseT_Full); +ethtool_ks_add_mode (ecmd, advertising,FIBRE ); base->port =PORT_FIBRE ;if (netif_carrier_ok (netdev)) {
drivers/net/ethernet/dec/tulip/de2104x.c +3 -6
@@ -1486,11 +1486,9 @@ static void __de_get_regs(struct de_private *de, u8 *buf)static void __de_get_link_ksettings (struct de_private *de,struct ethtool_link_ksettings *cmd) { -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - de->media_supported); +ethtool_u32_to_ks (cmd->link_modes.supported, de->media_supported); cmd->base.phy_address =0 ; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - de->media_advertise); +ethtool_u32_to_ks (cmd->link_modes.advertising, de->media_advertise);switch (de->media_type) {case DE_MEDIA_AUI :
@@ -1529,8 +1527,7 @@ static int __de_set_link_ksettings(struct de_private *de,u8 autoneg = cmd->base.autoneg;u32 advertising; -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising); +ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising);if (cmd->base.speed !=10 )return -EINVAL ;
drivers/net/ethernet/dec/tulip/uli526x.c +2 -4
@@ -943,10 +943,8 @@ ULi_ethtool_get_link_ksettings(struct uli526x_board_info *db, ADVERTISED_Autoneg | ADVERTISED_MII); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising); cmd->base.port =PORT_MII ; cmd->base.phy_address = db->phy_addr;
drivers/net/ethernet/dlink/dl2k.c +2 -4
@@ -1288,10 +1288,8 @@ static int rio_get_link_ksettings(struct net_device *dev, cmd->base.phy_address = np->phy_addr; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
drivers/net/ethernet/emulex/benet/be_ethtool.c +2 -4
@@ -673,10 +673,8 @@ static int be_get_link_ksettings(struct net_device *netdev, DUPLEX_FULL :DUPLEX_UNKNOWN ; cmd->base.phy_address = adapter->port_num; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
drivers/net/ethernet/hisilicon/hns/hns_ethtool.c +4 -8
@@ -139,10 +139,8 @@ static int hns_nic_get_link_ksettings(struct net_device *net_dev,return -EINVAL ; } -ethtool_convert_link_mode_to_legacy_u32 (&supported, - cmd->link_modes.supported); -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising); +ethtool_ks_to_u32 (&supported, cmd->link_modes.supported); +ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising);/* When there is no phy, autoneg is off. */ cmd->base.autoneg = false;
@@ -185,10 +183,8 @@ static int hns_nic_get_link_ksettings(struct net_device *net_dev,if (!(AE_IS_VER1 (priv->enet_ver) && h->port_type ==HNAE_PORT_DEBUG )) supported |= SUPPORTED_Pause; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising); cmd->base.mdio_support =ETH_MDIO_SUPPORTS_C45 |ETH_MDIO_SUPPORTS_C22 ;hns_get_mdix_mode (net_dev, cmd);
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c +2 -4
@@ -605,12 +605,10 @@ static int hns3_get_link_ksettings(struct net_device *netdev, h->ae_algo->ops->get_flowctrl_adv (h, &flowctrl_adv);if (flowctrl_adv & ADVERTISED_Pause) -ethtool_link_ksettings_add_link_mode (cmd, advertising, - Pause); +ethtool_ks_add_mode (cmd, advertising, Pause);if (flowctrl_adv & ADVERTISED_Asym_Pause) -ethtool_link_ksettings_add_link_mode (cmd, advertising, - Asym_Pause); +ethtool_ks_add_mode (cmd, advertising, Asym_Pause);return 0 ; }
drivers/net/ethernet/huawei/hinic/hinic_main.c +3 -5
@@ -118,9 +118,8 @@ static int hinic_get_link_ksettings(struct net_device *netdev,struct hinic_port_cap port_cap;int err; -ethtool_link_ksettings_zero_link_mode (link_ksettings, advertising); -ethtool_link_ksettings_add_link_mode (link_ksettings, supported, - Autoneg); +ethtool_ks_clear (link_ksettings, advertising); +ethtool_ks_add_mode (link_ksettings, supported, Autoneg); link_ksettings->base.speed =SPEED_UNKNOWN ; link_ksettings->base.autoneg =AUTONEG_DISABLE ;
@@ -148,8 +147,7 @@ static int hinic_get_link_ksettings(struct net_device *netdev,set_link_speed (link_ksettings, port_cap.speed);if (!!(port_cap.autoneg_cap &HINIC_AUTONEG_SUPPORTED )) -ethtool_link_ksettings_add_link_mode (link_ksettings, - advertising, Autoneg); +ethtool_ks_add_mode (link_ksettings, advertising, Autoneg);if (port_cap.autoneg_state ==HINIC_AUTONEG_ACTIVE ) link_ksettings->base.autoneg =AUTONEG_ENABLE ;
drivers/net/ethernet/ibm/ehea/ehea_ethtool.c +2 -4
@@ -87,10 +87,8 @@ static int ehea_get_link_ksettings(struct net_device *dev, cmd->base.autoneg = port->autoneg ==1 ?AUTONEG_ENABLE :AUTONEG_DISABLE ; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
drivers/net/ethernet/ibm/emac/core.c +3 -6
@@ -2032,10 +2032,8 @@ static int emac_ethtool_get_link_ksettings(struct net_device *ndev, cmd->base.duplex = dev->phy.duplex;mutex_unlock (&dev->link_lock); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
@@ -2048,8 +2046,7 @@ emac_ethtool_set_link_ksettings(struct net_device *ndev,u32 f = dev->phy.features;u32 advertising; -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising); +ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising);DBG (dev,"set_settings(%d, %d, %d, 0x%08x)" NL , cmd->base.autoneg, cmd->base.speed, cmd->base.duplex, advertising);
drivers/net/ethernet/ibm/ibmveth.c +2 -4
@@ -740,10 +740,8 @@ static int netdev_get_link_ksettings(struct net_device *dev, cmd->base.phy_address =0 ; cmd->base.autoneg =AUTONEG_ENABLE ; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
drivers/net/ethernet/ibm/ibmvnic.c +2 -4
@@ -2205,10 +2205,8 @@ static int ibmvnic_get_link_ksettings(struct net_device *netdev, cmd->base.phy_address =0 ; cmd->base.autoneg =AUTONEG_ENABLE ; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
drivers/net/ethernet/intel/e1000/e1000_ethtool.c +3 -6
@@ -153,10 +153,8 @@ static int e1000_get_link_ksettings(struct net_device *netdev,else cmd->base.eth_tp_mdix_ctrl = hw->mdix; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
@@ -168,8 +166,7 @@ static int e1000_set_link_ksettings(struct net_device *netdev,struct e1000_hw *hw = &adapter->hw;u32 advertising; -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising); +ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising);/* MDI setting is only allowed when autoneg enabled because * some hardware doesn't allow MDI setting when speed or
drivers/net/ethernet/intel/e1000e/ethtool.c +3 -6
@@ -185,10 +185,8 @@ static int e1000_get_link_ksettings(struct net_device *netdev,if (hw->phy.media_type != e1000_media_type_copper) cmd->base.eth_tp_mdix_ctrl =ETH_TP_MDI_INVALID ; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
@@ -256,8 +254,7 @@ static int e1000_set_link_ksettings(struct net_device *netdev,int ret_val =0 ;u32 advertising; -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising); +ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising);pm_runtime_get_sync (netdev->dev.parent);
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +156 -276
644 lines not on this page · raw message
drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c +1 -1
@@ -76,7 +76,7 @@ static int i40evf_get_link_ksettings(struct net_device *netdev, {struct i40evf_adapter *adapter =netdev_priv (netdev); -ethtool_link_ksettings_zero_link_mode (cmd, supported); +ethtool_ks_clear (cmd, supported); cmd->base.autoneg =AUTONEG_DISABLE ; cmd->base.port =PORT_NONE ;/* Set speed and duplex */
drivers/net/ethernet/intel/ice/ice_ethtool.c +18 -24
79 lines not on this page · raw message
drivers/net/ethernet/intel/igb/igb_ethtool.c +3 -6
@@ -248,10 +248,8 @@ static int igb_get_link_ksettings(struct net_device *netdev,else cmd->base.eth_tp_mdix_ctrl = hw->phy.mdix; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
@@ -290,8 +288,7 @@ static int igb_set_link_ksettings(struct net_device *netdev,while (test_and_set_bit (__IGB_RESETTING, &adapter->state))usleep_range (1000 ,2000 ); -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising); +ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising);if (cmd->base.autoneg ==AUTONEG_ENABLE ) { hw->mac.autoneg =1 ;
drivers/net/ethernet/intel/igbvf/ethtool.c +4 -4
@@ -55,10 +55,10 @@ static int igbvf_get_link_ksettings(struct net_device *netdev,struct e1000_hw *hw = &adapter->hw;u32 status; -ethtool_link_ksettings_zero_link_mode (cmd, supported); - ethtool_link_ksettings_add_link_mode(cmd, supported, 1000baseT_Full); -ethtool_link_ksettings_zero_link_mode (cmd, advertising); - ethtool_link_ksettings_add_link_mode(cmd, advertising, 1000baseT_Full); +ethtool_ks_clear (cmd, supported); + ethtool_ks_add_mode(cmd, supported, 1000baseT_Full); +ethtool_ks_clear (cmd, advertising); + ethtool_ks_add_mode(cmd, advertising, 1000baseT_Full); cmd->base.port =-1 ;
drivers/net/ethernet/intel/ixgb/ixgb_ethtool.c +6 -6
@@ -74,13 +74,13 @@ ixgb_get_link_ksettings(struct net_device *netdev, {struct ixgb_adapter *adapter =netdev_priv (netdev); -ethtool_link_ksettings_zero_link_mode (cmd, supported); - ethtool_link_ksettings_add_link_mode(cmd, supported, 10000baseT_Full); -ethtool_link_ksettings_add_link_mode (cmd, supported,FIBRE ); +ethtool_ks_clear (cmd, supported); + ethtool_ks_add_mode(cmd, supported, 10000baseT_Full); +ethtool_ks_add_mode (cmd, supported,FIBRE ); -ethtool_link_ksettings_zero_link_mode (cmd, advertising); - ethtool_link_ksettings_add_link_mode(cmd, advertising, 10000baseT_Full); -ethtool_link_ksettings_add_link_mode (cmd, advertising,FIBRE ); +ethtool_ks_clear (cmd, advertising); + ethtool_ks_add_mode(cmd, advertising, 10000baseT_Full); +ethtool_ks_add_mode (cmd, advertising,FIBRE ); cmd->base.port =PORT_FIBRE ;
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +5 -10
@@ -178,8 +178,7 @@ static int ixgbe_get_link_ksettings(struct net_device *netdev,bool autoneg = false;u32 supported, advertising; -ethtool_convert_link_mode_to_legacy_u32 (&supported, - cmd->link_modes.supported); +ethtool_ks_to_u32 (&supported, cmd->link_modes.supported); hw->mac.ops.get_link_capabilities (hw, &supported_link, &autoneg);
@@ -356,10 +355,8 @@ static int ixgbe_get_link_ksettings(struct net_device *netdev, cmd->base.duplex =DUPLEX_UNKNOWN ; } -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
@@ -373,10 +370,8 @@ static int ixgbe_set_link_ksettings(struct net_device *netdev,s32 err =0 ;u32 supported, advertising; -ethtool_convert_link_mode_to_legacy_u32 (&supported, - cmd->link_modes.supported); -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising); +ethtool_ks_to_u32 (&supported, cmd->link_modes.supported); +ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising);if ((hw->phy.media_type == ixgbe_media_type_copper) || (hw->phy.multispeed_fiber)) {
drivers/net/ethernet/intel/ixgbevf/ethtool.c +2 -2
@@ -87,8 +87,8 @@ static int ixgbevf_get_link_ksettings(struct net_device *netdev,u32 link_speed =0 ;bool link_up; -ethtool_link_ksettings_zero_link_mode (cmd, supported); - ethtool_link_ksettings_add_link_mode(cmd, supported, 10000baseT_Full); +ethtool_ks_clear (cmd, supported); + ethtool_ks_add_mode(cmd, supported, 10000baseT_Full); cmd->base.autoneg =AUTONEG_DISABLE ; cmd->base.port =-1 ;
drivers/net/ethernet/marvell/mv643xx_eth.c +8 -16
@@ -1506,16 +1506,12 @@ mv643xx_eth_get_link_ksettings_phy(struct mv643xx_eth_private *mp,/* * The MAC does not support 1000baseT_Half. */ -ethtool_convert_link_mode_to_legacy_u32 (&supported, - cmd->link_modes.supported); -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising); +ethtool_ks_to_u32 (&supported, cmd->link_modes.supported); +ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising); supported &= ~SUPPORTED_1000baseT_Half; advertising &= ~ADVERTISED_1000baseT_Half; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
@@ -1551,10 +1547,8 @@ mv643xx_eth_get_link_ksettings_phyless(struct mv643xx_eth_private *mp, cmd->base.phy_address =0 ; cmd->base.autoneg =AUTONEG_DISABLE ; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
@@ -1611,11 +1605,9 @@ mv643xx_eth_set_link_ksettings(struct net_device *dev,/* * The MAC does not support 1000baseT_Half. */ -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - c.link_modes.advertising); +ethtool_ks_to_u32 (&advertising, c.link_modes.advertising); advertising &= ~ADVERTISED_1000baseT_Half; -ethtool_convert_legacy_u32_to_link_mode (c.link_modes.advertising, - advertising); +ethtool_u32_to_ks (c.link_modes.advertising, advertising); ret =phy_ethtool_ksettings_set (dev->phydev, &c);if (!ret)
drivers/net/ethernet/marvell/pxa168_eth.c +1 -2
@@ -988,8 +988,7 @@ static int pxa168_init_phy(struct net_device *dev) cmd.base.phy_address = pep->phy_addr; cmd.base.speed = pep->phy_speed; cmd.base.duplex = pep->phy_duplex; -ethtool_convert_legacy_u32_to_link_mode (cmd.link_modes.advertising, -PHY_BASIC_FEATURES ); +ethtool_u32_to_ks (cmd.link_modes.advertising,PHY_BASIC_FEATURES ); cmd.base.autoneg =AUTONEG_ENABLE ;if (cmd.base.speed !=0 )
drivers/net/ethernet/marvell/skge.c +3 -6
@@ -320,10 +320,8 @@ static int skge_get_link_ksettings(struct net_device *dev, cmd->base.speed = skge->speed; cmd->base.duplex = skge->duplex; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
@@ -337,8 +335,7 @@ static int skge_set_link_ksettings(struct net_device *dev,int err =0 ;u32 advertising; -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising); +ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising);if (cmd->base.autoneg ==AUTONEG_ENABLE ) { advertising = supported;
drivers/net/ethernet/marvell/sky2.c +3 -6
@@ -3613,10 +3613,8 @@ static int sky2_get_link_ksettings(struct net_device *dev, ? AUTONEG_ENABLE : AUTONEG_DISABLE; cmd->base.duplex = sky2->duplex; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
@@ -3629,8 +3627,7 @@ static int sky2_set_link_ksettings(struct net_device *dev,u32 supported =sky2_supported_modes (hw);u32 new_advertising; -ethtool_convert_link_mode_to_legacy_u32 (&new_advertising, - cmd->link_modes.advertising); +ethtool_ks_to_u32 (&new_advertising, cmd->link_modes.advertising);if (cmd->base.autoneg ==AUTONEG_ENABLE ) {if (new_advertising & ~supported)
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +18 -31
91 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +26 -47
130 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c +2 -2
@@ -217,8 +217,8 @@ static int mlx5i_get_link_ksettings(struct net_device *netdev,if (ret)return ret; -ethtool_link_ksettings_zero_link_mode (link_ksettings, supported); -ethtool_link_ksettings_zero_link_mode (link_ksettings, advertising); +ethtool_ks_clear (link_ksettings, supported); +ethtool_ks_clear (link_ksettings, advertising); speed =mlx5i_get_speed_settings (ib_link_width_oper, ib_proto_oper);if (speed <0 )
drivers/net/ethernet/mellanox/mlxsw/spectrum.c +7 -7
@@ -2243,14 +2243,14 @@ mlxsw_sp_from_ptys_supported_port(u32 ptys_eth_proto, MLXSW_REG_PTYS_ETH_SPEED_40GBASE_SR4 | MLXSW_REG_PTYS_ETH_SPEED_100GBASE_SR4 | MLXSW_REG_PTYS_ETH_SPEED_SGMII)) -ethtool_link_ksettings_add_link_mode (cmd, supported,FIBRE ); +ethtool_ks_add_mode (cmd, supported,FIBRE );if (ptys_eth_proto & (MLXSW_REG_PTYS_ETH_SPEED_10GBASE_KR |MLXSW_REG_PTYS_ETH_SPEED_10GBASE_KX4 |MLXSW_REG_PTYS_ETH_SPEED_40GBASE_KR4 |MLXSW_REG_PTYS_ETH_SPEED_100GBASE_KR4 |MLXSW_REG_PTYS_ETH_SPEED_1000BASE_KX )) -ethtool_link_ksettings_add_link_mode (cmd, supported, Backplane); +ethtool_ks_add_mode (cmd, supported, Backplane); }static void mlxsw_sp_from_ptys_link (u32 ptys_eth_proto,unsigned long *mode)
@@ -2349,9 +2349,9 @@ static u32 mlxsw_sp_to_ptys_upper_speed(u32 upper_speed)static void mlxsw_sp_port_get_link_supported (u32 eth_proto_cap,struct ethtool_link_ksettings *cmd) { -ethtool_link_ksettings_add_link_mode (cmd, supported, Asym_Pause); -ethtool_link_ksettings_add_link_mode (cmd, supported, Autoneg); -ethtool_link_ksettings_add_link_mode (cmd, supported, Pause); +ethtool_ks_add_mode (cmd, supported, Asym_Pause); +ethtool_ks_add_mode (cmd, supported, Autoneg); +ethtool_ks_add_mode (cmd, supported, Pause);mlxsw_sp_from_ptys_supported_port (eth_proto_cap, cmd);mlxsw_sp_from_ptys_link (eth_proto_cap, cmd->link_modes.supported);
@@ -2363,7 +2363,7 @@ static void mlxsw_sp_port_get_link_advertise(u32 eth_proto_admin, bool autoneg,if (!autoneg)return ; -ethtool_link_ksettings_add_link_mode (cmd, advertising, Autoneg); +ethtool_ks_add_mode (cmd, advertising, Autoneg);mlxsw_sp_from_ptys_link (eth_proto_admin, cmd->link_modes.advertising); }
@@ -2374,7 +2374,7 @@ mlxsw_sp_port_get_link_lp_advertise(u32 eth_proto_lp, u8 autoneg_status,if (autoneg_status !=MLXSW_REG_PTYS_AN_STATUS_OK || !eth_proto_lp)return ; -ethtool_link_ksettings_add_link_mode (cmd, lp_advertising, Autoneg); +ethtool_ks_add_mode (cmd, lp_advertising, Autoneg);mlxsw_sp_from_ptys_link (eth_proto_lp, cmd->link_modes.lp_advertising); }
drivers/net/ethernet/mellanox/mlxsw/switchx2.c +4 -8
@@ -809,12 +809,9 @@ mlxsw_sx_port_get_link_ksettings(struct net_device *dev, cmd->base.port =mlxsw_sx_port_connector_port (eth_proto_oper); lp_advertising =mlxsw_sx_from_ptys_advert_link (eth_proto_oper); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.lp_advertising, - lp_advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising); +ethtool_u32_to_ks (cmd->link_modes.lp_advertising, lp_advertising);return 0 ; }
@@ -872,8 +869,7 @@ mlxsw_sx_port_set_link_ksettings(struct net_device *dev, speed = cmd->base.speed; -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising); +ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising); eth_proto_new = cmd->base.autoneg ==AUTONEG_ENABLE ? mlxsw_sx_to_ptys_advert_link(advertising) :
drivers/net/ethernet/micrel/ks8695net.c +3 -6
@@ -905,10 +905,8 @@ ks8695_wan_get_link_ksettings(struct net_device *ndev, DUPLEX_FULL :DUPLEX_HALF ; } -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
@@ -926,8 +924,7 @@ ks8695_wan_set_link_ksettings(struct net_device *ndev,u32 ctrl;u32 advertising; -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising); +ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising);if ((cmd->base.speed !=SPEED_10 ) && (cmd->base.speed !=SPEED_100 ))return -EINVAL ;
drivers/net/ethernet/micrel/ksz884x.c +4 -7
@@ -5959,12 +5959,11 @@ static int netdev_get_link_ksettings(struct net_device *dev,mutex_lock (&hw_priv->lock);mii_ethtool_get_link_ksettings (&priv->mii_if, cmd); -ethtool_link_ksettings_add_link_mode (cmd, advertising,TP ); +ethtool_ks_add_mode (cmd, advertising,TP );mutex_unlock (&hw_priv->lock);/* Save advertised settings for workaround in next function. */ -ethtool_convert_link_mode_to_legacy_u32 (&priv->advertising, - cmd->link_modes.advertising); +ethtool_ks_to_u32 (&priv->advertising, cmd->link_modes.advertising);return 0 ; }
@@ -5989,8 +5988,7 @@ static int netdev_set_link_ksettings(struct net_device *dev,u32 advertising;int rc; -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising); +ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising);/* * ethtool utility does not change advertised setting if auto
@@ -6032,8 +6030,7 @@ static int netdev_set_link_ksettings(struct net_device *dev, }memcpy (©_cmd, cmd,sizeof (copy_cmd)); -ethtool_convert_legacy_u32_to_link_mode (copy_cmd.link_modes.advertising, - advertising); +ethtool_u32_to_ks (copy_cmd.link_modes.advertising, advertising); rc =mii_ethtool_set_link_ksettings ( &priv->mii_if, (const struct ethtool_link_ksettings *)©_cmd);
drivers/net/ethernet/microchip/enc28j60.c +4 -4
@@ -1492,10 +1492,10 @@ enc28j60_get_link_ksettings(struct net_device *dev, {struct enc28j60_net *priv =netdev_priv (dev); -ethtool_link_ksettings_zero_link_mode (cmd, supported); - ethtool_link_ksettings_add_link_mode(cmd, supported, 10baseT_Half); - ethtool_link_ksettings_add_link_mode(cmd, supported, 10baseT_Full); -ethtool_link_ksettings_add_link_mode (cmd, supported,TP ); +ethtool_ks_clear (cmd, supported); + ethtool_ks_add_mode(cmd, supported, 10baseT_Half); + ethtool_ks_add_mode(cmd, supported, 10baseT_Full); +ethtool_ks_add_mode (cmd, supported,TP ); cmd->base.speed =SPEED_10 ; cmd->base.duplex = priv->full_duplex ?DUPLEX_FULL :DUPLEX_HALF ;
drivers/net/ethernet/microchip/encx24j600.c +1 -2
@@ -950,8 +950,7 @@ static int encx24j600_get_link_ksettings(struct net_device *dev, SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full | SUPPORTED_Autoneg |SUPPORTED_TP ; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); cmd->base.speed = priv->speed; cmd->base.duplex = priv->full_duplex ?DUPLEX_FULL :DUPLEX_HALF ;
drivers/net/ethernet/myricom/myri10ge/myri10ge.c +2 -2
@@ -1645,8 +1645,8 @@ myri10ge_get_link_ksettings(struct net_device *netdev,if (*ptr =='R' || *ptr =='Q' || *ptr =='S' ) {/* We've found either an XFP, quad ribbon fiber, or SFP+ */ cmd->base.port =PORT_FIBRE ; -ethtool_link_ksettings_add_link_mode (cmd, supported,FIBRE ); -ethtool_link_ksettings_add_link_mode (cmd, advertising,FIBRE ); +ethtool_ks_add_mode (cmd, supported,FIBRE ); +ethtool_ks_add_mode (cmd, advertising,FIBRE ); }else { cmd->base.port =PORT_OTHER ; }
drivers/net/ethernet/natsemi/natsemi.c +3 -6
@@ -2905,10 +2905,8 @@ static int netdev_get_ecmd(struct net_device *dev,/* ignore maxtxpkt, maxrxpkt for now */ -ethtool_convert_legacy_u32_to_link_mode (ecmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (ecmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (ecmd->link_modes.supported, supported); +ethtool_u32_to_ks (ecmd->link_modes.advertising, advertising);return 0 ; }
@@ -2919,8 +2917,7 @@ static int netdev_set_ecmd(struct net_device *dev,struct netdev_private *np =netdev_priv (dev);u32 advertising; -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - ecmd->link_modes.advertising); +ethtool_ks_to_u32 (&advertising, ecmd->link_modes.advertising); if (ecmd->base.port != PORT_TP && ecmd->base.port != PORT_MII &&
drivers/net/ethernet/natsemi/ns83820.c +1 -2
@@ -1263,8 +1263,7 @@ static int ns83820_get_link_ksettings(struct net_device *ndev, cmd->base.port =PORT_MII ; } -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); cmd->base.duplex = fullduplex ?DUPLEX_FULL :DUPLEX_HALF ;switch (cfg /CFG_SPDSTS0 &3 ) {
drivers/net/ethernet/neterion/s2io.c +6 -6
@@ -5300,13 +5300,13 @@ s2io_ethtool_get_link_ksettings(struct net_device *dev, {struct s2io_nic *sp =netdev_priv (dev); -ethtool_link_ksettings_zero_link_mode (cmd, supported); - ethtool_link_ksettings_add_link_mode(cmd, supported, 10000baseT_Full); -ethtool_link_ksettings_add_link_mode (cmd, supported,FIBRE ); +ethtool_ks_clear (cmd, supported); + ethtool_ks_add_mode(cmd, supported, 10000baseT_Full); +ethtool_ks_add_mode (cmd, supported,FIBRE ); -ethtool_link_ksettings_zero_link_mode (cmd, advertising); - ethtool_link_ksettings_add_link_mode(cmd, advertising, 10000baseT_Full); -ethtool_link_ksettings_add_link_mode (cmd, advertising,FIBRE ); +ethtool_ks_clear (cmd, advertising); + ethtool_ks_add_mode(cmd, advertising, 10000baseT_Full); +ethtool_ks_add_mode (cmd, advertising,FIBRE ); cmd->base.port =PORT_FIBRE ;
drivers/net/ethernet/neterion/vxge/vxge-ethtool.c +6 -6
@@ -74,13 +74,13 @@ vxge_ethtool_set_link_ksettings(struct net_device *dev,static int vxge_ethtool_get_link_ksettings (struct net_device *dev,struct ethtool_link_ksettings *cmd) { -ethtool_link_ksettings_zero_link_mode (cmd, supported); - ethtool_link_ksettings_add_link_mode(cmd, supported, 10000baseT_Full); -ethtool_link_ksettings_add_link_mode (cmd, supported,FIBRE ); +ethtool_ks_clear (cmd, supported); + ethtool_ks_add_mode(cmd, supported, 10000baseT_Full); +ethtool_ks_add_mode (cmd, supported,FIBRE ); -ethtool_link_ksettings_zero_link_mode (cmd, advertising); - ethtool_link_ksettings_add_link_mode(cmd, advertising, 10000baseT_Full); -ethtool_link_ksettings_add_link_mode (cmd, advertising,FIBRE ); +ethtool_ks_clear (cmd, advertising); + ethtool_ks_add_mode(cmd, advertising, 10000baseT_Full); +ethtool_ks_add_mode (cmd, advertising,FIBRE ); cmd->base.port =PORT_FIBRE ;
drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c +7 -7
@@ -248,21 +248,21 @@ nfp_net_set_fec_link_mode(struct nfp_eth_table_port *eth_port, {unsigned int modes; -ethtool_link_ksettings_add_link_mode (c, supported,FEC_NONE ); +ethtool_ks_add_mode (c, supported,FEC_NONE );if (!nfp_eth_can_support_fec (eth_port)) { -ethtool_link_ksettings_add_link_mode (c, advertising,FEC_NONE ); +ethtool_ks_add_mode (c, advertising,FEC_NONE );return ; } modes =nfp_eth_supported_fec_modes (eth_port);if (modes &NFP_FEC_BASER ) { -ethtool_link_ksettings_add_link_mode (c, supported,FEC_BASER ); -ethtool_link_ksettings_add_link_mode (c, advertising,FEC_BASER ); +ethtool_ks_add_mode (c, supported,FEC_BASER ); +ethtool_ks_add_mode (c, advertising,FEC_BASER ); }if (modes &NFP_FEC_REED_SOLOMON ) { -ethtool_link_ksettings_add_link_mode (c, supported,FEC_RS ); -ethtool_link_ksettings_add_link_mode (c, advertising,FEC_RS ); +ethtool_ks_add_mode (c, supported,FEC_RS ); +ethtool_ks_add_mode (c, advertising,FEC_RS ); } }
@@ -293,7 +293,7 @@ nfp_net_get_link_ksettings(struct net_device *netdev,u32 sts, ls;/* Init to unknowns */ -ethtool_link_ksettings_add_link_mode (cmd, supported,FIBRE ); +ethtool_ks_add_mode (cmd, supported,FIBRE ); cmd->base.port =PORT_OTHER ; cmd->base.speed =SPEED_UNKNOWN ; cmd->base.duplex =DUPLEX_UNKNOWN ;
drivers/net/ethernet/nvidia/forcedeth.c +3 -6
@@ -4333,10 +4333,8 @@ static int nv_get_link_ksettings(struct net_device *dev, cmd->base.phy_address = np->phyaddr; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);/* ignore maxtxpkt, maxrxpkt for now */ spin_unlock_irq (&np->lock);
@@ -4350,8 +4348,7 @@ static int nv_set_link_ksettings(struct net_device *dev,u32 speed = cmd->base.speed;u32 advertising; -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising); +ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising);if (cmd->base.port !=PORT_MII )return -EINVAL ;
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c +5 -10
@@ -88,18 +88,14 @@ static int pch_gbe_get_link_ksettings(struct net_device *netdev,mii_ethtool_get_link_ksettings (&adapter->mii, ecmd); -ethtool_convert_link_mode_to_legacy_u32 (&supported, - ecmd->link_modes.supported); -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - ecmd->link_modes.advertising); +ethtool_ks_to_u32 (&supported, ecmd->link_modes.supported); +ethtool_ks_to_u32 (&advertising, ecmd->link_modes.advertising); supported &= ~(SUPPORTED_TP | SUPPORTED_1000baseT_Half); advertising &= ~(ADVERTISED_TP | ADVERTISED_1000baseT_Half); -ethtool_convert_legacy_u32_to_link_mode (ecmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (ecmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (ecmd->link_modes.supported, supported); +ethtool_u32_to_ks (ecmd->link_modes.advertising, advertising);if (!netif_carrier_ok (adapter->netdev)) ecmd->base.speed =SPEED_UNKNOWN ;
@@ -143,8 +139,7 @@ static int pch_gbe_set_link_ksettings(struct net_device *netdev, } hw->mac.link_speed = speed; hw->mac.link_duplex = copy_ecmd.base.duplex; -ethtool_convert_link_mode_to_legacy_u32 ( - &advertising, copy_ecmd.link_modes.advertising); +ethtool_ks_to_u32 (&advertising, copy_ecmd.link_modes.advertising); hw->phy.autoneg_advertised = advertising; hw->mac.autoneg = copy_ecmd.base.autoneg;
drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c +2 -4
@@ -250,10 +250,8 @@ netxen_nic_get_link_ksettings(struct net_device *dev, cmd->base.speed =SPEED_UNKNOWN ; } -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
drivers/net/ethernet/qlogic/qede/qede_ethtool.c +3 -3
@@ -448,13 +448,13 @@ static int qede_get_link_ksettings(struct net_device *dev,memset (¤t_link,0 ,sizeof (current_link)); edev->ops->common->get_link (edev->cdev, ¤t_link); -ethtool_link_ksettings_zero_link_mode (cmd, supported); +ethtool_ks_clear (cmd, supported); QEDE_DRV_TO_ETHTOOL_CAPS(current_link.supported_caps, cmd, supported) -ethtool_link_ksettings_zero_link_mode (cmd, advertising); +ethtool_ks_clear (cmd, advertising); QEDE_DRV_TO_ETHTOOL_CAPS(current_link.advertised_caps, cmd, advertising) -ethtool_link_ksettings_zero_link_mode (cmd, lp_advertising); +ethtool_ks_clear (cmd, lp_advertising); QEDE_DRV_TO_ETHTOOL_CAPS(current_link.lp_caps, cmd, lp_advertising)if ((edev->state ==QEDE_STATE_OPEN ) && (current_link.link_up)) {
drivers/net/ethernet/qlogic/qla3xxx.c +2 -4
@@ -1726,10 +1726,8 @@ static int ql_get_link_ksettings(struct net_device *ndev, cmd->base.speed =ql_get_speed (qdev); cmd->base.duplex =ql_get_full_dup (qdev); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c +3 -6
@@ -3323,8 +3323,7 @@ int qlcnic_83xx_get_link_ksettings(struct qlcnic_adapter *adapter, SUPPORTED_10000baseT_Full | SUPPORTED_Autoneg); -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - ecmd->link_modes.advertising); +ethtool_ks_to_u32 (&advertising, ecmd->link_modes.advertising);if (ecmd->base.autoneg ==AUTONEG_ENABLE ) {if (ahw->port_config &QLC_83XX_10_CAPABLE )
@@ -3381,10 +3380,8 @@ int qlcnic_83xx_get_link_ksettings(struct qlcnic_adapter *adapter, } ecmd->base.phy_address = ahw->physical_port; -ethtool_convert_legacy_u32_to_link_mode (ecmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (ecmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (ecmd->link_modes.supported, supported); +ethtool_u32_to_ks (ecmd->link_modes.advertising, advertising);return status; }
drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c +2 -4
@@ -424,10 +424,8 @@ static int qlcnic_82xx_get_link_ksettings(struct qlcnic_adapter *adapter, } } -ethtool_convert_legacy_u32_to_link_mode (ecmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (ecmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (ecmd->link_modes.supported, supported); +ethtool_u32_to_ks (ecmd->link_modes.advertising, advertising);return 0 ; }
drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c +2 -4
@@ -400,10 +400,8 @@ static int ql_get_link_ksettings(struct net_device *ndev, ecmd->base.speed =SPEED_10000 ; ecmd->base.duplex =DUPLEX_FULL ; -ethtool_convert_legacy_u32_to_link_mode (ecmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (ecmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (ecmd->link_modes.supported, supported); +ethtool_u32_to_ks (ecmd->link_modes.advertising, advertising);return 0 ; }
drivers/net/ethernet/qualcomm/qca_debug.c +2 -2
@@ -191,8 +191,8 @@ static int qcaspi_get_link_ksettings(struct net_device *dev, struct ethtool_link_ksettings *cmd) { -ethtool_link_ksettings_zero_link_mode (cmd, supported); - ethtool_link_ksettings_add_link_mode(cmd, supported, 10baseT_Half); +ethtool_ks_clear (cmd, supported); + ethtool_ks_add_mode(cmd, supported, 10baseT_Half); cmd->base.speed =SPEED_10 ; cmd->base.duplex =DUPLEX_HALF ;
drivers/net/ethernet/realtek/r8169.c +3 -6
@@ -1958,10 +1958,8 @@ static int rtl8169_get_link_ksettings_tbi(struct net_device *dev, cmd->base.speed =SPEED_1000 ; cmd->base.duplex =DUPLEX_FULL ;/* Always set */ -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
@@ -1996,8 +1994,7 @@ static int rtl8169_set_link_ksettings(struct net_device *dev,int rc;u32 advertising; -if (!ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising)) +if (!ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising))return -EINVAL ;del_timer_sync (&tp->timer);
drivers/net/ethernet/rocker/rocker_main.c +2 -2
@@ -1139,8 +1139,8 @@ rocker_cmd_get_port_settings_ethtool_proc(const struct rocker_port *rocker_port, duplex =rocker_tlv_get_u8 (info_attrs[ROCKER_TLV_CMD_PORT_SETTINGS_DUPLEX ]); autoneg =rocker_tlv_get_u8 (info_attrs[ROCKER_TLV_CMD_PORT_SETTINGS_AUTONEG ]); -ethtool_link_ksettings_zero_link_mode (ecmd, supported); -ethtool_link_ksettings_add_link_mode (ecmd, supported,TP ); +ethtool_ks_clear (ecmd, supported); +ethtool_ks_add_mode (ecmd, supported,TP ); ecmd->base.phy_address =0xff ; ecmd->base.port =PORT_TP ;
drivers/net/ethernet/sfc/ethtool.c +2 -4
@@ -138,13 +138,11 @@ efx_ethtool_get_link_ksettings(struct net_device *net_dev,mutex_unlock (&efx->mac_lock);/* Both MACs support pause frames (bidirectional and respond-only) */ -ethtool_convert_link_mode_to_legacy_u32 (&supported, - cmd->link_modes.supported); +ethtool_ks_to_u32 (&supported, cmd->link_modes.supported); supported |= SUPPORTED_Pause | SUPPORTED_Asym_Pause; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); +ethtool_u32_to_ks (cmd->link_modes.supported, supported);if (LOOPBACK_INTERNAL (efx)) { cmd->base.speed = link_state->speed;
drivers/net/ethernet/sfc/falcon/ethtool.c +2 -2
@@ -127,8 +127,8 @@ ef4_ethtool_get_link_ksettings(struct net_device *net_dev,mutex_unlock (&efx->mac_lock);/* Both MACs support pause frames (bidirectional and respond-only) */ -ethtool_link_ksettings_add_link_mode (cmd, supported, Pause); -ethtool_link_ksettings_add_link_mode (cmd, supported, Asym_Pause); +ethtool_ks_add_mode (cmd, supported, Pause); +ethtool_ks_add_mode (cmd, supported, Asym_Pause);if (LOOPBACK_INTERNAL (efx)) { cmd->base.speed = link_state->speed;
drivers/net/ethernet/sfc/falcon/mdio_10g.c +3 -6
@@ -241,12 +241,9 @@ int ef4_mdio_set_link_ksettings(struct ef4_nic *efx, efx->phy_op->get_link_ksettings (efx, &prev); -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising); -ethtool_convert_link_mode_to_legacy_u32 (&prev_advertising, - prev.link_modes.advertising); -ethtool_convert_link_mode_to_legacy_u32 (&prev_supported, - prev.link_modes.supported); +ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising); +ethtool_ks_to_u32 (&prev_advertising, prev.link_modes.advertising); +ethtool_ks_to_u32 (&prev_supported, prev.link_modes.supported); if (advertising == prev_advertising && cmd->base.speed == prev.base.speed &&
drivers/net/ethernet/silan/sc92031.c +3 -6
@@ -1178,10 +1178,8 @@ sc92031_ethtool_get_link_ksettings(struct net_device *dev, cmd->base.autoneg = (phy_ctrl & PhyCtrlAne) ?AUTONEG_ENABLE :AUTONEG_DISABLE ; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
@@ -1197,8 +1195,7 @@ sc92031_ethtool_set_link_ksettings(struct net_device *dev,u32 old_phy_ctrl;u32 advertising; -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising); +ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising);if (!(speed ==SPEED_10 || speed ==SPEED_100 ))return -EINVAL ;
drivers/net/ethernet/smsc/smc911x.c +1 -2
@@ -1477,8 +1477,7 @@ smc911x_ethtool_get_link_ksettings(struct net_device *dev, (status & (PHY_SPECIAL_SPD_10FULL_ |PHY_SPECIAL_SPD_100FULL_ )) ?DUPLEX_FULL :DUPLEX_HALF ; -ethtool_convert_legacy_u32_to_link_mode ( - cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); }
drivers/net/ethernet/smsc/smc91c92_cs.c +1 -2
@@ -1863,8 +1863,7 @@ static void smc_netdev_get_ecmd(struct net_device *dev, tmp =inw (ioaddr +TCR ); ecmd->base.duplex = (tmp &TCR_FDUPLX ) ?DUPLEX_FULL :DUPLEX_HALF ; -ethtool_convert_legacy_u32_to_link_mode (ecmd->link_modes.supported, - supported); +ethtool_u32_to_ks (ecmd->link_modes.supported, supported); } static int smc_netdev_set_ecmd(struct net_device *dev,
drivers/net/ethernet/smsc/smc91x.c +1 -2
@@ -1559,8 +1559,7 @@ smc_ethtool_get_link_ksettings(struct net_device *dev, cmd->base.duplex = lp->tcr_cur_mode &TCR_SWFDUP ?DUPLEX_FULL :DUPLEX_HALF ; -ethtool_convert_legacy_u32_to_link_mode ( - cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); }return 0 ;
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +8 -12
@@ -296,12 +296,10 @@ static int stmmac_ethtool_get_link_ksettings(struct net_device *dev,/* Encoding of PSE bits is defined in 802.3z, 37.2.1.4 */ -ethtool_convert_link_mode_to_legacy_u32 ( - &supported, cmd->link_modes.supported); -ethtool_convert_link_mode_to_legacy_u32 ( - &advertising, cmd->link_modes.advertising); -ethtool_convert_link_mode_to_legacy_u32 ( - &lp_advertising, cmd->link_modes.lp_advertising); +ethtool_ks_to_u32 (&supported, cmd->link_modes.supported); +ethtool_ks_to_u32 (&advertising, cmd->link_modes.advertising); +ethtool_ks_to_u32 (&lp_advertising, + cmd->link_modes.lp_advertising);if (adv.pause &STMMAC_PCS_PAUSE ) advertising |= ADVERTISED_Pause;
@@ -343,12 +341,10 @@ static int stmmac_ethtool_get_link_ksettings(struct net_device *dev, ADVERTISED_10baseT_Half); cmd->base.port =PORT_OTHER ; -ethtool_convert_legacy_u32_to_link_mode ( - cmd->link_modes.supported, supported); -ethtool_convert_legacy_u32_to_link_mode ( - cmd->link_modes.advertising, advertising); -ethtool_convert_legacy_u32_to_link_mode ( - cmd->link_modes.lp_advertising, lp_advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising); +ethtool_u32_to_ks (cmd->link_modes.lp_advertising, + lp_advertising);return 0 ; }
drivers/net/ethernet/sun/cassini.c +2 -4
@@ -4633,10 +4633,8 @@ static int cas_get_link_ksettings(struct net_device *dev, } } -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
drivers/net/ethernet/sun/niu.c +3 -6
@@ -6819,10 +6819,8 @@ static int niu_get_link_ksettings(struct net_device *dev,memset (cmd,0 ,sizeof (*cmd)); cmd->base.phy_address = np->phy_addr; -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - lp->supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - lp->active_advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, lp->supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, lp->active_advertising); cmd->base.autoneg = lp->active_autoneg; cmd->base.speed = lp->active_speed; cmd->base.duplex = lp->active_duplex;
@@ -6837,8 +6835,7 @@ static int niu_set_link_ksettings(struct net_device *dev,struct niu *np =netdev_priv (dev);struct niu_link_config *lp = &np->link_config; -ethtool_convert_link_mode_to_legacy_u32 (&lp->advertising, - cmd->link_modes.advertising); +ethtool_ks_to_u32 (&lp->advertising, cmd->link_modes.advertising); lp->speed = cmd->base.speed; lp->duplex = cmd->base.duplex; lp->autoneg = cmd->base.autoneg;
drivers/net/ethernet/sun/sungem.c +4 -8
@@ -1261,8 +1261,7 @@ static void gem_begin_auto_negotiation(struct gem *gp,u32 advertising;if (ep) -ethtool_convert_link_mode_to_legacy_u32 ( - &advertising, ep->link_modes.advertising); +ethtool_ks_to_u32 (&advertising, ep->link_modes.advertising);if (gp->phy_type != phy_mii_mdio0 && gp->phy_type != phy_mii_mdio1)
@@ -2579,10 +2578,8 @@ static int gem_get_link_ksettings(struct net_device *dev, } } -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.supported, - supported); -ethtool_convert_legacy_u32_to_link_mode (cmd->link_modes.advertising, - advertising); +ethtool_u32_to_ks (cmd->link_modes.supported, supported); +ethtool_u32_to_ks (cmd->link_modes.advertising, advertising);return 0 ; }
@@ -2594,8 +2591,7 @@ static int gem_set_link_ksettings(struct net_device *dev,u32 speed = cmd->base.speed;u32 advertising; -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising);
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/toshiba/ps3_gelic_net.c +2 -4
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/toshiba/spider_net_ethtool.c +6 -6
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/via/via-velocity.c +2 -4
Lines of this file are not shown. View the raw message.
drivers/s390/net/qeth_core_main.c +29 -29
58 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.0
Part of the diff is not shown here. View the raw message.
PATCH 1/1 ethtool: stop the line wrapping madness
Dear Mitch,
Quoted 10 lines · Mitch Williams
Folks, we have a hard limit of 80 characters per line in the kernel, mostly due to Linus' insistence on printing out each release on greenbar with his Decwriter. So why do we have function and macro names that are over 30 characters long? Add a tab or two and a few parameters and boom! you're wrapping lines.
This patch is a search-n-replace of the newly-added ethtool link settings API with shorter names. In general, I replaced 'ksettings' with 'ks' and elided some unnecessary verbiage. In nearly every instance I unwrapped lines and made the code easier to read, especially on a VT102.
Nice, let?s see what the others think.
Quoted 4 lines
In the case of the Amazon Ethernet driver, I found a bug where they were setting bits in the 'settings' field twice. Almost certainly this was supposed to set bits in the 'advertising' field instead. So I fixed it.
Please split this out into a separate patch.
[?]
Kind regards,
Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5174 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20180515/5b84eeb6/attachment.p7s>
PATCH 1/1 ethtool: stop the line wrapping madness
Quoted 21 lines · Paul Menzel
Quoted 1 line · Mitch Williams
Folks, we have a hard limit of 80 characters per line in the
kernel,
Quoted 1 line
mostly due to Linus' insistence on printing out each release on
greenbar
Quoted 1 line
with his Decwriter. So why do we have function and macro names that
are
Quoted 1 line
over 30 characters long? Add a tab or two and a few parameters and
boom!
Quoted 4 lines
you're wrapping lines.
This patch is a search-n-replace of the newly-added ethtool link settings API with shorter names. In general, I replaced 'ksettings'
with
Quoted 1 line
'ks' and elided some unnecessary verbiage. In nearly every instance
I
Quoted 1 line
unwrapped lines and made the code easier to read, especially on a
VT102.
Nice, let?s see what the others think.
Quoted 8 lines
Quoted 1 line
In the case of the Amazon Ethernet driver, I found a bug where they
were
Quoted 2 lines
setting bits in the 'settings' field twice. Almost certainly this was supposed to set bits in the 'advertising' field instead. So I
fixed
Quoted 1 line
it.
Please split this out into a separate patch.
Actually, I dusted the cobwebs off Mitch's original patch and in this
version of the patch, the Amazon driver was not fixed. So I need to
fix up the patch description to remove the reference to the fix and I
will put together a patch to fix the Amazon driver.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20180515/7da98fd3/attachment.asc>