diff options
author | Matheos Worku <matheos.worku@sun.com> | 2007-12-14 14:48:29 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-12-14 16:12:47 -0500 |
commit | 3fd7131feacc01c1e23e46c416228f36ebdcc0d4 (patch) | |
tree | 6ba3067b7bc4c53a5865711faa60e246ee39fc5f /drivers/net/ixgb | |
parent | 470738758db2c209481fdf92ca09f60e690a62d3 (diff) |
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>
Diffstat (limited to 'drivers/net/ixgb')
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index 3021234b1e17..bf9085fe035a 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c | |||
@@ -320,10 +320,22 @@ ixgb_down(struct ixgb_adapter *adapter, boolean_t kill_watchdog) | |||
320 | void | 320 | void |
321 | ixgb_reset(struct ixgb_adapter *adapter) | 321 | ixgb_reset(struct ixgb_adapter *adapter) |
322 | { | 322 | { |
323 | struct ixgb_hw *hw = &adapter->hw; | ||
323 | 324 | ||
324 | ixgb_adapter_stop(&adapter->hw); | 325 | ixgb_adapter_stop(hw); |
325 | if(!ixgb_init_hw(&adapter->hw)) | 326 | if (!ixgb_init_hw(hw)) |
326 | DPRINTK(PROBE, ERR, "ixgb_init_hw failed.\n"); | 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 | } | ||
327 | } | 339 | } |
328 | 340 | ||
329 | /** | 341 | /** |