Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp219853pxb; Mon, 13 Sep 2021 17:29:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxblYlCJygf/lIdiejeCy8C81L8hTAhfdY3hAGRf5XOSTQI8nY5zflSLLxi4ICVXoNGWPrk X-Received: by 2002:a17:906:27cf:: with SMTP id k15mr16458712ejc.123.1631579361264; Mon, 13 Sep 2021 17:29:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631579361; cv=none; d=google.com; s=arc-20160816; b=us7LFWDUxH9q953860jYIR7KBI3u0utZgefZHgbPO2WVEdHkprdx2G2tt9C2nA8CQ+ e8zNV0MCaf5x4x6ZHq4R4Bdks2jfXqYg6kE9sVKxNIEe4nJlkJg3oSQT371l1sZAzXYV c6bI9z8BRXfaydNjazH13oqK8eHnjI/AdovN4FiM+GxQujyFrPD9dBzh/jWqmINQRnjy ASyBrvk7T5UvXWp4Jdk2H2kTn8QbV6N1GoyLWjxtGVu90NJb6g9KMakkAXtk5bPFASbB 27R6o0cQ0VZSJLDs51zDNqlvs41RPpPWrKHrOQqZpuvbdc3y1cU8lj3KLa0Xr/huR8A1 g5KQ== 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=hIe1u669hAHgZ89wfYoa+Omz6nc6Xs7gx2gCMO0KXNc=; b=Kv2WB2YUoMZjivXzAIJNEgPgzt41N0/6OZlZ1kK8aa5WjD9gVUM5zNcp/nlJUv/79B YlvhHq/QTsqN3kebcLRV7yA+ZJ6u8rebr7SAhLy2Pf2NVCF2GgnxFQm5KLj2L6V4Y7+H 6G6rRi6TWt5ffUsy+ourjmqQ3ykEvtOwXVLGsqOfeit2fmUxw57rPR5Dqz2+NqCsMYHN p1YWjDaRm80Pvhm+YTjjAuxUCPrkOF+6hYteseBENhIbn1gsW9i+7BvyOCvcZIGi9/18 hAJFQAis7p8vbflgOhOwMnQxnQd25H7BkWupWWgpPcQAmCVOasmsAEpQYEQ0MLU277hc QchA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hhNOM5+o; 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 e2si11720488edm.608.2021.09.13.17.28.57; Mon, 13 Sep 2021 17:29:21 -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=hhNOM5+o; 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 S245208AbhIMONq (ORCPT + 99 others); Mon, 13 Sep 2021 10:13:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:34056 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344062AbhIMOLD (ORCPT ); Mon, 13 Sep 2021 10:11:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 01A8361A8E; Mon, 13 Sep 2021 13:42:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631540523; bh=d69G92w1gNBSlc7SiIYfUlecn3jjswFDR4nFNoQwg3c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hhNOM5+ok0oIi90kpq8iSuSTSD07/4CYeoH+pwFEUmCjbGrOexiYhjiGb2DMfthoO C9o/9lfDpiEAmuh63riFbeRtdIcXWMuIU3CzlnugN68uJ9MLguhbwCTQ9zstUxVEe2 MYth4yLipRMbI+iWUw/qg8yzZ+r2YQWcdxYb6GLE= 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.13 227/300] mmc: dw_mmc: Fix issue with uninitialized dma_slave_config Date: Mon, 13 Sep 2021 15:14:48 +0200 Message-Id: <20210913131117.020657771@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131109.253835823@linuxfoundation.org> References: <20210913131109.253835823@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 c3229d8c7041..33cb70aa02aa 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