From: Auke Kok <auke-jan.h.kok@intel.com>
To: Kenzo Iwami <k-iwami@cj.jp.nec.com>
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>,
"Ronciak, John" <john.ronciak@intel.com>,
Shaw Vrana <shaw@vranix.com>,
netdev@vger.kernel.org
Subject: Re: watchdog timeout panic in e1000 driver
Date: Mon, 15 Jan 2007 08:14:58 -0800 [thread overview]
Message-ID: <45ABA882.20806@intel.com> (raw)
In-Reply-To: <45AB4561.8040400@cj.jp.nec.com>
[-- Attachment #1: Type: text/plain, Size: 1028 bytes --]
Kenzo Iwami wrote:
> With this patch applied, I confirmed that the system doesn't panic.
> I think this patch can fix this problem.
> Does this patch have problems.
Kenzo,
thanks for staying patient while most of us were out or busy. Apart from acknowledging
that you might have fixed a problem with your patch, we're very reluctant to merge such
a huge change in our driver that touches much more cases then the one that seems to be
giving you problems.
I've thought up a much more elegant solution that prevents the driver from asserting the
swfw semaphore during normal operations by checking the mac LU (link up) register in the
watchdog. This allows the watchdog task to bypass all PHY checking in case all link
statuses are OK, and thus removes the big problem that you are seeing.
Attached a version that should apply against most current trees. Please give it a try
and let us know if this also fixes the problem for you. I will most likely push this
patch to the netdev tree in any case.
Cheers,
Auke
---
[-- Attachment #2: e1000_git_link_check_for_change_only.patch --]
[-- Type: text/x-patch, Size: 1230 bytes --]
From: Auke Kok <auke-jan.h.kok@intel.com>
e1000: Don't do PHY reads in watchdog unless link status is down
The watchdog runs code that every 2 seconds performs several PHY reads
that are locked with the swfw semaphore, causing the semaphore to be
unavailable for a short time. This is completely unneeded in case the
MAC detects PHY link up (LU).
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
---
drivers/net/e1000/e1000_main.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 34d8e5d..9660925 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -2556,6 +2556,10 @@ e1000_watchdog(unsigned long data)
uint32_t link, tctl;
int32_t ret_val;
+ if ((netif_carrier_ok(netdev)) &&
+ (E1000_READ_REG(&adapter->hw, STATUS) & E1000_STATUS_LU))
+ goto link_up;
+
ret_val = e1000_check_for_link(&adapter->hw);
if ((ret_val == E1000_ERR_PHY) &&
(adapter->hw.phy_type == e1000_phy_igp_3) &&
@@ -2684,6 +2688,7 @@ e1000_watchdog(unsigned long data)
e1000_smartspeed(adapter);
}
+link_up:
e1000_update_stats(adapter);
adapter->hw.tx_packet_delta = adapter->stats.tpt - adapter->tpt_old;
next prev parent reply other threads:[~2007-01-15 16:15 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-16 17:20 watchdog timeout panic in e1000 driver Brandeburg, Jesse
2006-11-21 10:16 ` Kenzo Iwami
2006-12-04 9:14 ` Kenzo Iwami
2006-12-05 0:46 ` Auke Kok
2006-12-12 7:58 ` Kenzo Iwami
2006-12-19 0:13 ` Kenzo Iwami
2007-01-15 9:12 ` Kenzo Iwami
2007-01-15 16:14 ` Auke Kok [this message]
2007-01-16 8:42 ` Kenzo Iwami
2007-01-18 9:22 ` Kenzo Iwami
-- strict thread matches above, loose matches on Subject: below --
2006-10-19 10:19 Kenzo Iwami
2006-10-19 15:39 ` Auke Kok
[not found] ` <4538BFF2.2040207@cj.jp.nec.com>
2006-10-20 15:51 ` Auke Kok
2006-10-24 9:01 ` Kenzo Iwami
2006-10-24 16:15 ` Auke Kok
2006-10-25 13:41 ` Kenzo Iwami
2006-10-25 15:09 ` Auke Kok
2006-10-26 10:35 ` Kenzo Iwami
2006-10-26 14:34 ` Auke Kok
2006-10-30 11:36 ` Kenzo Iwami
2006-10-30 17:30 ` Auke Kok
2006-10-31 3:22 ` Shaw Vrana
2006-11-01 13:21 ` Kenzo Iwami
2006-11-15 10:33 ` Kenzo Iwami
2006-11-15 16:11 ` Auke Kok
2006-11-16 9:23 ` Kenzo Iwami
2007-02-20 9:26 ` Kenzo Iwami
2007-02-20 16:10 ` Auke Kok
2007-02-21 5:17 ` Kenzo Iwami
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=45ABA882.20806@intel.com \
--to=auke-jan.h.kok@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=john.ronciak@intel.com \
--cc=k-iwami@cj.jp.nec.com \
--cc=netdev@vger.kernel.org \
--cc=shaw@vranix.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.