From patchwork Wed Jul 25 19:13:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wyborny, Carolyn" X-Patchwork-Id: 173245 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 8667C2C00A0 for ; Thu, 26 Jul 2012 05:15:01 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751187Ab2GYTOB (ORCPT ); Wed, 25 Jul 2012 15:14:01 -0400 Received: from mga11.intel.com ([192.55.52.93]:26687 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750872Ab2GYTOA convert rfc822-to-8bit (ORCPT ); Wed, 25 Jul 2012 15:14:00 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 25 Jul 2012 12:13:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.71,315,1320652800"; d="scan'208";a="186119138" Received: from orsmsx606.amr.corp.intel.com ([10.22.226.128]) by fmsmga001.fm.intel.com with ESMTP; 25 Jul 2012 12:13:58 -0700 Received: from orsmsx153.amr.corp.intel.com (10.22.226.247) by orsmsx606.amr.corp.intel.com (10.22.226.128) with Microsoft SMTP Server (TLS) id 8.2.255.0; Wed, 25 Jul 2012 12:13:37 -0700 Received: from orsmsx102.amr.corp.intel.com ([169.254.1.166]) by ORSMSX153.amr.corp.intel.com ([169.254.13.187]) with mapi id 14.01.0355.002; Wed, 25 Jul 2012 12:13:37 -0700 From: "Wyborny, Carolyn" To: Jesper Juhl , "linux-kernel@vger.kernel.org" CC: "netdev@vger.kernel.org" , "e1000-devel@lists.sourceforge.net" , "Pieper, Jeffrey E" , "Kirsher, Jeffrey T" , Rick Jones , "Ronciak, John" , "Brandeburg, Jesse" , "Allan, Bruce W" , "Skidmore, Donald C" , "Rose, Gregory V" , "Waskiewicz Jr, Peter P" , "Duyck, Alexander H" , "David S. Miller" Subject: RE: [PATCH] igb: correct hardware type (i210/i211) check in igb_loopback_test() Thread-Topic: [PATCH] igb: correct hardware type (i210/i211) check in igb_loopback_test() Thread-Index: AQHNapiSF3r1AxmBl0euFYGkObEHDpc6XbYg Date: Wed, 25 Jul 2012 19:13:36 +0000 Message-ID: <9BBC4E0CF881AA4299206E2E1412B62630D64753@ORSMSX102.amr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.139] MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org -----Original Message----- From: Jesper Juhl [mailto:jj@chaosbits.net] Sent: Wednesday, July 25, 2012 12:06 PM To: linux-kernel@vger.kernel.org Cc: netdev@vger.kernel.org; e1000-devel@lists.sourceforge.net; Wyborny, Carolyn; Pieper, Jeffrey E; Kirsher, Jeffrey T; Rick Jones; Ronciak, John; Brandeburg, Jesse; Allan, Bruce W; Skidmore, Donald C; Rose, Gregory V; Waskiewicz Jr, Peter P; Duyck, Alexander H; David S. Miller Subject: [PATCH] igb: correct hardware type (i210/i211) check in igb_loopback_test() In the original code ... if ((adapter->hw.mac.type == e1000_i210) || (adapter->hw.mac.type == e1000_i210)) { ... the second check of 'adapter->hw.mac.type' is pointless since it tests for the exact same value as the first. After reading through a few other parts of the driver I believe that the second check was actually intended to check for 'e1000_i211' rather than 'e1000_i210', but I admit that I'm not certain so someone with more knowledge about this driver should ACK the patch before it gets merged. Unfortunately I have no hardware to actually test this on, so it is compile tested only. Signed-off-by: Jesper Juhl --- drivers/net/ethernet/intel/igb/igb_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.7.11.3 diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c index a19c84c..ad489b7 100644 --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c @@ -1783,7 +1783,7 @@ static int igb_loopback_test(struct igb_adapter *adapter, u64 *data) goto out; } if ((adapter->hw.mac.type == e1000_i210) - || (adapter->hw.mac.type == e1000_i210)) { + || (adapter->hw.mac.type == e1000_i211)) { dev_err(&adapter->pdev->dev, "Loopback test not supported " "on this part at this time.\n");