]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
r8169: expand received packet length indication.
authorFrancois Romieu <romieu@fr.zoreil.com>
Tue, 12 Jul 2011 06:24:28 +0000 (08:24 +0200)
committerFrancois Romieu <romieu@fr.zoreil.com>
Thu, 22 Sep 2011 09:35:26 +0000 (11:35 +0200)
8168d and above allow jumbo frames beyond 8k. Bump the received
packet length check before enabling jumbo frames on these chipsets.

Frame length indication covers bits 0..13 of the first Rx descriptor
32 bits for the 8169 and 8168. I only have authoritative documentation
for the allowed use of the extra (13) bit with the 8169 and 8168c.
Realtek's drivers use the same mask for the 816x and the fast ethernet
only 810x.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
drivers/net/ethernet/realtek/r8169.c

index 9a5965e7bd15fb6ab31e0c8ca94c366a483559d9..30bba23ce865be3a965f08b6a63fbb9bc223bd6e 100644 (file)
@@ -5533,7 +5533,7 @@ static int rtl8169_rx_interrupt(struct net_device *dev,
                } else {
                        struct sk_buff *skb;
                        dma_addr_t addr = le64_to_cpu(desc->addr);
-                       int pkt_size = (status & 0x00001FFF) - 4;
+                       int pkt_size = (status & 0x00003fff) - 4;
 
                        /*
                         * The driver does not support incoming fragmented