aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/net_driver.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-09-01 07:49:37 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-09-24 18:54:37 -0400
commit6bc5d3a9334401d788e1adf8b71add211265bc8b (patch)
tree250f3de17f38b778ac8a109229c5b3687ab8d15d /drivers/net/sfc/net_driver.h
parent92ade881b2fcfc2744d3de43d172d3ec8e13afd7 (diff)
sfc: Make queue flushes more reliable
Increase the potential retry count for RX flushes from 5 to 100. Stop polling the RX_DESC_PTR_TBL to infer that a flush might have happened. Instead absolutely rely on the flush events, unless bug 7803 applies (Falcon rev A only). To keep things quick, request flushes for every TX and RX queue up front, and match up the events to requests. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/sfc/net_driver.h')
-rw-r--r--drivers/net/sfc/net_driver.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h
index be3d2ba3b74e..868ad1e703f1 100644
--- a/drivers/net/sfc/net_driver.h
+++ b/drivers/net/sfc/net_driver.h
@@ -160,6 +160,7 @@ struct efx_tx_buffer {
160 * @channel: The associated channel 160 * @channel: The associated channel
161 * @buffer: The software buffer ring 161 * @buffer: The software buffer ring
162 * @txd: The hardware descriptor ring 162 * @txd: The hardware descriptor ring
163 * @flushed: Used when handling queue flushing
163 * @read_count: Current read pointer. 164 * @read_count: Current read pointer.
164 * This is the number of buffers that have been removed from both rings. 165 * This is the number of buffers that have been removed from both rings.
165 * @stopped: Stopped count. 166 * @stopped: Stopped count.
@@ -192,6 +193,7 @@ struct efx_tx_queue {
192 struct efx_nic *nic; 193 struct efx_nic *nic;
193 struct efx_tx_buffer *buffer; 194 struct efx_tx_buffer *buffer;
194 struct efx_special_buffer txd; 195 struct efx_special_buffer txd;
196 bool flushed;
195 197
196 /* Members used mainly on the completion path */ 198 /* Members used mainly on the completion path */
197 unsigned int read_count ____cacheline_aligned_in_smp; 199 unsigned int read_count ____cacheline_aligned_in_smp;
@@ -260,6 +262,7 @@ struct efx_rx_buffer {
260 * the remaining space in the allocation. 262 * the remaining space in the allocation.
261 * @buf_dma_addr: Page's DMA address. 263 * @buf_dma_addr: Page's DMA address.
262 * @buf_data: Page's host address. 264 * @buf_data: Page's host address.
265 * @flushed: Use when handling queue flushing
263 */ 266 */
264struct efx_rx_queue { 267struct efx_rx_queue {
265 struct efx_nic *efx; 268 struct efx_nic *efx;
@@ -285,6 +288,7 @@ struct efx_rx_queue {
285 struct page *buf_page; 288 struct page *buf_page;
286 dma_addr_t buf_dma_addr; 289 dma_addr_t buf_dma_addr;
287 char *buf_data; 290 char *buf_data;
291 bool flushed;
288}; 292};
289 293
290/** 294/**