Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3323955pxf; Mon, 15 Mar 2021 07:09:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhlqXM90gDClXiS25Dz1JnCKOBd885Iiu3pngCbmXdDYmGJcW7AY7Meys4iZ71yDfs3vRG X-Received: by 2002:a17:906:73d5:: with SMTP id n21mr24242233ejl.8.1615817344837; Mon, 15 Mar 2021 07:09:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615817344; cv=none; d=google.com; s=arc-20160816; b=eE0ErV9Tc38pcx3DhQgnINESaOlAziB17M6bNB1xw/gL4QJfIG/5TuBdvvTDghz16m nWG1OL5O2INFh2vYF20eBxEpJe6HhQBWq8lu7KXzZ0Usqi9PPmdMHjGWWb0RvGlLXD6c /81MVFrZiSLpQ4xMUd9gerbEMzUZekl52Q0XXVPZteLi4SM8rw8WpczxyEelg/6f734Y PcbawpyYKqP7uYv21PiljuGQhMeqC6KZ+gjDOKs1qAoqRYVdaRfCbD65fubeosQR+90l CAtosXuWHHUoKwcfEpTUDHf3iDhUKUKOZ1EYm15xY/bJugDLpQ9T8BoTYnWS4pnzagWA 3PGg== 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=N6p4ZWt9yyuphHPOg+G6P6moi4sMZ25SRNtj6E3Qq2/YEYxfhS+Wecfn/wRvMAhLrc NAGCNoolBFyXJG/VDmS5keHTdeQYvilICxeD+nMtWmzGuVyE/iifdLu3BjtkWiVwCTih ttz3ZMGSNuCHzIdR39wV30z1AESTZ0ZpvGsGQBGuPwx6N2b/9Rt3wedP7DHWxlHJn8xM aMz/wUbhnbZubzV42HTDBU5CCG3rnWmL1l3QxXSJzvG4p9tNl6BkTyTvopr49lvojKz2 cGoHUA46NO/wpifmCy/KG7SRtvj1zax3eAS9YGWEtvF7nDSEKMalNcOvn1DHWICbZ0Uj AaWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="m/186hsF"; 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 t8si11289597edq.232.2021.03.15.07.08.42; Mon, 15 Mar 2021 07:09:04 -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="m/186hsF"; 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 S235033AbhCOOG7 (ORCPT + 99 others); Mon, 15 Mar 2021 10:06:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:35462 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232206AbhCON5z (ORCPT ); Mon, 15 Mar 2021 09:57:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5343764EF3; Mon, 15 Mar 2021 13:57:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816675; bh=ywmH/FuJgV0z5wgRWqx9jwCb0RCD3L65oqObmzsVKOw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m/186hsFnnJ8Id+Bq1eMxPvzmfiOV4YGS9866NECSJwM+pq/cAEDJ+PNzPkCbHexO PYB3ikPzJUmz8ALLLp79Ke7QMGcCZLl/H0d/31WlM/azW2uMeS5r7B/yfrkw4dvJwj fTOAmOotOL1a1LX/QtggosVTVs54WYGAJ6h2GBII= 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.11 057/306] net: stmmac: fix incorrect DMA channel intr enable setting of EQoS v4.10 Date: Mon, 15 Mar 2021 14:52:00 +0100 Message-Id: <20210315135509.577263897@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135507.611436477@linuxfoundation.org> References: <20210315135507.611436477@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,