From patchwork Tue Jun 2 10:37:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shradha Shah X-Patchwork-Id: 479378 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 2D72F140E1A for ; Tue, 2 Jun 2015 20:37:57 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752948AbbFBKhx (ORCPT ); Tue, 2 Jun 2015 06:37:53 -0400 Received: from nbfkord-smmo01.seg.att.com ([209.65.160.76]:23434 "EHLO nbfkord-smmo01.seg.att.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754065AbbFBKhr (ORCPT ); Tue, 2 Jun 2015 06:37:47 -0400 Received: from unknown [12.187.104.25] (EHLO webmail.solarflare.com) by nbfkord-smmo01.seg.att.com(mxl_mta-7.2.4-5) with ESMTP id b778d655.2b629a696940.2637417.00-2461.15388217.nbfkord-smmo01.seg.att.com (envelope-from ); Tue, 02 Jun 2015 10:37:47 +0000 (UTC) X-MXL-Hash: 556d877b34224579-cabc4f0366d90d0f90283761bf4da0c1ea9e1239 Received: from unknown [12.187.104.25] (EHLO webmail.solarflare.com) by nbfkord-smmo01.seg.att.com(mxl_mta-7.2.4-5) over TLS secured channel with ESMTP id 8678d655.0.2637399.00-1979.15388090.nbfkord-smmo01.seg.att.com (envelope-from ); Tue, 02 Jun 2015 10:37:29 +0000 (UTC) X-MXL-Hash: 556d876908f359b3-b9f7a889c3d8b48eb816ed1ea275a4447fd15ff3 Received: from sshah-desktop.uk.level5networks.com (10.17.20.135) by webmail.SolarFlare.com (10.20.40.31) with Microsoft SMTP Server (TLS) id 14.3.158.1; Tue, 2 Jun 2015 03:37:27 -0700 Message-ID: <556D8765.2030006@solarflare.com> Date: Tue, 2 Jun 2015 11:37:25 +0100 From: Shradha Shah User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: David Miller CC: , Subject: [PATCH net-next v3 01/15] sfc: Add code to export port_num in netdev->dev_port References: <556D8710.6060706@solarflare.com> In-Reply-To: <556D8710.6060706@solarflare.com> X-Originating-IP: [10.17.20.135] X-TM-AS-Product-Ver: SMEX-10.0.0.1412-7.000.1014-21582.004 X-TM-AS-Result: No--4.626200-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-AnalysisOut: [v=2.0 cv=fudrkiEf c=1 sm=1 a=MkjXnYnS3dyNWGSWLXxFFQ==:17 a] X-AnalysisOut: [=5ZTteq0x3j8A:10 a=3VnyBeAh6Z0A:10 a=BLceEmwcHowA:10 a=N65] X-AnalysisOut: [9UExz7-8A:10 a=zRKbQ67AAAAA:8 a=XAFQembCKUMA:10 a=LTE-015m] X-AnalysisOut: [D6YFPig36TgA:9 a=pILNOxqGKmIA:10 a=vfwC_5CbPLnvrZLX:21 a=5] X-AnalysisOut: [ZP1vj-mLHD7T7Gy:21] X-Spam: [F=0.2000000000; CM=0.500; S=0.200(2014051901)] X-MAIL-FROM: X-SOURCE-IP: [12.187.104.25] Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org In the case where we have multiple functions (PFs and VFs), this sysfs entry is useful to identify the physical port corresponding to the function we are interested in. Signed-off-by: Shradha Shah --- drivers/net/ethernet/sfc/ef10.c | 2 ++ 1 file changed, 2 insertions(+) -- 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/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c index 4eb6ab7..06605ab 100644 --- a/drivers/net/ethernet/sfc/ef10.c +++ b/drivers/net/ethernet/sfc/ef10.c @@ -249,6 +249,7 @@ static int efx_ef10_get_mac_address_vf(struct efx_nic *efx, u8 *mac_address) static int efx_ef10_probe(struct efx_nic *efx) { struct efx_ef10_nic_data *nic_data; + struct net_device *net_dev = efx->net_dev; int i, rc; /* We can have one VI for each 8K region. However, until we @@ -329,6 +330,7 @@ static int efx_ef10_probe(struct efx_nic *efx) if (rc < 0) goto fail3; efx->port_num = rc; + net_dev->dev_port = rc; rc = efx->type->get_mac_address(efx, efx->net_dev->perm_addr); if (rc)