From patchwork Wed Dec 23 23:21:46 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: 41706 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.180.67]) by ozlabs.org (Postfix) with ESMTP id 86B78B7B93 for ; Thu, 24 Dec 2009 10:22:13 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755394AbZLWXWI (ORCPT ); Wed, 23 Dec 2009 18:22:08 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755361AbZLWXWH (ORCPT ); Wed, 23 Dec 2009 18:22:07 -0500 Received: from qmta14.westchester.pa.mail.comcast.net ([76.96.59.212]:43239 "EHLO QMTA14.westchester.pa.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754933AbZLWXWG (ORCPT ); Wed, 23 Dec 2009 18:22:06 -0500 Received: from OMTA15.westchester.pa.mail.comcast.net ([76.96.62.87]) by QMTA14.westchester.pa.mail.comcast.net with comcast id LmJD1d00A1swQuc5EnN49B; Wed, 23 Dec 2009 23:22:04 +0000 Received: from localhost.localdomain ([63.64.152.142]) by OMTA15.westchester.pa.mail.comcast.net with comcast id LnP11d00F34bfcX3bnP3v0; Wed, 23 Dec 2009 23:23:16 +0000 From: Jeff Kirsher Subject: [net-2.6 PATCH 4/4] igb: check both function bits in status register in wol exception To: davem@davemloft.net Cc: netdev@vger.kernel.org, gospo@redhat.com, Alexander Duyck , Jeff Kirsher Date: Wed, 23 Dec 2009 15:21:46 -0800 Message-ID: <20091223232145.16146.15465.stgit@localhost.localdomain> In-Reply-To: <20091223232047.16146.35264.stgit@localhost.localdomain> References: <20091223232047.16146.35264.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: Alexander Duyck The ethtool code for enabling Wake on Lan was not correctly checking the status register bits so as a result ports 0 and 2 were both being allowed to set WOL to enabled even though it is only supported on the first port for our adapters. Signed-off-by: Alexander Duyck Signed-off-by: Jeff Kirsher --- drivers/net/igb/igb_ethtool.c | 2 +- 1 files changed, 1 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/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c index ac9d527..f771a6c 100644 --- a/drivers/net/igb/igb_ethtool.c +++ b/drivers/net/igb/igb_ethtool.c @@ -1795,7 +1795,7 @@ static int igb_wol_exclusion(struct igb_adapter *adapter, /* dual port cards only support WoL on port A from now on * unless it was enabled in the eeprom for port B * so exclude FUNC_1 ports from having WoL enabled */ - if (rd32(E1000_STATUS) & E1000_STATUS_FUNC_1 && + if ((rd32(E1000_STATUS) & E1000_STATUS_FUNC_MASK) && !adapter->eeprom_wol) { wol->supported = 0; break;