Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2319688pxb; Mon, 20 Sep 2021 18:43:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhuv8tEC3cZo51Im5KOuT+MzfkUqWLokebPqgMCi5B1BmDKuaAviPQa4ImYfQ71g/kKhXw X-Received: by 2002:a02:3b1b:: with SMTP id c27mr21322844jaa.103.1632188581257; Mon, 20 Sep 2021 18:43:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632188581; cv=none; d=google.com; s=arc-20160816; b=G4QswbqPHTugeJtHs+wKAyI2nNJYiZaWMSnAb0daev2hZrBgwwlIa57Ow99c7SEQL3 3p+HPzheODZl5HdDMTPQVbOUg8rm74WyRQXQDS5Ybv2Y+5zbRT3y8YPNH4kChDAot+fW AvyHvG+w/7YxQ59wN3d6pCR0VSx1ADVPpOqDTWZFoB2ZzFNjOG10BDA8KGbYm+FXlGpd xlH8hsWkESdpx2vFU/jg9+uYmeMj2ynJLoLAGqxqePPp4XWSqvjTcfMvexbll3Bmd8lq fiT3s3Ri10l/nzpQMiNznoItD1UL+WfOzsbBCbCtgyHkyRlghl/XiWj/NzEr7anpiMvS 2Wzg== 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=KsIsK2uK3OShBPbZb/VG+auLG1SGZwZCSZogM3TCNGA=; b=Npi1JEiWCLbvPD1DtpUBoF/UiHs08K9top/kgkSa608FprE9qiD2htrkZ3u0NRKsKX u9VS+wvPIG/03jivJgdaufD6WXxTdZsj2xZYqgRXZJTJMEyOyYlhmWXt4dotX0gsC0Na OVmQfqIvgKP64684dAgqcGyt/3F3qARVjmGEqJkE9u1Rk7KgyT/tleeZd6NTTHDeZMTD 3DO1JwWFfavvaX813hWOJXFErWa7M+sx2GbQbAmvbXkCiBrMcuEJMYafDK2PgIbKCNaR t3Hs8W3wBiBBb0iq+PZZXEfXgveUJ/yiojjU/+vO5A1lCH1AL4OPqoyT1dp5XUZbRYAk ZryA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wawWn2lL; 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 129si4662715iob.34.2021.09.20.18.42.49; Mon, 20 Sep 2021 18:43:01 -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=wawWn2lL; 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 S243426AbhITQwm (ORCPT + 99 others); Mon, 20 Sep 2021 12:52:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:38900 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244043AbhITQt4 (ORCPT ); Mon, 20 Sep 2021 12:49:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 42FC76126A; Mon, 20 Sep 2021 16:48:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632156508; bh=zBOa4a2NLtFvjXQzzYMCfKFizliRUmmgMZgOtvlFwvg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wawWn2lLyLCFYkeRqKTC00aFll6ky8+7SkJAkKgtjmQ87v2p2Gj6cr7MX2z656nDV k/ukurOjTDMgi1WEwnnP/289eVf6PFHy9VIBrRoYtSDPb2iMAcazw1q9R5fXEQjM7L b7rGY/fq/bTkjybFKKSqVzWbe/MPGlQiOREZ84UA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shawn Lin , Jaehoon Chung , Peter Ujfalusi , Vinod Koul , Tony Lindgren , Ulf Hansson , Sasha Levin Subject: [PATCH 4.4 060/133] mmc: dw_mmc: Fix issue with uninitialized dma_slave_config Date: Mon, 20 Sep 2021 18:42:18 +0200 Message-Id: <20210920163914.613873335@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163912.603434365@linuxfoundation.org> References: <20210920163912.603434365@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 c3ff0189d3bc9c03845fe37472c140f0fefd0c79 ] 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. For dw_mmc, this is probably not currently an issue but is still good to fix though. Fixes: 3fc7eaef44db ("mmc: dw_mmc: Add external dma interface support") Cc: Shawn Lin Cc: Jaehoon Chung Cc: Peter Ujfalusi Cc: Vinod Koul Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20210810081644.19353-2-tony@atomide.com Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/mmc/host/dw_mmc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 9eff3b41a086..03ac8d599763 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -701,6 +701,7 @@ static int dw_mci_edmac_start_dma(struct dw_mci *host, int ret = 0; /* Set external dma config: burst size, burst width */ + memset(&cfg, 0, sizeof(cfg)); cfg.dst_addr = host->phy_regs + fifo_offset; cfg.src_addr = cfg.dst_addr; cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; -- 2.30.2