diff options
author | Sathya Perla <sathya.perla@emulex.com> | 2010-11-30 20:04:17 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-12-06 15:59:08 -0500 |
commit | 6464281161e46254ac39505ad41d21dbe7d1738f (patch) | |
tree | a85efd96c46bada5c8226b2a02944295e9bec800 /drivers/net/benet/be.h | |
parent | 359a972fae84242efa26b86bf09c3ac3784405ba (diff) |
be2net: Handle out of buffer completions for lancer
If Lancer chip does not have posted RX buffers, it posts an RX completion entry
with the same frag_index as the last valid completion. The Error bit is also
set. In BE, a flush completion is indicated with a zero value for num_rcvd in
the completion.
Such completions don't carry any data and are not processed.
This patch refactors code to handle both cases with the same code.
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet/be.h')
-rw-r--r-- | drivers/net/benet/be.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h index b61a1dfebcaf..9cab32328bba 100644 --- a/drivers/net/benet/be.h +++ b/drivers/net/benet/be.h | |||
@@ -220,7 +220,9 @@ struct be_rx_obj { | |||
220 | struct be_rx_stats stats; | 220 | struct be_rx_stats stats; |
221 | u8 rss_id; | 221 | u8 rss_id; |
222 | bool rx_post_starved; /* Zero rx frags have been posted to BE */ | 222 | bool rx_post_starved; /* Zero rx frags have been posted to BE */ |
223 | u32 cache_line_barrier[16]; | 223 | u16 last_frag_index; |
224 | u16 rsvd; | ||
225 | u32 cache_line_barrier[15]; | ||
224 | }; | 226 | }; |
225 | 227 | ||
226 | struct be_vf_cfg { | 228 | struct be_vf_cfg { |