From patchwork Fri Jul 24 04:10:43 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: 30172 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 3ED28B7079 for ; Fri, 24 Jul 2009 14:11:07 +1000 (EST) Received: by ozlabs.org (Postfix) id 2E98DDDD1C; Fri, 24 Jul 2009 14:11:07 +1000 (EST) 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 ACD0EDDD0B for ; Fri, 24 Jul 2009 14:11:06 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751877AbZGXELA (ORCPT ); Fri, 24 Jul 2009 00:11:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751855AbZGXEK7 (ORCPT ); Fri, 24 Jul 2009 00:10:59 -0400 Received: from qmta15.emeryville.ca.mail.comcast.net ([76.96.27.228]:48723 "EHLO QMTA15.emeryville.ca.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751838AbZGXEK7 (ORCPT ); Fri, 24 Jul 2009 00:10:59 -0400 Received: from OMTA11.emeryville.ca.mail.comcast.net ([76.96.30.36]) by QMTA15.emeryville.ca.mail.comcast.net with comcast id Kg3L1c0010mlR8UAFgB0RF; Fri, 24 Jul 2009 04:11:00 +0000 Received: from localhost.localdomain ([63.64.152.142]) by OMTA11.emeryville.ca.mail.comcast.net with comcast id KgAk1c00334bfcX8XgAmag; Fri, 24 Jul 2009 04:10:58 +0000 From: Jeff Kirsher Subject: [net-next-2.6 PATCH 12/13] igb: initialize mailbox function pointers prior to phy init To: davem@davemloft.net Cc: netdev@vger.kernel.org, gospo@redhat.com, Alexander Duyck , Jeff Kirsher Date: Thu, 23 Jul 2009 21:10:43 -0700 Message-ID: <20090724041042.30709.72711.stgit@localhost.localdomain> In-Reply-To: <20090724040700.30709.31473.stgit@localhost.localdomain> References: <20090724040700.30709.31473.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 igb driver is currently initializing the mailbox function pointers after the phy. This causes issues as the phy init will return from the function early if there is no phy present. To resolve this I have moved the function pointer init to a location prior to the phy initialization so that serdes based adapters can also make use of SR-IOV. Signed-off-by: Alexander Duyck Signed-off-by: Jeff Kirsher --- drivers/net/igb/e1000_82575.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 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/e1000_82575.c b/drivers/net/igb/e1000_82575.c index dbbd72f..6158c0f 100644 --- a/drivers/net/igb/e1000_82575.c +++ b/drivers/net/igb/e1000_82575.c @@ -172,6 +172,10 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw) size = 14; nvm->word_size = 1 << size; + /* if 82576 then initialize mailbox parameters */ + if (mac->type == e1000_82576) + igb_init_mbx_params_pf(hw); + /* setup PHY parameters */ if (phy->media_type != e1000_media_type_copper) { phy->type = e1000_phy_none; @@ -221,10 +225,6 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw) return -E1000_ERR_PHY; } - /* if 82576 then initialize mailbox parameters */ - if (mac->type == e1000_82576) - igb_init_mbx_params_pf(hw); - return 0; }