]> err.no Git - linux-2.6/commitdiff
ixgb: make sure jumbos stay enabled after reset
authorMatheos Worku <matheos.worku@sun.com>
Fri, 14 Dec 2007 19:48:29 +0000 (11:48 -0800)
committerJeff Garzik <jeff@garzik.org>
Fri, 14 Dec 2007 21:12:47 +0000 (16:12 -0500)
Currently a device reset (ethtool -r ethX) would cause the
adapter to fall back to regular MTU sizes.

Signed-off-by: Matheos Worku <matheos.worku@sun.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/ixgb/ixgb_main.c

index 3021234b1e173f5653603bcde3998db26ea3abba..bf9085fe035aa6d4c6476c7fdf4540704494f9e0 100644 (file)
@@ -320,10 +320,22 @@ ixgb_down(struct ixgb_adapter *adapter, boolean_t kill_watchdog)
 void
 ixgb_reset(struct ixgb_adapter *adapter)
 {
+       struct ixgb_hw *hw = &adapter->hw;
 
-       ixgb_adapter_stop(&adapter->hw);
-       if(!ixgb_init_hw(&adapter->hw))
+       ixgb_adapter_stop(hw);
+       if (!ixgb_init_hw(hw))
                DPRINTK(PROBE, ERR, "ixgb_init_hw failed.\n");
+
+       /* restore frame size information */
+       IXGB_WRITE_REG(hw, MFS, hw->max_frame_size << IXGB_MFS_SHIFT);
+       if (hw->max_frame_size >
+           IXGB_MAX_ENET_FRAME_SIZE_WITHOUT_FCS + ENET_FCS_LENGTH) {
+               u32 ctrl0 = IXGB_READ_REG(hw, CTRL0);
+               if (!(ctrl0 & IXGB_CTRL0_JFE)) {
+                       ctrl0 |= IXGB_CTRL0_JFE;
+                       IXGB_WRITE_REG(hw, CTRL0, ctrl0);
+               }
+       }
 }
 
 /**