atl1c: Add AR8151 v2 support and change L0s/L1 routine
Subsystems (2)
PATCH 1/1 atl1c: Add AR8151 v2 support and change L0s/L1 routine
From: [email protected]
Add AR8151 v2.0 Gigabit 1000 support
Change jumbo frame size to 6K
Update L0s/L1 rountine
when link speed is 100M or 1G, set L1 link timer to 4 for l1d_2 and l2c_b2 set L1 link timer to 7 for l2c_b, set L1 link timer to 0xF for others.
Update atl1c_suspend routine
just refactory the function, add atl1c_phy_power_saving routine, when Wake On Lan enable, this func will be called to save power, it will reautoneg PHY to 10/100M speed depend on the link partners link capability.
Update atl1c_configure_des_ring
do not use l2c_b default SRAM configuration.
---
drivers/net/atl1c/atl1c.h | 9 +- drivers/net/atl1c/atl1c_hw.c | 107 +++++++++++-- drivers/net/atl1c/atl1c_hw.h | 49 ++++++- drivers/net/atl1c/atl1c_main.c | 348 +++++++++++++++++++++++----------------- 4 files changed, 345 insertions(+), 168 deletions(-)
drivers/net/atl1c/atl1c.h +7 -2
@@ -73,7 +73,8 @@#define FULL_DUPLEX 2#define AT_RX_BUF_SIZE (ETH_FRAME_LEN + VLAN_HLEN + ETH_FCS_LEN) -#define MAX_JUMBO_FRAME_SIZE (9*1024) +#define MAX_JUMBO_FRAME_SIZE (6*1024) +#define MAX_TSO_FRAME_SIZE (7*1024)#define MAX_TX_OFFLOAD_THRESH (9*1024)#define AT_MAX_RECEIVE_QUEUE 4
@@ -87,10 +88,11 @@#define AT_MAX_INT_WORK 5#define AT_TWSI_EEPROM_TIMEOUT 100#define AT_HW_MAX_IDLE_DELAY 10 -#define AT_SUSPEND_LINK_TIMEOUT 28 +#define AT_SUSPEND_LINK_TIMEOUT 100#define AT_ASPM_L0S_TIMER 6#define AT_ASPM_L1_TIMER 12 +#define AT_LCKDET_TIMER 12#define ATL1C_PCIE_L0S_L1_DISABLE 0x01#define ATL1C_PCIE_PHY_RESET 0x02
@@ -316,6 +318,7 @@ enum atl1c_nic_type { athr_l2c_b, athr_l2c_b2, athr_l1d, + athr_l1d_2, }; enum atl1c_trans_queue {
@@ -392,6 +395,8 @@ struct atl1c_hw {u16 subsystem_id;u16 subsystem_vendor_id;u8 revision_id; +u16 phy_id1; +u16 phy_id2;u32 intr_mask;u8 dmaw_dly_cnt;
drivers/net/atl1c/atl1c_hw.c +92 -15
159 lines not on this page · raw message
drivers/net/atl1c/atl1c_hw.h +46 -3
107 lines not on this page · raw message
drivers/net/atl1c/atl1c_main.c +200 -148
638 lines not on this page · raw message
From: <[email protected]>
Date: Mon, 31 May 2010 14:42:16 +0800
Quoted 15 lines
From: [email protected]
Add AR8151 v2.0 Gigabit 1000 support
Change jumbo frame size to 6K
Update L0s/L1 rountine
when link speed is 100M or 1G, set L1 link timer to 4 forl1d_2andl2c_b2set L1 link timer to 7 forl2c_b, set L1 link timer to0xFfor others.
Updateatl1c_suspendroutine
just refactory the function, addatl1c_phy_power_savingroutine, when Wake On Lan enable, this func will be called to save power, it will reautoneg PHY to 10/100M speed depend on the link partners link capability.
Updateatl1c_configure_des_ring
do not usel2c_bdefault SRAM configuration.
Quoted 1 line
Signed-off-by [email protected]
Applied, thank you.