Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1900078pxb; Mon, 13 Sep 2021 07:48:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUMGJbp+0aQn36MWnYIsi4Vykc0+n09i4ULpovc81UE5YPA9EKXmMlRdiVkRYhRzZ8DDuq X-Received: by 2002:a17:907:75da:: with SMTP id jl26mr11890617ejc.300.1631544494899; Mon, 13 Sep 2021 07:48:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631544494; cv=none; d=google.com; s=arc-20160816; b=Y0TLnb1mXxrSLMviitRC+mSbYxNyaJ73qObi97BPAIf0oAPjD/3tBMxMYChMvyY+jj eRoySC+8aRC2pSgzwxc9kb+Q4mHUpkDYB0IC6uqKuTUFrxjyZKZFE1OEkn6A99R+Dw7j 5t62dsVcOK6tiYVxtt/gulWiQ7tblBz7NHzSd/Z9qBxwSWhRe7OOXfzmA9/OcROevvMy yT7TGBvGp/5TKq08enOwZxYYrmjX8N+qF4HAeOPo3Xuy0wYwBj2LLIDqmFr7VymKhVDk 4a9vZTPvLRlUz3FLYZASZqigk4PwwyT3Lxu6/7pKVx15TXOYfYQqLButGfoKbxTL15SA o0AQ== 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=tn9qDdbmj6TKDGoZ9wnwP6iZa6fAYSU2BTrIqxmivhY=; b=qErcS13s2qSodT3f/Wzm8wJhTeS1Ma1e/3zVuGeDLc5eDJy/bZ42GnRa10buWSbAo1 shE+Cou5ALNEfNX561k/CFmAKSag0Ei+bHMevxqVWVWpYIIu+lo5sR1UMQopKLXfEOoS zjaX2jqy4K8++GSuYSpYar1PdLoapl1+1/slG7yHnaplZZl8N6uy+FZeldIP6bc1/WSs DkKvb0ekarMDrCFVKMjzqkuqac3F6Xi4OK+K/hae6kUTATVho9OQE0xUwD+WPJ+PAJyL 3yBUWSfp4OzuqywXZsXD1WdPeGp2koNxuNE1Er5kgfP/7Lw6CZIXo7RBcZmyq++7/gqJ ZxpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GOVAhqcF; 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 a9si8190645edj.313.2021.09.13.07.47.50; Mon, 13 Sep 2021 07:48:14 -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=GOVAhqcF; 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 S1344221AbhIMOoA (ORCPT + 99 others); Mon, 13 Sep 2021 10:44:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:57352 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346404AbhIMOjQ (ORCPT ); Mon, 13 Sep 2021 10:39:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3D80E61C13; Mon, 13 Sep 2021 13:55:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631541316; bh=lzEmA3ysy6B9sMS3RA3opSH32cDcC+hLtfcK0nWzAlM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GOVAhqcFwSrb4gvmpDbCKwDxVPNFROPP7ZM7sJyn98upexvNQu2IupI1fQZuPgDB6 2HuMA/emdD/Xs8btRs4VDzTIJz866GCLD3lxHJ8iaZvyTmJmAdaGWuzMwgAObEeW7W s658j9kdKapF1PhRT2S3YQKaMEZhd/EbbYI9Z+Ek= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Adrian Hunter , Chunyan Zhang , Faiz Abbas , Peter Ujfalusi , Vinod Koul , Tony Lindgren , Ulf Hansson , Sasha Levin Subject: [PATCH 5.14 250/334] mmc: sdhci: Fix issue with uninitialized dma_slave_config Date: Mon, 13 Sep 2021 15:15:04 +0200 Message-Id: <20210913131121.850050071@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131113.390368911@linuxfoundation.org> References: <20210913131113.390368911@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: Tony Lindgren [ Upstream commit 522654d534d315d540710124c57b49ca22ac5f72 ] Depending on the DMA driver being used, the struct dma_slave_config may need to be initialized to zero for the unused data. For example, we have three DMA drivers using src_port_window_size and dst_port_window_size. If these are left uninitialized, it can cause DMA failures at least if external TI SDMA is ever configured for sdhci. For other external DMA cases, this is probably not currently an issue but is still good to fix though. Fixes: 18e762e3b7a7 ("mmc: sdhci: add support for using external DMA devices") Cc: Adrian Hunter Cc: Chunyan Zhang Cc: Faiz Abbas Cc: Peter Ujfalusi Cc: Vinod Koul Signed-off-by: Tony Lindgren Acked-by: Adrian Hunter Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20210810081644.19353-1-tony@atomide.com Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/mmc/host/sdhci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index aba6e10b8605..fff6c39a343e 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1222,6 +1222,7 @@ static int sdhci_external_dma_setup(struct sdhci_host *host, if (!host->mapbase) return -EINVAL; + memset(&cfg, 0, sizeof(cfg)); cfg.src_addr = host->mapbase + SDHCI_BUFFER; cfg.dst_addr = host->mapbase + SDHCI_BUFFER; cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; -- 2.30.2