[TG3]: Improve 5704S autoneg.

Improve 5704S autoneg logic by using a serdes_counter field to keep
track of the transient states.  This eliminates a 200 msec busy
loop in the code.  Autoneg will take its course without the driver
busy waiting for it to finish.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Michael Chan
2006-09-27 15:59:15 -07:00
committed by David S. Miller
parent 6ac59344ef
commit 3d3ebe741b
2 changed files with 47 additions and 26 deletions
+6 -1
View File
@@ -2203,7 +2203,6 @@ struct tg3 {
#define TG3_FLG2_PCI_EXPRESS 0x00000200
#define TG3_FLG2_ASF_NEW_HANDSHAKE 0x00000400
#define TG3_FLG2_HW_AUTONEG 0x00000800
#define TG3_FLG2_PHY_JUST_INITTED 0x00001000
#define TG3_FLG2_PHY_SERDES 0x00002000
#define TG3_FLG2_CAPACITIVE_COUPLING 0x00004000
#define TG3_FLG2_FLASH 0x00008000
@@ -2236,6 +2235,12 @@ struct tg3 {
u16 asf_counter;
u16 asf_multiplier;
/* 1 second counter for transient serdes link events */
u32 serdes_counter;
#define SERDES_AN_TIMEOUT_5704S 2
#define SERDES_PARALLEL_DET_TIMEOUT 1
#define SERDES_AN_TIMEOUT_5714S 1
struct tg3_link_config link_config;
struct tg3_bufmgr_config bufmgr_config;