ixgb: make sure jumbos stay enabled after reset

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>

authored by Matheos Worku and committed by Jeff Garzik 3fd7131f 47073875

+14 -2
+14 -2
drivers/net/ixgb/ixgb_main.c
··· 320 void 321 ixgb_reset(struct ixgb_adapter *adapter) 322 { 323 324 - ixgb_adapter_stop(&adapter->hw); 325 - if(!ixgb_init_hw(&adapter->hw)) 326 DPRINTK(PROBE, ERR, "ixgb_init_hw failed.\n"); 327 } 328 329 /**
··· 320 void 321 ixgb_reset(struct ixgb_adapter *adapter) 322 { 323 + struct ixgb_hw *hw = &adapter->hw; 324 325 + ixgb_adapter_stop(hw); 326 + if (!ixgb_init_hw(hw)) 327 DPRINTK(PROBE, ERR, "ixgb_init_hw failed.\n"); 328 + 329 + /* restore frame size information */ 330 + IXGB_WRITE_REG(hw, MFS, hw->max_frame_size << IXGB_MFS_SHIFT); 331 + if (hw->max_frame_size > 332 + IXGB_MAX_ENET_FRAME_SIZE_WITHOUT_FCS + ENET_FCS_LENGTH) { 333 + u32 ctrl0 = IXGB_READ_REG(hw, CTRL0); 334 + if (!(ctrl0 & IXGB_CTRL0_JFE)) { 335 + ctrl0 |= IXGB_CTRL0_JFE; 336 + IXGB_WRITE_REG(hw, CTRL0, ctrl0); 337 + } 338 + } 339 } 340 341 /**