tg3: Override clock, link aware and link idle mode during NVRAM dump
authorPrashant Sreedharan <prashant@broadcom.com>
Sat, 24 May 2014 08:32:09 +0000 (01:32 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 25 May 2014 03:39:50 +0000 (23:39 -0400)
commit506724c463fcd63477a5e404728a980b71f80bb7
treed09983d0846218e9eeebd6da4e83d6ada1077bee
parentcab6715c3e8029e98b0b5d4056ceda007c0f6380
tg3: Override clock, link aware and link idle mode during NVRAM dump

When cable is not present the clock speed of some of the devices is
reduced based upon power saving mode setting in NVRAM. Due to this
NVRAM reads take long time to complete as a result CPU soft lockup
message is seen. Fix is to override clock, disable link aware and link
idle modes before NVRAM reads and restore them back after the reads
are complete. During this period also check if the thread needs to be
rescheduled and if there are any signals to handle.

Also decrease the NVRAM command execution timeout value to 1ms.

Signed-off-by: Prashant Sreedharan <prashant@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/tg3.c