Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 179803
b: refs/heads/master
c: 40a14de
h: refs/heads/master
i:
  179801: 9bef2ed
  179799: 11c8567
v: v3
  • Loading branch information
Jesse Brandeburg authored and David S. Miller committed Jan 21, 2010
1 parent 17ff6d3 commit b3a0514
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c1fa347f20f17f14a4a1575727fa24340e8a9117
refs/heads/master: 40a14deaf411592b57cb0720f0e8004293ab9865
2 changes: 2 additions & 0 deletions trunk/drivers/net/e1000/e1000.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ struct e1000_adapter {
/* for ioport free */
int bars;
int need_ioport;

bool discarding;
};

enum e1000_state_t {
Expand Down
13 changes: 11 additions & 2 deletions trunk/drivers/net/e1000/e1000_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3850,13 +3850,22 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter,

length = le16_to_cpu(rx_desc->length);
/* !EOP means multiple descriptors were used to store a single
* packet, also make sure the frame isn't just CRC only */
if (unlikely(!(status & E1000_RXD_STAT_EOP) || (length <= 4))) {
* packet, if thats the case we need to toss it. In fact, we
* to toss every packet with the EOP bit clear and the next
* frame that _does_ have the EOP bit set, as it is by
* definition only a frame fragment
*/
if (unlikely(!(status & E1000_RXD_STAT_EOP)))
adapter->discarding = true;

if (adapter->discarding) {
/* All receives must fit into a single buffer */
E1000_DBG("%s: Receive packet consumed multiple"
" buffers\n", netdev->name);
/* recycle */
buffer_info->skb = skb;
if (status & E1000_RXD_STAT_EOP)
adapter->discarding = false;
goto next_desc;
}

Expand Down

0 comments on commit b3a0514

Please sign in to comment.