From patchwork Mon Oct 26 21:23:06 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kirsher, Jeffrey T" X-Patchwork-Id: 36938 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 2F9DEB7B78 for ; Tue, 27 Oct 2009 08:26:54 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753654AbZJZV0m (ORCPT ); Mon, 26 Oct 2009 17:26:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753533AbZJZV0m (ORCPT ); Mon, 26 Oct 2009 17:26:42 -0400 Received: from qmta06.emeryville.ca.mail.comcast.net ([76.96.30.56]:38012 "EHLO QMTA06.emeryville.ca.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753015AbZJZV0m (ORCPT ); Mon, 26 Oct 2009 17:26:42 -0400 Received: from OMTA10.emeryville.ca.mail.comcast.net ([76.96.30.28]) by QMTA06.emeryville.ca.mail.comcast.net with comcast id xX9Z1c06t0cQ2SLA6ZSnTq; Mon, 26 Oct 2009 21:26:47 +0000 Received: from localhost.localdomain ([63.64.152.142]) by OMTA10.emeryville.ca.mail.comcast.net with comcast id xZSW1c00834bfcX8WZSZHA; Mon, 26 Oct 2009 21:26:45 +0000 From: Jeff Kirsher Subject: [net-2.6 PATCH 2/5] e1000e: increase swflag acquisition timeout for ICHx/PCH To: davem@davemloft.net Cc: netdev@vger.kernel.org, gospo@redhat.com, Bruce Allan , Jeff Kirsher Date: Mon, 26 Oct 2009 14:23:06 -0700 Message-ID: <20091026212306.9682.73519.stgit@localhost.localdomain> In-Reply-To: <20091026212242.9682.25442.stgit@localhost.localdomain> References: <20091026212242.9682.25442.stgit@localhost.localdomain> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Bruce Allan In some conditions (e.g. when AMT is enabled on the system), it is possible to take an extended period of time to for the driver to acquire the sw/fw/hw hardware semaphore used to protect against concurrent access of a shared resource (e.g. PHY registers). This could cause PHY registers to not get configured properly resulting in link issues. Signed-off-by: Bruce Allan Signed-off-by: Jeff Kirsher --- drivers/net/e1000e/ich8lan.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c index ead6651..fb2222d 100644 --- a/drivers/net/e1000e/ich8lan.c +++ b/drivers/net/e1000e/ich8lan.c @@ -122,6 +122,8 @@ #define HV_LED_CONFIG PHY_REG(768, 30) /* LED Configuration */ +#define SW_FLAG_TIMEOUT 1000 /* SW Semaphore flag timeout in milliseconds */ + /* ICH GbE Flash Hardware Sequencing Flash Status Register bit breakdown */ /* Offset 04h HSFSTS */ union ich8_hws_flash_status { @@ -599,7 +601,7 @@ static s32 e1000_acquire_swflag_ich8lan(struct e1000_hw *hw) goto out; } - timeout = PHY_CFG_TIMEOUT * 2; + timeout = SW_FLAG_TIMEOUT; extcnf_ctrl |= E1000_EXTCNF_CTRL_SWFLAG; ew32(EXTCNF_CTRL, extcnf_ctrl);