Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1757922ybh; Tue, 14 Jul 2020 06:38:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8Of1YSiDhGzcYaK/VbzI+1z3A+FcK8LRc5la1T04rrf39wcytDawLe48pHH9prfZoNc9l X-Received: by 2002:aa7:d848:: with SMTP id f8mr4452233eds.329.1594733919683; Tue, 14 Jul 2020 06:38:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594733919; cv=none; d=google.com; s=arc-20160816; b=V/Q3GwTHrYd5nGzhpmWrTS/zDhIgJVDsKpyVBNNO3R/zM1rEPluw4mBTfxtQ1a4hDF JFx9/Dgr+510MaO0kWIP3oFIz083YhrR2isXItk6VRhlqswDOGIk1mGk8g+X+dIUxHvu SoT7coFKe3K1odMIclkKkRu6AlbuwVHbDsfTHXVEBgpIJ5a2wequshKlG8Qj5AiN4M95 gHFyG+fAsimHU+NTecDSnyyog7DbPNUTKjPu4+GVYbxyy4E3j1ldtKCIT1i9COEbKLxU iylLMYOnwbxja9xrLv3F+FaHpmRKcg4qQMv5Jp/W8j0Ck3Skucw12gdcmctayTEy0MiS lMmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=mZVxcgd9UVWrniBxfCKW01Snrt+m4ZKebpROgDebftc=; b=ob7PIHhE27FRvhOO1bOohZSE6mdL2OdtW/X5D1CSzBrCnUO0IKGsUB3EiysnefzlGP nFDXMV4j3BFB+hOkRAr9C1gsy3+hj8eHCJBF3EvbqcQrLeQC7WT9iIZNUTP5ENsRwM63 7TuiAbZ3J9k0uaTVEbv1q6znuZw/KesLA6q5hI71r/+u53auayhHqgoee1bMRQLi6Exi ZiLH2i7u2Ey0pa6yCrEKCCTlowes+Q43coQHqz5aqFWOOKYDejIbDNTdyM1q8Ye1kBnm /x2YcH11TA8iYWKyfduGCEmQTMJcTzyciWtCCIX6tK6UiF1FNXJzee0YxgTwArd/F/dw gn4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x24si10942692eju.623.2020.07.14.06.38.15; Tue, 14 Jul 2020 06:38:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728560AbgGNNfT (ORCPT + 99 others); Tue, 14 Jul 2020 09:35:19 -0400 Received: from inva021.nxp.com ([92.121.34.21]:48250 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728049AbgGNNfR (ORCPT ); Tue, 14 Jul 2020 09:35:17 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id BE765201014; Tue, 14 Jul 2020 15:35:15 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id B298B2001B2; Tue, 14 Jul 2020 15:35:15 +0200 (CEST) Received: from fsr-ub1864-126.ea.freescale.net (fsr-ub1864-126.ea.freescale.net [10.171.82.212]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id 747FE205A4; Tue, 14 Jul 2020 15:35:15 +0200 (CEST) From: Ioana Ciornei To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, Ioana Ciornei Subject: [PATCH 2/6] staging: dpaa2-ethsw: ignore state interrupts when the interface is not running Date: Tue, 14 Jul 2020 16:34:27 +0300 Message-Id: <20200714133431.17532-3-ioana.ciornei@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200714133431.17532-1-ioana.ciornei@nxp.com> References: <20200714133431.17532-1-ioana.ciornei@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Link state interrupts will be transmitted to the DPSW object even though the user has not yet issued a 'ifconfig up' on a switch interface. Don't act on those interrupts since there are of no interrest. Signed-off-by: Ioana Ciornei --- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c index 46aa37093e86..b57bc705c2ee 100644 --- a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c +++ b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c @@ -445,6 +445,12 @@ static int port_carrier_state_sync(struct net_device *netdev) struct dpsw_link_state state; int err; + /* Interrupts are received even though no one issued an 'ifconfig up' + * on the switch interface. Ignore these link state update interrupts + */ + if (!netif_running(netdev)) + return 0; + err = dpsw_if_get_link_state(port_priv->ethsw_data->mc_io, 0, port_priv->ethsw_data->dpsw_handle, port_priv->idx, &state); -- 2.25.1