Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp68031pxb; Mon, 13 Sep 2021 13:08:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzT575hy/tJHKkgT+2iXJMzipQuyYKR55OTo5qo2hEv4Q4ENHCbwZiAtbk9yIdT7cmqh3gT X-Received: by 2002:aa7:c2d3:: with SMTP id m19mr15424204edp.57.1631563729328; Mon, 13 Sep 2021 13:08:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631563729; cv=none; d=google.com; s=arc-20160816; b=Bbn3+CSAir4hiT4/Vum3jHlcl6pdEZeKtwxADdmLsIc2HmsTNzlqWkhFPw/Wx3Y1kb Nqnzi9l7i8rzRzpCXWqv+NzPMLgu7CzgVqWEh1hKW4qIVqnE3OHSMp9xmkbpZ+MXhuiQ Crdga2b+T64dzeQ5Kb8MBFfPedEXeGz/94NUMzoPCoRmOyeMZmPZLjDOJihAalAr+x3z JmVOT8soq3XgHF66odfjKRvSPm/1hZH1YenwXrr6BtOcL1duexPQdpy41D8LoUqhZiB4 ZCckYbjbIGme+3qlwZk/rJivaBDcEuL3q2alLzLWXmvUBFnQ5Lic7AdOO9kLRl10M/P9 XPiw== 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=Wth9XXSQTYMAhWIOtDNaCKCsvlgIhW09B5tRKanrTRE=; b=n3q04Y6U62HkRd37SsgcYSMAdzinZ2/AONQ4QCCU7Yu/CUjudmGdFNX6fQqIUFEUae iQQLRF3Pw+gWlNAXTqHa+I7F0LAAxeFahjs827W0G73Cc5R724QPEwMAKOYz7zjSdsRn 1+cp9sRXko9seEed/SDzt6HHaD3gHlRkZ14GBcNNyA5YTgr+BCWpQiTbmy7IjVXiwF3k h7bcbbKRRTZ0dfLb9blhS7JKsYhbOEnBxn/Lf/l1iGT54BzR3OKj3NHMWWW+9+fKp5kG Db1MZgL1Cbbz+32dOrq/4K0cEGb3UhSqKgjIJHE1erZfYvPhOqwPiYyOIFOHPaLf3a1g CU6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PAu98zaQ; 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 bf24si1298812edb.7.2021.09.13.13.08.25; Mon, 13 Sep 2021 13:08:49 -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=PAu98zaQ; 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 S243977AbhIMNsf (ORCPT + 99 others); Mon, 13 Sep 2021 09:48:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:46598 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241272AbhIMNoE (ORCPT ); Mon, 13 Sep 2021 09:44:04 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 020F061425; Mon, 13 Sep 2021 13:30:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539849; bh=EgO6sYQfPjUJniOvDyLLumb8s3xF/Xj+KqRk5GXmljY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PAu98zaQoNOmTfoor4t6Emfl9sG9OuWDjwiIUL3xos0h0tkLSedayrAXS00IL4RA0 Wj6bjDUZVyfRoKD7Vy3PYjPjuYkT4l/AgsNZARi178zstgwZPYMn03JirGQlPsFBGx oOypm9Cg0/7w3oBGJZlmaJh4+gKEPKDQGpJYS6Bc= 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.10 186/236] mmc: sdhci: Fix issue with uninitialized dma_slave_config Date: Mon, 13 Sep 2021 15:14:51 +0200 Message-Id: <20210913131106.705012633@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131100.316353015@linuxfoundation.org> References: <20210913131100.316353015@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 6cdadbb3accd..b1e1d327cb8e 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1223,6 +1223,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