Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp44959pxb; Mon, 13 Sep 2021 12:29:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgV4FXsLjKxAwZD1AOQvefXQEho/aI5UvT9KHVvS31zxtfIe/nLOyECtp9pyqLdZJFydaI X-Received: by 2002:aa7:cdc8:: with SMTP id h8mr6125641edw.272.1631561362621; Mon, 13 Sep 2021 12:29:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631561362; cv=none; d=google.com; s=arc-20160816; b=PIRah0K8Ofjowpk3YyHszuJXm0obT7G1fO88u1d0XkDbEoFYGU+ezed6hxEcFYESsD Q4NpWRPedILmrjuQoENLSDhNgQei4lW9UzmiN3s+hpYdlA7RzDRs/3nNbtCVhMbS327a YDPPBoVoSHTLVqpIFUXUAmgmfy/bHpHVy7BHEuCRAmXRHx2d5G3cW8SYR8VoTHNXPdiY h8+XHqiNQsm2vWTh2N55fhb0CDadgNaq+tNVzVsiiWqN23gkLYliKM7yMKhd9QGnJ36D rxLFnuywYPyKV7Cbp+6aYkqtUHIRPihiqO2rzzErRmEqaxSyNaPpyuPwnLw7FPKuBY2I Lz9A== 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=daPHBWyr/fYY7Xhn8OmkpNDm7ikZ5r9cb02m48awJ1M=; b=AlfY/TPH2oG7R48U6sR4zWd2164Wm9uA4c9hOhyjaMUPIT7pF94ghaA/HLFwEjRsn+ Tjv3eTYbzrB1aqh0rq1xJljiDEvNN4od7LoBIULQItFQKcfjzA4bymkH9QGlhFU5IV0t qu2oxZTfGkIUn9qKnEpExA82dCQySvqAdVAo/dwjW/JOe2AqX9uOMV988UZ2zaz+ycls AHDwn4nlXm+AG/tv+XMduYcNeTDqNRNNDgT5z4cHtkEFBKu078PFxr0zWucEFUb7xxf0 sc9G8a9Tc6mJ/HJBEXXV9qsZvw5eJ3Ebn8ygxJMPYoDxMqjWcyxwUgzr0MDc7MdRKnG6 rxhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vTNbOHJj; 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 a7si7671354edm.374.2021.09.13.12.28.57; Mon, 13 Sep 2021 12:29:22 -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=vTNbOHJj; 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 S240646AbhIMNbE (ORCPT + 99 others); Mon, 13 Sep 2021 09:31:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:35052 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240159AbhIMNT4 (ORCPT ); Mon, 13 Sep 2021 09:19:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E09B361106; Mon, 13 Sep 2021 13:17:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539077; bh=IrqOjYHkBcqU1RZSEmWyaofhIMPcg/Z7xkyUUUTP1ho=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vTNbOHJj35bOWrW4qoFltLoII8uBqk9K9I53MGkNZQ3OI92c9eFxe5bEFzKHn3oCU YuQxrp+xxWQ6zMmmfC5dSAQsuyXKDq5qJRQHq09QhlFen619c1mjS/O7EwZMr7SN8C Hax8Y6flQdM3y2jCQDBBqfO4zI/CsvkBD0DrzFdI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sanchayan Maity , Vladimir Oltean , Peter Ujfalusi , Vinod Koul , Tony Lindgren , Mark Brown , Sasha Levin Subject: [PATCH 5.4 033/144] spi: spi-fsl-dspi: Fix issue with uninitialized dma_slave_config Date: Mon, 13 Sep 2021 15:13:34 +0200 Message-Id: <20210913131049.061021509@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131047.974309396@linuxfoundation.org> References: <20210913131047.974309396@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 209ab223ad5b18e437289235e3bde12593b94ac4 ] 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 spi-fsl-dspi, this is probably not currently an issue but is still good to fix though. Fixes: 90ba37033cb9 ("spi: spi-fsl-dspi: Add DMA support for Vybrid") Cc: Sanchayan Maity Cc: Vladimir Oltean Cc: Peter Ujfalusi Cc: Vinod Koul Signed-off-by: Tony Lindgren Acked-by: Vladimir Oltean Link: https://lore.kernel.org/r/20210810081727.19491-1-tony@atomide.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-fsl-dspi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c index 40dccc580e86..3e0200618af3 100644 --- a/drivers/spi/spi-fsl-dspi.c +++ b/drivers/spi/spi-fsl-dspi.c @@ -423,6 +423,7 @@ static int dspi_request_dma(struct fsl_dspi *dspi, phys_addr_t phy_addr) goto err_rx_dma_buf; } + memset(&cfg, 0, sizeof(cfg)); cfg.src_addr = phy_addr + SPI_POPR; cfg.dst_addr = phy_addr + SPI_PUSHR; cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; -- 2.30.2