From patchwork Wed Jul 25 19:05:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesper Juhl X-Patchwork-Id: 173244 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 049272C00A4 for ; Thu, 26 Jul 2012 05:05:59 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750846Ab2GYTFm (ORCPT ); Wed, 25 Jul 2012 15:05:42 -0400 Received: from 1010ds2-suoe.0.fullrate.dk ([90.184.90.115]:23193 "EHLO swampdragon.chaosbits.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750743Ab2GYTFl (ORCPT ); Wed, 25 Jul 2012 15:05:41 -0400 Received: by swampdragon.chaosbits.net (Postfix, from userid 1000) id D7D319403D; Wed, 25 Jul 2012 21:05:39 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by swampdragon.chaosbits.net (Postfix) with ESMTP id CEC609403B; Wed, 25 Jul 2012 21:05:39 +0200 (CEST) Date: Wed, 25 Jul 2012 21:05:39 +0200 (CEST) From: Jesper Juhl To: linux-kernel@vger.kernel.org cc: netdev@vger.kernel.org, e1000-devel@lists.sourceforge.net, Carolyn Wyborny , Jeff Pieper , Jeff Kirsher , Rick Jones , John Ronciak , Jesse Brandeburg , Bruce Allan , Don Skidmore , Greg Rose , Peter P Waskiewicz Jr , Alex Duyck , "David S. Miller" Subject: [PATCH] igb: correct hardware type (i210/i211) check in igb_loopback_test() Message-ID: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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(-) 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");