Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3511333pxf; Mon, 15 Mar 2021 11:09:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4qam7ND8T+p6R2gqBM5bR2j+1MCOEaKRsU9fmUGuvCbJi9yupdAfwxGBbrrW901bjU44s X-Received: by 2002:aa7:cb0a:: with SMTP id s10mr31234804edt.36.1615831772424; Mon, 15 Mar 2021 11:09:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615831772; cv=none; d=google.com; s=arc-20160816; b=AB8GccKS6Mar+om3Mo+TKyEcg1XxzQ5WnAGdW7JWNeKuJLKgaVVbnh97Wgbhnln665 FZeWnltTF8PMxw53MwH+NRMvNBocnlNvS38TIT0kE2r2ZyY5Xi20OA3mCVNgkNA8D+je eWalwmnm38TYL7AbwqKlrpCr2P30NarlSzvvDlHcnnCnBoewCCx1hOFyw3HdNLtxAC8q YM+8lbBl2BgjgCmoKiMF3PPmUacPWsbWLyXjMMHa6LQgNgNIhL/Vacnraqk7oaAszA9I 6mRXCkkHFl7fzfylnwMorNgrWbn/3z/V7blUKyR8brmKnraxxMVLewP88xiBFo+x5yyw Zhsg== 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=G/PVgZcnOIXTvb1wlIhBL03jbbiLE22eYU+RSFtOHgc=; b=KnO99ewDeR4HTuWezcawFvt5mgvvdV/43MP4FR2RF1o8/048AbyNvE7bqHoGAPG4J8 gReG6WY12qRPr1Xfd3+ew2AC2LF2/Fa7clkYp10ZFEWW6KjY9ZnAIrdoPHMmAZUJstUr uFzGzwvLcAhf3NfzgKKLPothKfYDPKbhdtuUMhFK0wVvOjjBQl+6tPkeptNxNfNRjgpL F/ms2EsLoi44Eau5qx+LQpDsHq4Jtvpo68e+e6xseZsX8hx97hpCKqSsKP+WeTEBtXAx ngVhOKa9vOCn5dOZ/VdHsSbEK/FpjrysvZyA+rUhZjqA+Jb1TxvmHf8R3bYbyn7kkB3e WlZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DN1dxSAM; 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 gv19si11124001ejc.109.2021.03.15.11.09.05; Mon, 15 Mar 2021 11:09:32 -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=DN1dxSAM; 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 S234206AbhCOOJp (ORCPT + 99 others); Mon, 15 Mar 2021 10:09:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:35534 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232145AbhCON5v (ORCPT ); Mon, 15 Mar 2021 09:57:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3564664F12; Mon, 15 Mar 2021 13:57:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816671; bh=ywmH/FuJgV0z5wgRWqx9jwCb0RCD3L65oqObmzsVKOw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DN1dxSAMjqmIuRxj1KACvmYhKv/gThxKoEWeY4+Uc5U+q9F+O+zJwGqL43hbQ+cC8 5pk3VBpjzGX7N7eK9JMJgSnj7zZGCC21Slb80IwbRUFmXrBKqUwBB9+OB+fdyWUExS Qk8gyggZxejqMnAiBi6FeA6ObwwjG4O9Jw+ksKuY= 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.10 046/290] net: stmmac: fix incorrect DMA channel intr enable setting of EQoS v4.10 Date: Mon, 15 Mar 2021 14:52:19 +0100 Message-Id: <20210315135543.480687188@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135541.921894249@linuxfoundation.org> References: <20210315135541.921894249@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 @@ -124,6 +124,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) { @@ -523,7 +540,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,