From: Auke Kok <auke-jan.h.kok@intel.com>
To: jeff@garzik.org
Cc: netdev@vger.kernel.org, auke-jan.h.kok@intel.com,
jesse.brandeburg@intel.com, matheos.worku@sun.com
Subject: [PATCH 1/2] ixgb: make sure jumbos stay enabled after reset
Date: Fri, 14 Dec 2007 11:48:29 -0800 [thread overview]
Message-ID: <20071214194829.15478.2510.stgit@localhost.localdomain> (raw)
From: Matheos Worku <matheos.worku@sun.com>
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>
---
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 3021234..bf9085f 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)
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);
+ }
+ }
}
/**
next reply other threads:[~2007-12-14 19:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-14 19:48 Auke Kok [this message]
2007-12-14 19:48 ` [PATCH 2/2] ixgb: enable sun hardware support for broadcom phy Auke Kok
2007-12-18 1:17 ` Jeff Garzik
2008-01-14 19:43 ` Matheos Worku
2008-01-28 23:27 ` Kok, Auke
2007-12-14 21:13 ` [PATCH 1/2] ixgb: make sure jumbos stay enabled after reset Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071214194829.15478.2510.stgit@localhost.localdomain \
--to=auke-jan.h.kok@intel.com \
--cc=jeff@garzik.org \
--cc=jesse.brandeburg@intel.com \
--cc=matheos.worku@sun.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).