]> err.no Git - linux-2.6/commitdiff
ixgb: leave room for extra hardware memory usage
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Tue, 8 Jul 2008 22:51:22 +0000 (15:51 -0700)
committerJeff Garzik <jgarzik@redhat.com>
Fri, 11 Jul 2008 05:20:27 +0000 (01:20 -0400)
ixgb hardware (not ixgbe) has a problem where it might dma past the
end of a buffer in certain cases.  leave 8 bytes extra room.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/ixgb/ixgb_main.c

index ecd5252c4bf40b5324e0659ea1d7ac072e1b05f5..ec8bce1543649bac6d5c63fa3187409e4140e760 100644 (file)
@@ -560,7 +560,7 @@ ixgb_sw_init(struct ixgb_adapter *adapter)
        hw->subsystem_id = pdev->subsystem_device;
 
        hw->max_frame_size = netdev->mtu + ENET_HEADER_SIZE + ENET_FCS_LENGTH;
-       adapter->rx_buffer_len = hw->max_frame_size;
+       adapter->rx_buffer_len = hw->max_frame_size + 8; /* + 8 for errata */
 
        if((hw->device_id == IXGB_DEVICE_ID_82597EX)
           || (hw->device_id == IXGB_DEVICE_ID_82597EX_CX4)
@@ -1573,7 +1573,7 @@ ixgb_change_mtu(struct net_device *netdev, int new_mtu)
                return -EINVAL;
        }
 
-       adapter->rx_buffer_len = max_frame;
+       adapter->rx_buffer_len = max_frame + 8; /* + 8 for errata */
 
        netdev->mtu = new_mtu;