Skip to content

Commit a306085

Browse files
Sebastian Andrzej SiewiorJeff Kirsher
authored andcommitted
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>
1 parent 4af4a23 commit a306085

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/net/ethernet/intel/e1000/e1000_main.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4066,7 +4066,11 @@ static bool e1000_clean_jumbo_rx_irq(struct e1000_adapter *adapter,
40664066
/* errors is only valid for DD + EOP descriptors */
40674067
if (unlikely((status & E1000_RXD_STAT_EOP) &&
40684068
(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);
40704074
if (TBI_ACCEPT(hw, status, rx_desc->errors, length,
40714075
last_byte)) {
40724076
spin_lock_irqsave(&adapter->stats_lock,

0 commit comments

Comments
 (0)