atl11:set MAX_TX_OFFLOAD_THRESH to 6k from 9k and fix spelling error
Subsystems (2)
PATCH 1/1 atl11:set MAX_TX_OFFLOAD_THRESH to 6k from 9k and fix spelling error
1. Set MAX_TX_OFFLOAD_THRESH to 6k from 9k, when mtu large then MAX_TX_OFFLOAD_THRESH just disable NETIF_F_TSO6, NETIF_F_TSO, NETIF_F_HW_CSUM.
2. Fix spelling error, change REG_TWSI_CTRL to REG_TXQ_CTRL.
Signed-off-by jie yang <jie.yang>@atheros.com
---
drivers/net/atl1c/atl1c.h +1 -1
@@ -74,7 +74,7 @@#define AT_RX_BUF_SIZE (ETH_FRAME_LEN + VLAN_HLEN + ETH_FCS_LEN)#define MAX_JUMBO_FRAME_SIZE (9*1024) -#define MAX_TX_OFFLOAD_THRESH (9*1024) +#define MAX_TX_OFFLOAD_THRESH (6*1024)#define AT_MAX_RECEIVE_QUEUE 4#define AT_DEF_RECEIVE_QUEUE 1
drivers/net/atl1c/atl1c_main.c +10 -5
@@ -474,15 +474,19 @@ static int atl1c_change_mtu(struct net_device *netdev, int new_mtu) netdev->mtu = new_mtu; adapter->hw.max_frame_size = new_mtu;atl1c_set_rxbufsize (adapter, netdev); +if (max_frame >=MAX_TX_OFFLOAD_THRESH ) + netdev->features &= ~(NETIF_F_TSO6 |NETIF_F_TSO |NETIF_F_HW_CSUM ); +else + netdev->features |= (NETIF_F_TSO6 |NETIF_F_TSO |NETIF_F_HW_CSUM );atl1c_down (adapter);atl1c_up (adapter);clear_bit (__AT_RESETTING, &adapter->flags);if (adapter->hw.ctrl_flags &ATL1C_FPGA_VERSION ) {u32 phy_data; -AT_READ_REG (&adapter->hw,0x1414 , &phy_data); - phy_data |=0x10000000 ; -AT_WRITE_REG (&adapter->hw,0x1414 , phy_data); +AT_READ_REG (&adapter->hw,REG_MDIO_CTRL , &phy_data); + phy_data |=MDIO_AP_EN ; +AT_WRITE_REG (&adapter->hw,REG_MDIO_CTRL , phy_data); } }
@@ -1132,7 +1136,7 @@ static int atl1c_stop_mac(struct atl1c_hw *hw)AT_READ_REG (hw,REG_TXQ_CTRL , &data); data &= ~TXQ_CTRL_EN ; -AT_WRITE_REG (hw,REG_TWSI_CTRL , data); +AT_WRITE_REG (hw,REG_TXQ_CTRL , data);atl1c_wait_until_idle (hw);
@@ -1265,8 +1269,9 @@ static void atl1c_set_aspm(struct atl1c_hw *hw, bool linkup)else pm_ctrl_data &= ~PM_CTRL_ASPM_L1_EN ; } -AT_WRITE_REG (hw,REG_PM_CTRL , pm_ctrl_data); + +return ; }static void atl1c_setup_mac_ctrl (struct atl1c_adapter *adapter)
David Miller
maintainerFrom: <[email protected]>
Date: Mon, 3 Aug 2009 13:43:52 +0800
Quoted 6 lines
1. Set
MAX_TX_OFFLOAD_THRESHto 6k from 9k, when mtu large thenMAX_TX_OFFLOAD_THRESHjust disableNETIF_F_TSO6,NETIF_F_TSO,NETIF_F_HW_CSUM.2. Fix spelling error, change
REG_TWSI_CTRLtoREG_TXQ_CTRL.Signed-off-by jie yang <jie.yang>@atheros.com
Please repost these two patches with your signoff fixed.
Thanks.