X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_eal%2Flinuxapp%2Fkni%2Fethtool%2Figb%2Figb_ethtool.c;h=064528bcf86262bcb4274e3e679671483410048a;hb=681721958194f4ea48f95f67a479ef645e66e868;hp=f3c48b25b0c3c8036cc80d78629dffc63b913523;hpb=b9ee370557f1f9f79c7f4f7eb37d78c562200ad6;p=dpdk.git diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c index f3c48b25b0..064528bcf8 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c @@ -1,24 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0 /******************************************************************************* Intel(R) Gigabit Ethernet Linux driver Copyright(c) 2007-2013 Intel Corporation. - This program is free software; you can redistribute it and/or modify it - under the terms and conditions of the GNU General Public License, - version 2, as published by the Free Software Foundation. - - This program is distributed in the hope it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. - - You should have received a copy of the GNU General Public License along with - this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. - - The full GNU General Public License is included in this distribution in - the file called "COPYING". - Contact Information: e1000-devel Mailing List Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 @@ -208,7 +193,7 @@ static int igb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) ecmd->port = PORT_FIBRE; ecmd->transceiver = XCVR_EXTERNAL; - } + } if (hw->mac.autoneg != 1) ecmd->advertising &= ~(ADVERTISED_Pause | @@ -1126,7 +1111,7 @@ static int igb_eeprom_test(struct igb_adapter *adapter, u64 *data) static irqreturn_t igb_test_intr(int irq, void *data) { - struct igb_adapter *adapter = (struct igb_adapter *) data; + struct igb_adapter *adapter = data; struct e1000_hw *hw = &adapter->hw; adapter->test_icr |= E1000_READ_REG(hw, E1000_ICR); @@ -1377,7 +1362,7 @@ static int igb_integrated_phy_loopback(struct igb_adapter *adapter) } } else { /* enable MII loopback */ - if (hw->phy.type == e1000_phy_82580) + if (hw->phy.type == e1000_phy_82580) e1000_write_phy_reg(hw, I82577_PHY_LBK_CTRL, 0x8041); } @@ -1403,7 +1388,7 @@ static int igb_integrated_phy_loopback(struct igb_adapter *adapter) */ if (hw->phy.type == e1000_phy_m88) igb_phy_disable_receiver(adapter); - + mdelay(500); return 0; } @@ -1434,7 +1419,7 @@ static int igb_setup_loopback_test(struct igb_adapter *adapter) E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTL, reg); reg = E1000_READ_REG(hw, E1000_MPHY_DATA); - reg |= E1000_MPHY_PCS_CLK_REG_DIGINELBEN; + reg |= E1000_MPHY_PCS_CLK_REG_DIGINELBEN; E1000_WRITE_REG(hw, E1000_MPHY_DATA, reg); } @@ -1489,7 +1474,7 @@ static void igb_loopback_cleanup(struct igb_adapter *adapter) u16 phy_reg; if ((hw->device_id == E1000_DEV_ID_DH89XXCC_SGMII) || - (hw->device_id == E1000_DEV_ID_DH89XXCC_SERDES) || + (hw->device_id == E1000_DEV_ID_DH89XXCC_SERDES) || (hw->device_id == E1000_DEV_ID_DH89XXCC_BACKPLANE) || (hw->device_id == E1000_DEV_ID_DH89XXCC_SFP)) { u32 reg; @@ -1498,13 +1483,13 @@ static void igb_loopback_cleanup(struct igb_adapter *adapter) reg = E1000_READ_REG(hw, E1000_MPHY_ADDR_CTL); reg = (reg & E1000_MPHY_ADDR_CTL_OFFSET_MASK ) | E1000_MPHY_PCS_CLK_REG_OFFSET; - E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTL, reg); + E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTL, reg); reg = E1000_READ_REG(hw, E1000_MPHY_DATA); - reg &= ~E1000_MPHY_PCS_CLK_REG_DIGINELBEN; - E1000_WRITE_REG(hw, E1000_MPHY_DATA, reg); + reg &= ~E1000_MPHY_PCS_CLK_REG_DIGINELBEN; + E1000_WRITE_REG(hw, E1000_MPHY_DATA, reg); } - + rctl = E1000_READ_REG(hw, E1000_RCTL); rctl &= ~(E1000_RCTL_LBM_TCVR | E1000_RCTL_LBM_MAC); E1000_WRITE_REG(hw, E1000_RCTL, rctl); @@ -1776,7 +1761,7 @@ static void igb_diag_test(struct net_device *netdev, /* power up link for link test */ igb_power_up_link(adapter); - + /* Link test performed before hardware reset so autoneg doesn't * interfere with test result */ if (igb_link_test(adapter, &data[4])) @@ -1981,7 +1966,7 @@ static int igb_set_coalesce(struct net_device *netdev, if (ec->rx_coalesce_usecs == 0) { adapter->dmac = IGB_DMAC_DISABLE; } - + /* convert to rate of irq's per second */ if (ec->rx_coalesce_usecs && ec->rx_coalesce_usecs <= 3) adapter->rx_itr_setting = ec->rx_coalesce_usecs; @@ -2416,7 +2401,7 @@ static void igb_get_dmac(struct net_device *netdev, { struct igb_adapter *adapter = netdev_priv(netdev); edata->data = adapter->dmac; - + return; } #endif @@ -2855,5 +2840,3 @@ void igb_set_ethtool_ops(struct net_device *netdev) } #endif /* HAVE_RHEL6_ETHTOOL_OPS_EXT_STRUCT */ #endif /* SIOCETHTOOL */ - -