Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3fd7131f authored by Matheos Worku's avatar Matheos Worku Committed by Jeff Garzik
Browse files

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: default avatarMatheos Worku <matheos.worku@sun.com>
Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: default avatarAuke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 47073875
Loading
Loading
Loading
Loading
+14 −2
Original line number Original line Diff line number Diff line
@@ -320,10 +320,22 @@ ixgb_down(struct ixgb_adapter *adapter, boolean_t kill_watchdog)
void
void
ixgb_reset(struct ixgb_adapter *adapter)
ixgb_reset(struct ixgb_adapter *adapter)
{
{
	struct ixgb_hw *hw = &adapter->hw;


	ixgb_adapter_stop(&adapter->hw);
	ixgb_adapter_stop(hw);
	if(!ixgb_init_hw(&adapter->hw))
	if (!ixgb_init_hw(hw))
		DPRINTK(PROBE, ERR, "ixgb_init_hw failed.\n");
		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);
		}
	}
}
}


/**
/**