diff options
author | David S. Miller <davem@davemloft.net> | 2005-05-19 01:46:34 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-05-19 01:46:34 -0400 |
commit | fac9b83ea79aa3112ed245d9a4fc2a5c3ec2b7ec (patch) | |
tree | 14749e6e5e0abdfb707b41dad714e36246e6cff8 /drivers/net/tg3.h | |
parent | 05d3794aa8bd3b2c9f7920a05003c331cdeb75c5 (diff) |
[TG3]: Add tagged status support.
When supported, use the TAGGED interrupt processing support
the chip provides. In this mode, instead of a "on/off" binary
semaphore, an incrementing tag scheme is used to ACK interrupts.
All MSI supporting chips support TAGGED mode, so the tg3_msi()
interrupt handler uses it unconditionally. This invariant is
verified when MSI support is tested.
Since we can invoke tg3_poll() multiple times per interrupt under
high packet load, we fetch a new copy of the tag value in the
status block right before we actually do the work.
Also, because the tagged status tells the chip exactly which
work we have processed, we can make two optimizations:
1) tg3_restart_ints() need not check tg3_has_work()
2) the tg3_timer() need not poke the chip 10 times per
second to keep from losing interrupt events
Based upon valuable feedback from 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 | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index 8de6f21037ba..44c65160a20f 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -2023,6 +2023,7 @@ struct tg3 { | |||
2023 | 2023 | ||
2024 | struct tg3_hw_status *hw_status; | 2024 | struct tg3_hw_status *hw_status; |
2025 | dma_addr_t status_mapping; | 2025 | dma_addr_t status_mapping; |
2026 | u32 last_tag; | ||
2026 | 2027 | ||
2027 | u32 msg_enable; | 2028 | u32 msg_enable; |
2028 | 2029 | ||
@@ -2068,6 +2069,7 @@ struct tg3 { | |||
2068 | 2069 | ||
2069 | u32 rx_offset; | 2070 | u32 rx_offset; |
2070 | u32 tg3_flags; | 2071 | u32 tg3_flags; |
2072 | #define TG3_FLAG_TAGGED_STATUS 0x00000001 | ||
2071 | #define TG3_FLAG_TXD_MBOX_HWBUG 0x00000002 | 2073 | #define TG3_FLAG_TXD_MBOX_HWBUG 0x00000002 |
2072 | #define TG3_FLAG_RX_CHECKSUMS 0x00000004 | 2074 | #define TG3_FLAG_RX_CHECKSUMS 0x00000004 |
2073 | #define TG3_FLAG_USE_LINKCHG_REG 0x00000008 | 2075 | #define TG3_FLAG_USE_LINKCHG_REG 0x00000008 |