diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2012-05-11 12:30:46 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2012-05-17 08:03:12 -0400 |
commit | a3060858c207d944194a30478d30d3e1822e23f3 (patch) | |
tree | 40e5be98a3b8c47ce16adcce54d8f79faf54a30c /drivers/net/ethernet/intel/e1000 | |
parent | 4af4a23328cb766172c0ecb833c7fae905d18862 (diff) |
e1000: look in the page and not in skb->data for the last byte
The code seems to want to look at the last byte where the HW puts some
information. Since the skb->data area is never seen by the HW I guess it
does not work as expected. We pass the page address to the HW so I
*think* in order to get to the last byte where the information might be
one should use the page buffer and take a look.
This is of course not more than just compile tested.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/e1000')
-rw-r--r-- | drivers/net/ethernet/intel/e1000/e1000_main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c index fefbf4d66e18..37b7d1c90723 100644 --- a/drivers/net/ethernet/intel/e1000/e1000_main.c +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c | |||
@@ -4066,7 +4066,11 @@ static bool e1000_clean_jumbo_rx_irq(struct e1000_adapter *adapter, | |||
4066 | /* errors is only valid for DD + EOP descriptors */ | 4066 | /* errors is only valid for DD + EOP descriptors */ |
4067 | if (unlikely((status & E1000_RXD_STAT_EOP) && | 4067 | if (unlikely((status & E1000_RXD_STAT_EOP) && |
4068 | (rx_desc->errors & E1000_RXD_ERR_FRAME_ERR_MASK))) { | 4068 | (rx_desc->errors & E1000_RXD_ERR_FRAME_ERR_MASK))) { |
4069 | u8 last_byte = *(skb->data + length - 1); | 4069 | u8 *mapped; |
4070 | u8 last_byte; | ||
4071 | |||
4072 | mapped = page_address(buffer_info->page); | ||
4073 | last_byte = *(mapped + length - 1); | ||
4070 | if (TBI_ACCEPT(hw, status, rx_desc->errors, length, | 4074 | if (TBI_ACCEPT(hw, status, rx_desc->errors, length, |
4071 | last_byte)) { | 4075 | last_byte)) { |
4072 | spin_lock_irqsave(&adapter->stats_lock, | 4076 | spin_lock_irqsave(&adapter->stats_lock, |