Received: by 2002:a05:6520:4d:b0:139:a872:a4c9 with SMTP id i13csp2566852lkm; Mon, 20 Sep 2021 18:54:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwne2LOWtbh4TABRcNdC+Y/AQXfqC8WI+gaJViOHY0lZdoLp/YvBcmXG7T0bXZA6dZQJbKO X-Received: by 2002:a5e:d618:: with SMTP id w24mr12785508iom.178.1632188901697; Mon, 20 Sep 2021 18:48:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632188901; cv=none; d=google.com; s=arc-20160816; b=HkXuONp8lI37wwwTCDeMY3mHiiIY/gYJr0F4WVk09cL/Wr2jdPDEHURDZhDR1riFNZ 3/tFVnL2ybKfGQNNU3Aoi+G/LY/Bwez4WvKEkhSKb06LCBeAcndDYly9mSb362+WFA/y 68bsS3U/tsEqACH5z112kpPL661psSNTna0qUXQKM7VR0GSJQu5SBKzYCQfkvgLKEQBu uBz/CnrDIOsNhI0H5quSxWUZnQsO52O8rKBF/DEhdplEopx5rIVpVxQFrH+eX+1UmJu7 OWqhY89+I96PDMXlS9OWlmrzqUJUEZ5y6JFdcUs6fJs2xwWz5h7qTBqgvoDS0L77IxrH 1mbg== 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=QNIMDjijJ+qWHZg3LlHloS6pv0bzcEgPCq49kmWZL9A=; b=OPmvcuPPcGLifDjFnA2LrZapGC2WQKSNki9T+KYsh1cgV91ZtSK7jzDz4hCbCflCUE DzyIKGPtSZvzKzbHUAuKRqTqwvj+rEYZ/0rEYJGG+ZeppXTGGCZntn2Lt1+aSFZsfWNM q/5MUHRwM61DzNVSYIZMMwg4QH5IjDqa4Is3pI386VJdgc7ZLxFmPTJDc1qmWgY1mGFA knIbwuLtVEPOmNtoejGgdXLIcLc3qrPNm92NlF9ZGzxCtIv8wtmxAx23P25q7gp7anyP t3nnkeOppV18xzslOrmYLYnTQzTw/LpWnW+lbz2qTcAz2FVu2Zy6TB2UvfYfioWdwHz8 dQOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jRxuQZQv; 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 l15si17880403ios.94.2021.09.20.18.48.10; Mon, 20 Sep 2021 18:48: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=jRxuQZQv; 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 S1348852AbhITRlz (ORCPT + 99 others); Mon, 20 Sep 2021 13:41:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:46194 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352362AbhITRjO (ORCPT ); Mon, 20 Sep 2021 13:39:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DCB3B6138B; Mon, 20 Sep 2021 17:07:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632157659; bh=dLC7/2nxNSTWWLV+3lpYKwsSqm5LejDyBfS6eAdo/oY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jRxuQZQvg6z756vkEnUSX97LEiioXTSHTXriR/GhKNM6BqjZzfQB1hXQxpJOrt/+n 82HluJKjbwVPKyPY0pwSpxfd+hmiBnqUx08FvFUfnGTCoDhSW/H7LTWBRGofUsfa0p ODLOZx2czJgKpPaJRrhzZYaZtypB4BBKospr/6r0= 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.19 092/293] mmc: dw_mmc: Fix issue with uninitialized dma_slave_config Date: Mon, 20 Sep 2021 18:40:54 +0200 Message-Id: <20210920163936.417097474@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163933.258815435@linuxfoundation.org> References: <20210920163933.258815435@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 8e09586f880f..e3991df078ef 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -808,6 +808,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