diff options
author | Matt Carlson <mcarlson@broadcom.com> | 2008-08-15 17:10:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-15 17:10:04 -0400 |
commit | 4ba526ced990f4d61ee8d65fe8a6f0745e8e455c (patch) | |
tree | 8b20fe7ea098ff1f6d04282adc82b779e403e02b /drivers/net/tg3.h | |
parent | bc7959b2cbb57393b625b423c73e6fd07610257f (diff) |
tg3: Fix firmware event timeouts
The git commit 7c5026aa9b81dd45df8d3f4e0be73e485976a8b6 ("tg3: Add
link state reporting to UMP firmware") introduced code that waits for
previous firmware events to be serviced before attempting to submit a
new event. Unfortunately that patch contained a bug that cause the
driver to wait 2.5 seconds, rather than 2.5 milliseconds as intended.
This patch fixes that bug.
This bug revealed that not all firmware versions service driver events
though. Since we do not know which versions of the firmware do and don't
service these events, the driver needs some way to minimize the effects
of the delay. This patch solves the problem by recording a jiffies
timestamp when it submits an event to the hardware. If the jiffies
counter shows that 2.5 milliseconds have already passed, a wait is not
needed and the driver can proceed to submit a new event.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.h')
-rw-r--r-- | drivers/net/tg3.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index 377234947e4..f5b8cab8d4b 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -2432,7 +2432,10 @@ struct tg3 { | |||
2432 | struct tg3_ethtool_stats estats; | 2432 | struct tg3_ethtool_stats estats; |
2433 | struct tg3_ethtool_stats estats_prev; | 2433 | struct tg3_ethtool_stats estats_prev; |
2434 | 2434 | ||
2435 | union { | ||
2435 | unsigned long phy_crc_errors; | 2436 | unsigned long phy_crc_errors; |
2437 | unsigned long last_event_jiffies; | ||
2438 | }; | ||
2436 | 2439 | ||
2437 | u32 rx_offset; | 2440 | u32 rx_offset; |
2438 | u32 tg3_flags; | 2441 | u32 tg3_flags; |