Received: by 10.223.176.5 with SMTP id f5csp891783wra; Sat, 3 Feb 2018 12:43:32 -0800 (PST) X-Google-Smtp-Source: AH8x225jW6RQ3iONUHh7LTeBHeSX0jyk5p1zc4pdH+SL/lCp6an2W111xlOoYy4seM4AOk5ES7M1 X-Received: by 2002:a17:902:b492:: with SMTP id y18-v6mr30192972plr.437.1517690612027; Sat, 03 Feb 2018 12:43:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517690611; cv=none; d=google.com; s=arc-20160816; b=yA3RzDjkggFcjPudAmCAqSNGc+/HFLgdwbHBvPZ2UmkqEDKabKzpLfoR1U9L9eZlO0 D63psXAGP3C+8YBwKMmOGQP1JCMknIGFYmjgnKYXofAPZacaUpo3suK7Ysxs0S5J5dla BdN6qkGmDWs3lBS1t4TI9CCeEIVYyzoJeYMskhwKnPUtLDzDDPaX4ZHvRZx+cxaoYF8n 7Dxbcy53f4rvCGPgaI27hEz3+srqbsw2q3GDVmOqFynvB+IG2lTzGsTN5H5nYKn+s2dx oxD9aBn2oiC0HEPHqPwL4hI14bvAKwMu7QfPtREErWseKL///la2Kr1J1P0uFojhSg9b rtDA== 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 :spamdiagnosticmetadata:spamdiagnosticoutput: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=rnKxLOx/zsH4HUxRjoqiYUm8tERpL3hV0z1nI4AF994=; b=Z4fB8gHD/Z3aHjCHQpB1ZKqwEso61/Fe02LsMfxzHMgXqLBSza4JPfp2t8ZiFbwYtl lwxQoliiq4R33oRTSasUNrAFe4dL5Et1X1eDrYWEQIcN7p5vwgzBC/NgR+5clh9TDuBf nCdgUn5OxKt56dhCXHQPrT1HiIA1RwndGhM7o6ASz9wnt4Im2PspbzSiTHcoBu29GxTD zgpDRlMUJBqmhTAf7CrRvBcPTKkY8/VeDwPBL5wb39vO7WrNN7RWJv9OgAUvZ5YZDomd c1YGNv0cxNqXUZ/B5JxhTj+1BiSAAuQDJ0hpmsSt/T3PAM1yGpNLNT+5scR2gUCMtKwN z8UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=aOvSEKuv; 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 z15si3344660pgv.91.2018.02.03.12.43.17; Sat, 03 Feb 2018 12:43:31 -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=aOvSEKuv; 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 S1754448AbeBCSa3 (ORCPT + 99 others); Sat, 3 Feb 2018 13:30:29 -0500 Received: from mail-bl2nam02on0129.outbound.protection.outlook.com ([104.47.38.129]:64103 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753325AbeBCSEy (ORCPT ); Sat, 3 Feb 2018 13:04:54 -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=rnKxLOx/zsH4HUxRjoqiYUm8tERpL3hV0z1nI4AF994=; b=aOvSEKuvD5Kk+azkbLOJ2jN6h8UjVQb/O7RPZSZ1TV3w81e0PI+cAvk1isVJP4Zb5nCdC5x1g8MN8XmC4jI59mjLco4SahfjVGuWv52kT5wYrXBO6hANC7DqwqJ14w4SdxmN3JwSuA6TSLdzwS8ycvngj3G+ktTiqp+j+yVFex8= Received: from BL0PR2101MB1027.namprd21.prod.outlook.com (52.132.20.161) by BL0PR2101MB0993.namprd21.prod.outlook.com (52.132.23.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.485.5; Sat, 3 Feb 2018 18:02:55 +0000 Received: from BL0PR2101MB1027.namprd21.prod.outlook.com ([fe80::a8da:b5d9:d710:9bf9]) by BL0PR2101MB1027.namprd21.prod.outlook.com ([fe80::a8da:b5d9:d710:9bf9%3]) with mapi id 15.20.0485.006; Sat, 3 Feb 2018 18:02:55 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Jakub Kicinski , "David S . Miller" , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 109/110] nfp: always unmask aux interrupts at init Thread-Topic: [PATCH AUTOSEL for 4.14 109/110] nfp: always unmask aux interrupts at init Thread-Index: AQHTnRkHcgXo84zfpE6I3Ad8FrDJ+A== Date: Sat, 3 Feb 2018 18:01:35 +0000 Message-ID: <20180203180015.29073-109-alexander.levin@microsoft.com> References: <20180203180015.29073-1-alexander.levin@microsoft.com> In-Reply-To: <20180203180015.29073-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;BL0PR2101MB0993;7:gAVnzOJiYmtZU60qDOaStGvYjzQgLUdgurS4RauiWDJGB0iBhiUcNDsRGIHjymFSTn9TrrL7XzD9GkG8pTQBi0nPAwgG89xo57+WYZ5HCuAqfX3VKkXi07Di/x5MD480vzL4dhJR1cKk1kHabi9Qc8w+92p2a9GvxACdTseWrMF1oDS0+iCWiuiiwUADarGX6VFGDXWyjXB8yTV8kvohD2wzl6PL767lm/qJCmU/jHjp3nncgbmDokLlX8VnqNpH x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 329e730b-4933-459e-a549-08d56b3059f1 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(2017052603307)(7193020);SRVR:BL0PR2101MB0993; x-ms-traffictypediagnostic: BL0PR2101MB0993: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(6040501)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231101)(2400082)(944501161)(93006095)(93001095)(6055026)(61426038)(61427038)(6041288)(20161123558120)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011);SRVR:BL0PR2101MB0993;BCL:0;PCL:0;RULEID:;SRVR:BL0PR2101MB0993; x-forefront-prvs: 05724A8921 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(39380400002)(39860400002)(376002)(366004)(396003)(189003)(199004)(6436002)(186003)(3660700001)(8936002)(105586002)(2906002)(6346003)(6116002)(3280700002)(3846002)(97736004)(6486002)(1076002)(2950100002)(6666003)(81156014)(86362001)(575784001)(76176011)(102836004)(2501003)(5250100002)(26005)(68736007)(10090500001)(81166006)(8676002)(59450400001)(53936002)(5660300001)(22452003)(305945005)(107886003)(7736002)(4326008)(86612001)(36756003)(99286004)(316002)(6512007)(10290500003)(72206003)(6506007)(14454004)(478600001)(25786009)(106356001)(2900100001)(39060400002)(54906003)(110136005)(66066001)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:BL0PR2101MB0993;H:BL0PR2101MB1027.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) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: yaZ8lLQ+9d8OFXmy/+g/kAV4ATnV7Vbw8KdAocuxgnRpSum0c9B73AtxM96puxWVwcI4jzSGFa1W1gxR5tTEEw== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM 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: 329e730b-4933-459e-a549-08d56b3059f1 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Feb 2018 18:01:35.5033 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR2101MB0993 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jakub Kicinski [ Upstream commit fc2336505fb49a8b932a0a67a9745c408b79992c ] The link state and exception interrupts may be masked when we probe. The firmware should in theory prevent sending (and automasking) those interrupts if the device is disabled, but if my reading of the FW code is correct there are firmwares out there with race conditions in this area. The interrupt may also be masked if previous driver which used the device was malfunctioning and we didn't load the FW (there is no other good way to comprehensively reset the PF). Note that FW unmasks the data interrupts by itself when vNIC is enabled, such helpful operation is not performed for LSC/EXN interrupts. Always unmask the auxiliary interrupts after request_irq(). On the remove path add missing PCI write flush before free_irq(). Fixes: 4c3523623dc0 ("net: add driver for Netronome NFP4000/NFP6000 NIC VFs= ") Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/= net/ethernet/netronome/nfp/nfp_net_common.c index e118b5f23996..8d53a593fb27 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c @@ -568,6 +568,7 @@ nfp_net_aux_irq_request(struct nfp_net *nn, u32 ctrl_of= fset, return err; } nn_writeb(nn, ctrl_offset, entry->entry); + nfp_net_irq_unmask(nn, entry->entry); =20 return 0; } @@ -582,6 +583,7 @@ static void nfp_net_aux_irq_free(struct nfp_net *nn, u3= 2 ctrl_offset, unsigned int vector_idx) { nn_writeb(nn, ctrl_offset, 0xff); + nn_pci_flush(nn); free_irq(nn->irq_entries[vector_idx].vector, nn); } =20 --=20 2.11.0