Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3515305pxf; Mon, 15 Mar 2021 11:15:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdNfM+523aGawHg94KNKSQNPobQDqmHirGm03iBW3Ogl7q0G2FI2Um6ESTGcT3FQuLWsfo X-Received: by 2002:a17:906:7fc4:: with SMTP id r4mr24796359ejs.81.1615832110953; Mon, 15 Mar 2021 11:15:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832110; cv=none; d=google.com; s=arc-20160816; b=iS7EQDEI3rs6/JRVKWqdcjwpsO4m9noqW+iaE8Lwaxm9JMNzraBGOg2dBOnbCO+1wt 79FHCrEIeTNAjM3L3vglG5nLSE60LcYbuSk12oPUK7SzLEyl9VeKm+Fj68ZFZ4VrhFrO tHMdG6aJAOLG7NVlG+mQZ9YD/sexueQaT1tRuqA/ypjd0Ft1+eHJOob/OJNw25vyoyR9 QxG1ox1F6UgIIChcY4kBTjLflhyO8Na0JbeUbWaYbdaZ5jFK7XAOpHvk2k0RtGwylcZw L6M3VJVplF5ZcxtgOT7xp700B5A4F1OQLWw6jxAZIGxf2lHb2RBS5JqoK0lEsczVH46S whOA== 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=/3QyNeH31r+H4yJCV5vDB681r2tlem/LqYTRIgx7xb4=; b=lgCmS5IB+NoHsFB0caJeEaV97clV6s+SLu/3bG0Fgyc+6+cndtTJ4XNMJLRjcXRUwr hESdFyCjzP0m5hVZOr2TsyjHOUa8bpsofUmArfpbInnwwEVuR/s3sozVEK7n+E+LKyMf CKxgioKHT2CUSRxzwkIue125FXFlJA6VEfXmzdLb23uIc0Rdg8JzmoXNXQ0AbMLVnO9b nLKM5fHwqvilCVxaGWs/ZCaobyk/imiL0mMuUd76kuuYmb0qtLnCsT3s+eXtIITtaaL4 MFAofGqCOlJO7V/u+ZuJG8fQA+Ukr4XMdi7L0qK70NlYjE5BnWJLPIP43Y6HBd6vTEYP GcIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xTkKFEB1; 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 hp15si11634332ejc.548.2021.03.15.11.14.48; Mon, 15 Mar 2021 11:15:10 -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=xTkKFEB1; 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 S236261AbhCOOMk (ORCPT + 99 others); Mon, 15 Mar 2021 10:12:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:37476 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232405AbhCON6y (ORCPT ); Mon, 15 Mar 2021 09:58:54 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0DE3864F23; Mon, 15 Mar 2021 13:58:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816712; bh=fp7/jORTTkB/zysu0rIqrNVPgesZ/3LVIgjFsONMG5I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xTkKFEB15R+H5vBD2N+oYUHWo86q9/De8+c5aVMHqxbA00jYL+xY233cslQo5x82N /h5tPymcybc9wK6sWfVFRduEt01sHiQXdTdy2bDW0Vde4v8iFNi1yVytRf2Mk54w3p Jewrz0UI4Jj4AfeyK3q1AIWL5AZwgL7KQTQ/npzA= 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 4.19 021/120] net: stmmac: fix incorrect DMA channel intr enable setting of EQoS v4.10 Date: Mon, 15 Mar 2021 14:56:12 +0100 Message-Id: <20210315135720.696640625@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135720.002213995@linuxfoundation.org> References: <20210315135720.002213995@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 @@ -119,6 +119,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) { @@ -461,7 +478,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,