aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/net_driver.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2009-11-25 11:09:55 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-26 18:59:19 -0500
commit127e6e10ad17585c48cba8e1dcf30d98b90ee583 (patch)
tree7c66f03e88b0f1aef5bb6d4f42724bd1fe7b5538 /drivers/net/sfc/net_driver.h
parent44838a447de3b1541cbf845853c4f8999310b0dd (diff)
sfc: Fix bugs in RX queue flushing
Avoid overrunning the hardware limit of 4 concurrent RX queue flushes. Expand the queue flush state to support this. Make similar changes to TX flushing to keep the code symmetric. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/net_driver.h')
-rw-r--r--drivers/net/sfc/net_driver.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h
index ac808d5f24a0..d0755ab056fe 100644
--- a/drivers/net/sfc/net_driver.h
+++ b/drivers/net/sfc/net_driver.h
@@ -113,6 +113,13 @@ struct efx_special_buffer {
113 int entries; 113 int entries;
114}; 114};
115 115
116enum efx_flush_state {
117 FLUSH_NONE,
118 FLUSH_PENDING,
119 FLUSH_FAILED,
120 FLUSH_DONE,
121};
122
116/** 123/**
117 * struct efx_tx_buffer - An Efx TX buffer 124 * struct efx_tx_buffer - An Efx TX buffer
118 * @skb: The associated socket buffer. 125 * @skb: The associated socket buffer.
@@ -189,7 +196,7 @@ struct efx_tx_queue {
189 struct efx_nic *nic; 196 struct efx_nic *nic;
190 struct efx_tx_buffer *buffer; 197 struct efx_tx_buffer *buffer;
191 struct efx_special_buffer txd; 198 struct efx_special_buffer txd;
192 bool flushed; 199 enum efx_flush_state flushed;
193 200
194 /* Members used mainly on the completion path */ 201 /* Members used mainly on the completion path */
195 unsigned int read_count ____cacheline_aligned_in_smp; 202 unsigned int read_count ____cacheline_aligned_in_smp;
@@ -284,7 +291,7 @@ struct efx_rx_queue {
284 struct page *buf_page; 291 struct page *buf_page;
285 dma_addr_t buf_dma_addr; 292 dma_addr_t buf_dma_addr;
286 char *buf_data; 293 char *buf_data;
287 bool flushed; 294 enum efx_flush_state flushed;
288}; 295};
289 296
290/** 297/**