e1000: remove workaround for Errata 23 from jumbo alloc
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Fri, 11 May 2012 03:21:58 +0000 (03:21 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 17 May 2012 11:21:08 +0000 (04:21 -0700)
According to the comment, errata 23 says that the memory we allocate
can't cross a 64KiB boundary. In case of jumbo frames we allocate
complete pages which can never cross the 64KiB boundary because
PAGE_SIZE should be a multiple of 64KiB so we stop either before the
boundary or start after it but never cross it. Furthermore the check
seems bogus because it looks at skb->data which is not seen by the HW
at all because we only pass the DMA address of the page we allocated. So
I *think* the workaround is not required here.

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>
drivers/net/ethernet/intel/e1000/e1000_main.c

index f1aef68e1e83c1bbe06c0ce20d2a03d233a5008e..fefbf4d66e1884b784757c52f6c47c53bb6eee94 100644 (file)
@@ -4391,30 +4391,6 @@ e1000_alloc_jumbo_rx_buffers(struct e1000_adapter *adapter,
                        break;
                }
 
-               /* Fix for errata 23, can't cross 64kB boundary */
-               if (!e1000_check_64k_bound(adapter, skb->data, bufsz)) {
-                       struct sk_buff *oldskb = skb;
-                       e_err(rx_err, "skb align check failed: %u bytes at "
-                             "%p\n", bufsz, skb->data);
-                       /* Try again, without freeing the previous */
-                       skb = netdev_alloc_skb_ip_align(netdev, bufsz);
-                       /* Failed allocation, critical failure */
-                       if (!skb) {
-                               dev_kfree_skb(oldskb);
-                               adapter->alloc_rx_buff_failed++;
-                               break;
-                       }
-
-                       if (!e1000_check_64k_bound(adapter, skb->data, bufsz)) {
-                               /* give up */
-                               dev_kfree_skb(skb);
-                               dev_kfree_skb(oldskb);
-                               break; /* while (cleaned_count--) */
-                       }
-
-                       /* Use new allocation */
-                       dev_kfree_skb(oldskb);
-               }
                buffer_info->skb = skb;
                buffer_info->length = adapter->rx_buffer_len;
 check_page: