Received: by 10.213.65.68 with SMTP id h4csp2136887imn; Sun, 8 Apr 2018 20:38:36 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+oJIbNngephTQHKPZoA2U+q6if5ELd8WaOa+v8kthWpnUhsXvGr45x8SKoN11azvKe/2wJ X-Received: by 2002:a17:902:6590:: with SMTP id c16-v6mr3807509plk.292.1523245116071; Sun, 08 Apr 2018 20:38:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523245116; cv=none; d=google.com; s=arc-20160816; b=s/+YsEck3jijaoQGQb3+NEcTMEjQaEO/nF55eYL4NmG55S+EQBOGPG5DL2koajYxgr KHjNf5k7v52xrJ0mnTEFBZTdXlE98WtzSknPUAeC5nH1C0maTiL/l5ve7Kq6r9LKmDcZ 9e5eXoQIyommjE16rwN9M/jXfW1Gt+1skTr13Ludne+cGCq5mSrilOKHsRqZn3AWSbWv BjeIsRvsmGQJdjnf8z5qQaG08R+pc3DZrV01imr1AHUohQvdhQD84n406u+8Vu7+FIZK InlTwK4BUhLZ2KJgbdWyraRcK5RO810ZgUY4hd8MwfLAoqyHMXiMVprUntdep4BHcJ8w Z5vQ== 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=MEaNsmUJXJdGXA+MMGMlexOKQbmfAYmK3SLC4prvcKI=; b=TZvCECp2tJ7nr8evAHm0N7pAAxrvxxkRUgonbCvEgUYk2DetXvPA6BGwFEZaCA8QoI 77LCb9PobieSEv/m02X36X/LRyjm1ataHGwITINnih8/zk7Qht3eGJELjg7pdf9LgWfP YjFFcEXkaNiWW0ghFV5C5aW7tTqOkJ5vlRNduHXdB6F7RQ0qYUVZyryI8Od27IvCSnCr vddFiz6luxmdVg/gWONxjxPDHOLhk3uh1kgpP2mxBPznSUkayhnB3tCCrNeDCw7vsD0F dtqPpytz7BFdv78CAZibOx2oQxBzW2A/dFDCUD65bvZrfSdbIaEUpYRfLwfeJImGFmc9 +q7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=WHQHvVHq; 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 c10-v6si14012837pla.602.2018.04.08.20.37.59; Sun, 08 Apr 2018 20:38:36 -0700 (PDT) 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=WHQHvVHq; 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 S1754712AbeDIDdP (ORCPT + 99 others); Sun, 8 Apr 2018 23:33:15 -0400 Received: from mail-bl2nam02on0107.outbound.protection.outlook.com ([104.47.38.107]:21664 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754377AbeDIAVT (ORCPT ); Sun, 8 Apr 2018 20:21:19 -0400 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=MEaNsmUJXJdGXA+MMGMlexOKQbmfAYmK3SLC4prvcKI=; b=WHQHvVHqhGW23/6tKqZ85PyeiubIMaZ16DNEegqYBs849ifcliklf7Msa+Sm/mmafAH0tabx2LvbtRWT5xFBDOKtX0d5XEjG2zaRyyBWZkI0RMAE00Wpl2ax/+dMMwPdDN1d12jH7cqIHEJm1gtfz71+yiHCKUYVT2UgvXeKeqo= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1125.namprd21.prod.outlook.com (52.132.130.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:21:14 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:21:14 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Niklas Cassel , "David S . Miller" , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 177/189] net: stmmac: discard disabled flags in interrupt status register Thread-Topic: [PATCH AUTOSEL for 4.15 177/189] net: stmmac: discard disabled flags in interrupt status register Thread-Index: AQHTz5hgYIt0pRETqkyMk7UjG2VWmw== Date: Mon, 9 Apr 2018 00:19:08 +0000 Message-ID: <20180409001637.162453-177-alexander.levin@microsoft.com> References: <20180409001637.162453-1-alexander.levin@microsoft.com> In-Reply-To: <20180409001637.162453-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;DM5PR2101MB1125;7:qnsEOJSh/AeSIedMqW5iYMZWwWuDQWw6Pd6VoAMKCSB+EmeelOFdimzfc/84h7ZgEUCO7SY2xiYiO/6agZm4+hIJP9qQwPcpBhGDo2FKmW6XTXDSNjEkQJxKyLNZ+c1OqX2XZBhclw1NSuCqI2ICKJsjJZDrPD9GQ4fkVTV5xTqoanoFdalGrl/FZqhiTIMpb9TX5FZHpg8VgT2WQm+NOW8qro+HXb2rPtZsdpNGxAcaCWwDIcoXI/YD1Kzs7DNs;20:0lP3Cpcn7LbT64gaRxBxPgr+icYOcWp5Z4X/PBwIWQzwxIg9zuwBajJndlWpXiD0nt2twGxEMXV2GQN8azKH/is2+6xap7WbLUqvKmYIISlwV2fEOXeODdMzpT7VbaoYTIYJ8FxemJojR0KlYzgv7+d1+DShc4jooSracROxACs= X-MS-Office365-Filtering-Correlation-Id: ac69e1c5-1932-401a-5e8d-08d59dafce11 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(48565401081)(2017052603328)(7193020);SRVR:DM5PR2101MB1125; x-ms-traffictypediagnostic: DM5PR2101MB1125: 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); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(3231221)(944501327)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DM5PR2101MB1125;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1125; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(376002)(396003)(39380400002)(39860400002)(346002)(199004)(189003)(105586002)(7736002)(8676002)(97736004)(81166006)(59450400001)(106356001)(81156014)(305945005)(14454004)(66066001)(1076002)(102836004)(5250100002)(478600001)(2501003)(2900100001)(22452003)(72206003)(68736007)(26005)(86362001)(8936002)(76176011)(6506007)(6116002)(6486002)(186003)(5660300001)(3660700001)(316002)(54906003)(110136005)(25786009)(2906002)(10090500001)(6512007)(3280700002)(6666003)(10290500003)(53936002)(99286004)(86612001)(3846002)(6436002)(486006)(4326008)(2616005)(11346002)(107886003)(36756003)(476003)(446003)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1125;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: KE2RoVHQRu7M8xOD9C6LAUKKnmYhwkQjhdX95855iivcnyHXcs1uGkcDPPCTPFaw6EDMUMh43PPgY/lzU8YFgBvN/EtHdGHUgWAp4KG/sSksTJT4jiFKB9F1jMAQL27Rk4+6/hfbSHIBlHqTleWu1kPymzy0kMg/8iW8cbP52hHoDSbGGzs9p8BDCigT25kAOGjjF0bOWAeZO5/xCj2KDrnGElpfIB79abvnOBu98QoGSgqOmOKecAYv5275Dr8ikhEUOej5GirUDXjDMqNRLwllt7VnE3rHqX8igAOYMNj4UFriPmXZMIePv61jml0LRc+1cKoKXuI3SkUJwpigA/tPVGArTQVBGw1J4edNWqjTJdD+Mb9HlM7LBuPXxsXDbDHrAdTEGQtyFl+ru1cxKxaSHLRZb/jEFVZdIY8lMIs= 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: ac69e1c5-1932-401a-5e8d-08d59dafce11 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:19:08.8145 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1125 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Niklas Cassel [ Upstream commit 1b84ca187510f60f00f4e15255043ce19bb30410 ] The interrupt status register in both dwmac1000 and dwmac4 ignores interrupt enable (for dwmac4) / interrupt mask (for dwmac1000). Therefore, if we want to check only the bits that can actually trigger an irq, we have to filter the interrupt status register manually. Commit 0a764db10337 ("stmmac: Discard masked flags in interrupt status register") fixed this for dwmac1000. Fix the same issue for dwmac4. Just like commit 0a764db10337 ("stmmac: Discard masked flags in interrupt status register"), this makes sure that we do not get spurious link up/link down prints. Signed-off-by: Niklas Cassel Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/ne= t/ethernet/stmicro/stmmac/dwmac4_core.c index f3ed8f7853eb..05b3e7dd9821 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c @@ -562,10 +562,12 @@ static int dwmac4_irq_status(struct mac_device_info *= hw, struct stmmac_extra_stats *x) { void __iomem *ioaddr =3D hw->pcsr; - u32 intr_status; + u32 intr_status =3D readl(ioaddr + GMAC_INT_STATUS); + u32 intr_enable =3D readl(ioaddr + GMAC_INT_EN); int ret =3D 0; =20 - intr_status =3D readl(ioaddr + GMAC_INT_STATUS); + /* Discard disabled bits */ + intr_status &=3D intr_enable; =20 /* Not used events (e.g. MMC interrupts) are not handled. */ if ((intr_status & mmc_tx_irq)) --=20 2.15.1