Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1757737ybh; Tue, 14 Jul 2020 06:38:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZSo1vDa8ihQsA94NDJCBt6Tys7LDSE8MJJC4vQQQkuoEV3huP8A0IKv2xs2uFsaZtoSg3 X-Received: by 2002:a17:906:144b:: with SMTP id q11mr4275592ejc.511.1594733904170; Tue, 14 Jul 2020 06:38:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594733904; cv=none; d=google.com; s=arc-20160816; b=otyqhMl8K9xDcNptjlBq8kJpkZM4UBVV2BySN+sFxlFRPIXjPtJRyH0pVgdjs9SslB stbCvIOfDlsJBU6W8AxJsINWtR+uNB3xi/Feq/r6KDbM/osXkdW4l48/bSzF+NMdS490 PBG6ejpexN3o2HySop63iwgAh9FZ/pAT/GdAihUhnHDK+kHVBGiJ3VgtmHxxURO+dOd2 F8ejP4gd8wrxTjBLKaYOtCN0CmFZJaW9fNFmrQ53UWaelP6+xVxQz0qwhKCymShHiP70 o109vvD7j+q2WOC6HbiGzCEKX6AdE7QCVwT4cYQDSJ/SCkdNN1jZ9UAFMCqGpcIRB7M0 5vxg== 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=ixj/jZ56hm0bF7hqa7akQcinT7l/b8BHP7QxrRVcIn0=; b=oeTdCJODw/Cb2Rllgplw87kjh43oPB1yRXuS2dXKPuuvx370KyWYDEKWwLPP7MkY6p PSJUKj5I9eVOq3dEgRKtNZ1n8hmpgcHomR63cgO6hBTSNHk2eb+U4voosDd42prM5cFM kI2YFmy33/6sGgW6K9hBUcVvV0nq/zE4aeV6hN3zCb8vSCeIAjfg+2vtMu9oOaiEmDlW 5/P7TWbf2jwMmzYv20VmtSWDlRLuwiqoOn1XV6siFnMGfjHlcCsVbD/+ETphV+wvfRMT oA2WscAqLd7yNeuGwEM6eOlWWlALLvPTLQ+H9gVNoDpKCbBzD6OQffb2Dszq2VFmufQt yYrg== 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 c15si11224938edw.265.2020.07.14.06.37.59; Tue, 14 Jul 2020 06:38:24 -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 S1728618AbgGNNfW (ORCPT + 99 others); Tue, 14 Jul 2020 09:35:22 -0400 Received: from inva021.nxp.com ([92.121.34.21]:48266 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728200AbgGNNfS (ORCPT ); Tue, 14 Jul 2020 09:35:18 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 5F0CE201024; Tue, 14 Jul 2020 15:35:16 +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 52B032001B2; Tue, 14 Jul 2020 15:35:16 +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 128A6205A4; Tue, 14 Jul 2020 15:35:16 +0200 (CEST) From: Ioana Ciornei To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, Ioana Ciornei Subject: [PATCH 4/6] staging: dpaa2-ethsw: disable switch ports are probe time Date: Tue, 14 Jul 2020 16:34:29 +0300 Message-Id: <20200714133431.17532-5-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 The MC firmware will enable the switch interfaces at DPSW creation without waiting for an 'ifconfig up' on the switch interfaces. When this happens, the states held by the Linux software vs the firmware are not in sync. Make sure to disable the switch ports at probe time to not encounter this issue. Signed-off-by: Ioana Ciornei --- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c index a1917842536e..f283ce195c1e 100644 --- a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c +++ b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c @@ -1672,6 +1672,10 @@ static int ethsw_probe(struct fsl_mc_device *sw_dev) goto err_free_ports; } + /* Make sure the switch ports are disabled at probe time */ + for (i = 0; i < ethsw->sw_attr.num_ifs; i++) + dpsw_if_disable(ethsw->mc_io, 0, ethsw->dpsw_handle, i); + /* Setup IRQs */ err = ethsw_setup_irqs(sw_dev); if (err) -- 2.25.1