Received: by 10.223.185.116 with SMTP id b49csp1104027wrg; Sat, 3 Mar 2018 15:40:33 -0800 (PST) X-Google-Smtp-Source: AG47ELthTK6flkRX93izRwIDbXR3xPxipITCDQ5X5aXZaK4p3ybtpUdWV8fF1t91nZEz4DLs2lz5 X-Received: by 10.98.204.132 with SMTP id j4mr10538210pfk.35.1520120433702; Sat, 03 Mar 2018 15:40:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520120433; cv=none; d=google.com; s=arc-20160816; b=hbO0jn6GfmYbmQUr+zKP1Ezi/0n7SRnf+hgIohjZhQ/aQFlwUorj5I8oe4pBfxZZI+ pRURUsJFlbkN5bSUOiZnm2pCwPcHIH62NlSJW4z/ad778ostqN3NhOVuem3Z3F92Ad4B mSGuvToYQgsUNMs87QNylhCzYQedWGp4IVGLpCwDQSaRa3l1g1xX0ix5f6e+++bOA4/V d4Wp0lsiBhWab1GvWW5Mwsc3WDY9eJ17iJraUBP0WFdl4c6sLGmcGyfM1s3Uw+jkVKYM tDKys1kbELKWKwBoA3hWIRc4z7FonGhkuAPyk/MsRKkiKMLSF9qe2M9HtFe58q4E59gF sh6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=b58UHOQWPPWwzJTRxwc5py6EF4xeXg1z+iUimTaw/wc=; b=ufnyyM1C/k7xz0MQQFg0FB9g3VT4CQhExT6xSB515HZisJtXjUraaXS9FCnD4kmqrB 31upNKGDf5aa0VYF/hjI1l0AUnrJZYi32j4eEC9nsMqBrR0S4rXSqi6CtH6o43Xqn8CM l8WnNmTpSsDQ2SMcVnOU3nrwx72I5z1f9kanU9zzCIPUDroKBmqn8UfAwXieLIuY3yxH GqhS4qySTxV6ol8CjhEQT8UH1kZu5+yy33UGF0C4sFKNJYz2s/OInEI4VeDT3fw6ZqBg 9MB+GNlqIbp0itqlG0E1Z246B98BmBbwlOdNK79lTXKR1x2BpnvCtlBDwvw3WGXFhdfz Ltrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=NtfhXK4O; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y10si6150849pgv.456.2018.03.03.15.40.19; Sat, 03 Mar 2018 15:40:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=NtfhXK4O; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934186AbeCCXjT (ORCPT + 99 others); Sat, 3 Mar 2018 18:39:19 -0500 Received: from mail-sn1nam02on0112.outbound.protection.outlook.com ([104.47.36.112]:45329 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934331AbeCCWfK (ORCPT ); Sat, 3 Mar 2018 17:35:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=b58UHOQWPPWwzJTRxwc5py6EF4xeXg1z+iUimTaw/wc=; b=NtfhXK4O/sHmsdKVCQXt/MXT7OCjLGtp82Gqh2OWSak1ND7vaN+/Q0cIFMPHtgq0vVRNCsonwyAntL4X4surWRBFrUutvr79/vTIPcQ1lWYYLPQMDLvva8EaCxOD4SKFarWEl+bU+hK8BqXVrkU0I/LuGG/OlI9badyle3o8+s8= Received: from MW2PR2101MB1034.namprd21.prod.outlook.com (52.132.149.10) by MW2PR2101MB0924.namprd21.prod.outlook.com (52.132.152.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.588.3; Sat, 3 Mar 2018 22:34:49 +0000 Received: from MW2PR2101MB1034.namprd21.prod.outlook.com ([fe80::1d56:338f:e2b:cec0]) by MW2PR2101MB1034.namprd21.prod.outlook.com ([fe80::1d56:338f:e2b:cec0%3]) with mapi id 15.20.0567.006; Sat, 3 Mar 2018 22:34:49 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Mitch Williams , Jeff Kirsher , Sasha Levin Subject: [PATCH AUTOSEL for 4.9 131/219] i40e: only register client on iWarp-capable devices Thread-Topic: [PATCH AUTOSEL for 4.9 131/219] i40e: only register client on iWarp-capable devices Thread-Index: AQHTsz8Nkxq46vLsbUS07ZsmeRa17w== Date: Sat, 3 Mar 2018 22:29:12 +0000 Message-ID: <20180303222716.26640-131-alexander.levin@microsoft.com> References: <20180303222716.26640-1-alexander.levin@microsoft.com> In-Reply-To: <20180303222716.26640-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;MW2PR2101MB0924;6:5N1fr+yTWYmh6pxYheg//p1vt8XH/B4ljuRohUy7+9ZjPsxkcdAhBpLZ7MqPYMJ4QbWoUB4O+W8dAj4uPKoBhYlF0G6EtEkjiAR508ML9SnWktEhUue1aizcgT7PLN2P+0afpdF2osK6UyvxB32PQfJskAL9LdZkEO6gagIKumo6vCjFiyXixCAIrfylyaq5aVkm1dwV8a9GHTl5Yf+rdK3FjTmNqmd8xu/xqF+oPN70/Ew71Zu9f6fr3oOFUIAxmSr12h/6TfmCEF9Bgk8RnkKkNvB2m3seJcfOGCcfQzgRiy0BlzsO35fBHi085fNkkZ1xECRnFcnHNWa2HlG2/CzlQsI9eYb4AmeHf5bREBw=;5:dRWgOevao52L8AU33SdwYgZ0nbRWBaCbsrxfAa5wdLnbu4lXxwY0dFdFBRuSn+eo3U9SomPPr+2FTfczlt6di+jjiw0Mq2ZR6xwS/VIYcoML/9KMuIk9SYQf17Yvg1PDwAQysqvhkvcO1fSC5/cWYspLkBnsH8CB7LP/vHMHe0o=;24:Enjt8ui+k5bWZeO41usIt313/KfVsfXlWHwYIJNhJGMknDGyX+GMOkyQNUuS+jHfZixn4i0lfy2Kev4GbFhE++zHMcZCmypcJlvUfv0m+Pk=;7:9MKMUKN1q09WWq259FHCdcCnDhrpQg5Sv1dO2mgJU15oEeT0YeDlL8HXX556Xj7N59P6DG4qwPY8rXxnEf4JPernqfeoP+UQsOEY+KsqoEhRf7Jpiv/KDemxMi9Y/v7ovkoyv6MRbTg4EjoyQlhFNUJIU4M3iE7x87eIhqW007nlAWuLOexaXqQzus5kC56gkLy0GDUB+D3lDdVeESvgCgGVltOlBQeo2UmP6ZO84IY0cJCxQWlgmg4ZevWIaOGP x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: f9b370d5-cc9b-497c-0ef2-08d58156f94a x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603307)(7193020);SRVR:MW2PR2101MB0924; x-ms-traffictypediagnostic: MW2PR2101MB0924: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3231220)(944501244)(52105095)(3002001)(6055026)(61426038)(61427038)(6041288)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:MW2PR2101MB0924;BCL:0;PCL:0;RULEID:;SRVR:MW2PR2101MB0924; x-forefront-prvs: 0600F93FE1 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(376002)(39860400002)(396003)(366004)(39380400002)(189003)(199004)(102836004)(2950100002)(10090500001)(6666003)(316002)(26005)(186003)(25786009)(2900100001)(2906002)(54906003)(22452003)(110136005)(97736004)(6506007)(59450400001)(7736002)(4326008)(305945005)(5250100002)(5890100001)(86362001)(2501003)(99286004)(68736007)(72206003)(53936002)(6436002)(6116002)(3846002)(5660300001)(66066001)(1076002)(76176011)(14454004)(36756003)(3660700001)(6486002)(86612001)(81156014)(8676002)(81166006)(10290500003)(6512007)(8936002)(3280700002)(478600001)(107886003)(106356001)(105586002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:MW2PR2101MB0924;H:MW2PR2101MB1034.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: f9b370d5-cc9b-497c-0ef2-08d58156f94a X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Mar 2018 22:29:12.2132 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR2101MB0924 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mitch Williams [ Upstream commit 004eb614c4d2fcc12a98714fd887a860582f203a ] The client interface is only intended for use on devices that support iWarp. Only register with the client if this is the case. This fixes a panic when loading i40iw on X710 devices. Signed-off-by: Mitch Williams Reported-by: Stefan Assmann Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/i40e/i40e_main.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethe= rnet/intel/i40e/i40e_main.c index becffd15c092..57c7456a5751 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -11142,10 +11142,12 @@ static int i40e_probe(struct pci_dev *pdev, const= struct pci_device_id *ent) round_jiffies(jiffies + pf->service_timer_period)); =20 /* add this PF to client device list and launch a client service task */ - err =3D i40e_lan_add_device(pf); - if (err) - dev_info(&pdev->dev, "Failed to add PF to client API service list: %d\n"= , - err); + if (pf->flags & I40E_FLAG_IWARP_ENABLED) { + err =3D i40e_lan_add_device(pf); + if (err) + dev_info(&pdev->dev, "Failed to add PF to client API service list: %d\n= ", + err); + } =20 #ifdef I40E_FCOE /* create FCoE interface */ @@ -11323,10 +11325,11 @@ static void i40e_remove(struct pci_dev *pdev) i40e_vsi_release(pf->vsi[pf->lan_vsi]); =20 /* remove attached clients */ - ret_code =3D i40e_lan_del_device(pf); - if (ret_code) { - dev_warn(&pdev->dev, "Failed to delete client device: %d\n", - ret_code); + if (pf->flags & I40E_FLAG_IWARP_ENABLED) { + ret_code =3D i40e_lan_del_device(pf); + if (ret_code) + dev_warn(&pdev->dev, "Failed to delete client device: %d\n", + ret_code); } =20 /* shutdown and destroy the HMC */ --=20 2.14.1