Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3505502pxf; Mon, 15 Mar 2021 11:02:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSZtXeEaobWZSBHdVc5N3bjhxdYVubalNTqziIKvbUqDWPF5DEPx4h/nulP6JX8zT+7o2O X-Received: by 2002:a17:906:144d:: with SMTP id q13mr24110991ejc.458.1615831339920; Mon, 15 Mar 2021 11:02:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615831339; cv=none; d=google.com; s=arc-20160816; b=if6gyfndDOEBli+hQD6frwmSJNkjzzqRhX/5aD88Ld1kLZtaxWz12C90ToYQcCSq7v HflWXMao+0XUXgLzKOAxQqzjJHX9FlBZu2fpDquTdIZVcKbEMunFoFBE0Et9A2sOEBBB v8R6BDKvMDQFi2FmBybl6JKDRDqnCfRKuiKpljy18rBCI1hxwKzkf4LQlVvhclc/5Tr2 qquIMSNYFuh8S6dhkU2VPEWINgxVP/HmYgRDQwp18HHqvouf0A7FxYsob6/w38FBjCD/ 649VuL1pQLfCkp2cAtqhj3omAaYMrurFuxwfYuxu7mjp9zWz+jFxKqORFGXuPNoxtWQt 7GpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LZydwgH4rN5jdFg3JJlnsKJJJhXfVOYAnKhBIHN6xFc=; b=j90d2GJIlXbeIOtF/evWvI3dokJ6qVKOM0zOl5/8U+zFVdxoYwpnluMBZT63R1ljI3 oijY+mWwNcJ7uXEtzaKgRdSh5WBHCLKBWN8YhX848t85+soZmZRO787xS7348NElTeay MhJEpzO4maUXO7qgbKz/xTcrVnhGN3lx3GMBp2UoJqfHXe8OyUa7+1wJdJU5lIA6muRK 2wsw+15zIGT+wK6lKhNXEEUDgKBVnr+ggWzkCfVTLxwthMWGRiYd4xLNxRU/VyZjfjx/ yJPl9Nulzs6CCpHXu7KR2q6jVQAzqid6/lUByEObA6Ffcd4Gi6aW1NatiRvfxhtxp+0o xuvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zKqAA9kH; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gb35si12588792ejc.351.2021.03.15.11.01.57; Mon, 15 Mar 2021 11:02:19 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zKqAA9kH; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231450AbhCOOGH (ORCPT + 99 others); Mon, 15 Mar 2021 10:06:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:35186 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232022AbhCON5f (ORCPT ); Mon, 15 Mar 2021 09:57:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F2F2D64EEC; Mon, 15 Mar 2021 13:57:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816655; bh=VsRhpx73SLuFDzj2JVba5V4pgJr3pzqJsmdSYxGztfE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zKqAA9kHjB4sCGfbf+2vv4tsOGFuT10SuJ/XM9SIePMSq4QoYyKo3wR9LWPxv1Jla 9SlI2vKL6+JKIjJe9Ahk/GKg5o5INP7HHpG5vEf48jH1YDn8l1dOX7TcwRdjDyXo36 swvcc7R6MFFG9xDeXn5V3Zd7zcWMB5cjX7pDHOcw= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ong Boon Leong , Ramesh Babu B , "David S. Miller" Subject: [PATCH 5.4 028/168] net: stmmac: fix incorrect DMA channel intr enable setting of EQoS v4.10 Date: Mon, 15 Mar 2021 14:54:20 +0100 Message-Id: <20210315135551.273688670@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135550.333963635@linuxfoundation.org> References: <20210315135550.333963635@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman From: Ong Boon Leong commit 879c348c35bb5fb758dd881d8a97409c1862dae8 upstream. We introduce dwmac410_dma_init_channel() here for both EQoS v4.10 and above which use different DMA_CH(n)_Interrupt_Enable bit definitions for NIE and AIE. Fixes: 48863ce5940f ("stmmac: add DMA support for GMAC 4.xx") Signed-off-by: Ong Boon Leong Signed-off-by: Ramesh Babu B Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c @@ -116,6 +116,23 @@ static void dwmac4_dma_init_channel(void ioaddr + DMA_CHAN_INTR_ENA(chan)); } +static void dwmac410_dma_init_channel(void __iomem *ioaddr, + struct stmmac_dma_cfg *dma_cfg, u32 chan) +{ + u32 value; + + /* common channel control register config */ + value = readl(ioaddr + DMA_CHAN_CONTROL(chan)); + if (dma_cfg->pblx8) + value = value | DMA_BUS_MODE_PBL; + + writel(value, ioaddr + DMA_CHAN_CONTROL(chan)); + + /* Mask interrupts by writing to CSR7 */ + writel(DMA_CHAN_INTR_DEFAULT_MASK_4_10, + ioaddr + DMA_CHAN_INTR_ENA(chan)); +} + static void dwmac4_dma_init(void __iomem *ioaddr, struct stmmac_dma_cfg *dma_cfg, int atds) { @@ -462,7 +479,7 @@ const struct stmmac_dma_ops dwmac4_dma_o const struct stmmac_dma_ops dwmac410_dma_ops = { .reset = dwmac4_dma_reset, .init = dwmac4_dma_init, - .init_chan = dwmac4_dma_init_channel, + .init_chan = dwmac410_dma_init_channel, .init_rx_chan = dwmac4_dma_init_rx_chan, .init_tx_chan = dwmac4_dma_init_tx_chan, .axi = dwmac4_dma_axi,