tg3: Poll cpmu link state on APE + ASF enabled devices
authorNithin Sujir <nsujir@broadcom.com>
Fri, 3 Jan 2014 18:09:14 +0000 (10:09 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 4 Jan 2014 01:59:52 +0000 (20:59 -0500)
commit1743b83c86b5dc525463a1bc9c701b4d9e428c5b
tree13e5250827b18e20c0a5cf2e20e626e0f08512f6
parentf82995b65c44f353358179f4e2745cf967e00b31
tg3: Poll cpmu link state on APE + ASF enabled devices

On ASF enabled devices where the mgmt firmware runs on the application
processing engine, there is a race between the tg3 driver processing a
link change event and the ASF firmware clearing the link changed bit in
the EMAC status register. This leads to link notifications to the driver
sometimes getting lost.

Poll the CPMU link state as a backup for the normal interrupt path
update if ASF is enabled.

Signed-off-by: Nithin Nayak Sujir <nsujir@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
drivers/net/ethernet/broadcom/tg3.h