Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp69026pxb; Mon, 13 Sep 2021 13:10:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIN6BEdfFBUgNznRZkNMY80fWuI8+0P1kUpaK+eIKUGfgG1BIwh0EatEG3YjvRJOjSJtqX X-Received: by 2002:a17:906:1d07:: with SMTP id n7mr14632714ejh.53.1631563825354; Mon, 13 Sep 2021 13:10:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631563825; cv=none; d=google.com; s=arc-20160816; b=vd9YEUIkMOX6zCIHaPUZUBAtqDrh9KDmbC//vHzb1LM0InLy8SkIR7wMT3LrACjhDk UDp/quhO8udLs9CDVmMFzqMfqYyUIQV2lTic8D8Dl0DoDeNrdtOZhH40Lnwb0ewTUCvQ go7dtwOhvKXTJ84k0BJ6vvPPfSUvf7VbY7ZsPRrFvrCVE5lpurMfmY4fhxVinOWwf1xd TpE+vZQAoFtm0hY4tMw2MXohq5U9FepYo/5aEmUYxPxWUbrQv/sL+qHd29p/t20/GOth XE0md76vwwu68pYrjzSU+cHVyBfT3ZL3fRIoiEygGCA2eByk+lGuhKc6GbTyjDdisEzf oElA== 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=Osv4LakmAOau/ExxR5U2684e//e3LusQP3d1JKfSDds=; b=0Xa1ybA7KGFDzLma2L8X/0nLwocf72WZeCeKnlofragpasS8W9clvsdRTYlST7s4m6 b4aH4EfkDYZbegXF0nnQUftGT8A/CqZ2krFfRXDqu9nzvPl90KfQB4sbtTgecRJBtNtF a61InemqwvKzrZnuI+ncQr0gcYOexuOUOvV7OovWJvfdntAsQf7g2n2UWRqLK5qGTLd3 ZM6SSxxxgF3WNqhWOoYu/NY5WbQpVvso4ZBYlQtOo/fj8G7O4plObzgawuYJD0czABA+ HJirWMHemZXSvdo9kfHVsMZsrUZ3S78d0Cb9smEb0NVeKe4AqX2Px2yBOkFv76ugRs9g jd8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vBcQN7+U; 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 hp8si9029226ejc.107.2021.09.13.13.10.01; Mon, 13 Sep 2021 13:10:25 -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=vBcQN7+U; 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 S243420AbhIMNs2 (ORCPT + 99 others); Mon, 13 Sep 2021 09:48:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:46600 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241504AbhIMNoE (ORCPT ); Mon, 13 Sep 2021 09:44:04 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9B9B261411; Mon, 13 Sep 2021 13:30:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539852; bh=zpfgxZbSPzwZL3ixUmhk9wudjdehuhoecLi6fhw0R7Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vBcQN7+UpB8CfgY5StWLDrl6WNyeu/RZ6nrbx5+pCtamSAlnDhhi4mjzFNpEEit3Q aBNZtTuJa8R3Oh7/BTRjx/UWDnyW7QqDAoreKGKcwIp8SK457Gx9dOmvGm0jxXJW6v +i9/ZF1MrEaDshaFfmF5F0dWibnLWGPZguB50T80= 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 5.10 187/236] mmc: dw_mmc: Fix issue with uninitialized dma_slave_config Date: Mon, 13 Sep 2021 15:14:52 +0200 Message-Id: <20210913131106.737091449@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 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 8b5d542e20f3..7f90326b1be5 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -782,6 +782,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