tg3: Reduce UMP event collision window
authorMatt Carlson <mcarlson@broadcom.com>
Mon, 13 Feb 2012 15:20:12 +0000 (15:20 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Feb 2012 01:45:06 +0000 (20:45 -0500)
commitb28f389d92114ecf1a7c99eb3865438543a1808b
treebf3d0d881b3fa53529b7b11247c1d80a5e65a961
parent422782249927e887a4c032d1d7e1f59de281ecbb
tg3: Reduce UMP event collision window

The tg3 driver needs to submit a few phy register values to the UMP
firmware each time the link state changes.  Up until now, the driver
would wait for the previous event to complete, then proceed to gather
data through a series of phy accesses.  Since phy accesses are
relatively slow, it is possible for another thread to attempt to submit
its own event while the UMP code is still construction its message.

This patch seeks to minimize the collision window as much as possible by
preloading the phy data.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/tg3.c