Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1631688pxb; Thu, 16 Sep 2021 11:33:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxaXHX7KihvQHEpqqJNltJy1id+oq4wQ376ojMILidUVXcFhBvZryIoFSGQK9q9ae2T0ub2 X-Received: by 2002:a17:906:3c56:: with SMTP id i22mr7787403ejg.287.1631817201174; Thu, 16 Sep 2021 11:33:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631817201; cv=none; d=google.com; s=arc-20160816; b=EqyhZ5UytXpvdunmUNRSorMTRvhUhn3kbeOOnvldjKH5sP9ux/3z0jSIEIfMCAYz6W KMKNKF8829eZpkETmOL2ECTXEH9QOLTIOPG0+wZW2I6N8++RDK9TQGYHLoQBxhkRbIJC glxzjfhp/3L7yeAiNf3BW4YvV1yGadretIcc5LE70wS+AgEXqxxdFnbxVoq/7tyikSsw dkV1IVC9Pj53pn0xq65d10iQFkgECCaHrMsg0k0tFtA6LRK8+6bYxOVa+/xbQ/RoaFNN fRYJztY+ss9+ovpzhuJYwhDx28NuIceuS2lCCK/OPaTiLr4b2yJKC1AUOK0JgQdintkR QE9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=KDZmR1qlr5pOJoWxG6OUOzvQ5Yij5r5YO8ACXCM5Agk=; b=tinpGmt2Xm2u/O3rwrF1DBoR5mVyfqgS9ZfKB9VM2NKX2cFXhUR1MJYgisStEcjS5X /J225WZyhVy2dXEeziMTnTQD87xJsMM4dZd2QJbPTLrcslXQtBBTcRe82r5HBqMtbvQP D3k1ZmrbWAht8MoJUUdKvJKLUJmQDIRiwp3ZPp6kld88LVkOL5BBel+voCX83TK8rEM5 V+VRgeh/xNE94X3klUv1A38e426vBWAkpj8RwdphfU0w4E7X/TZcQI094+eQuL3uzjJ/ BaimT+R9408cKyePNPhN1FmFCWGmO0nbk7LW1Z+04mMqueCYT/mH6k5p73WuTlH3EACj gUVg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de43si4162808ejc.189.2021.09.16.11.32.57; Thu, 16 Sep 2021 11:33: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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239236AbhIPPc4 convert rfc822-to-8bit (ORCPT + 99 others); Thu, 16 Sep 2021 11:32:56 -0400 Received: from mail.bytesnap.co.uk ([94.198.185.106]:8716 "EHLO mail.bytesnap.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239233AbhIPPc4 (ORCPT ); Thu, 16 Sep 2021 11:32:56 -0400 X-Greylist: delayed 902 seconds by postgrey-1.27 at vger.kernel.org; Thu, 16 Sep 2021 11:32:54 EDT Received: from exch2016.ByteSnap.local (10.0.28.253) by exch2016.ByteSnap.local (10.0.28.253) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.14; Thu, 16 Sep 2021 16:16:31 +0100 Received: from exch2016.ByteSnap.local ([fe80::fccc:6d14:b55e:d5a0]) by exch2016.ByteSnap.local ([fe80::fccc:6d14:b55e:d5a0%8]) with mapi id 15.01.2308.014; Thu, 16 Sep 2021 16:16:31 +0100 From: Ville Baillie To: "tudor.ambarus@microchip.com" , "broonie@kernel.org" , "nicolas.ferre@microchip.com" , "alexandre.belloni@bootlin.com" , "ludovic.desroches@microchip.com" CC: "linux-spi@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "dan.sneddon@microchip.com" , Ville Baillie Subject: [PATCH] spi: atmel: Fix PDC transfer setup bug Thread-Topic: [PATCH] spi: atmel: Fix PDC transfer setup bug Thread-Index: AderDWrzqf5xpvNgRsOaMaLInBknhQ== Date: Thu, 16 Sep 2021 15:16:31 +0000 Message-ID: <3804cb61226e433fb1f7cde911a2785a@bytesnap.co.uk> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.0.27.202] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From 614bcf515cc8dbd1b7573a2fbf369fc84fca0501 Mon Sep 17 00:00:00 2001 From: Ville Baillie Date: Thu, 16 Sep 2021 14:16:46 +0000 Subject: [PATCH] spi: atmel: Fix PDC transfer setup bug Commit d370f4b2808d ("spi: atmel: Switch to transfer_one transfer method") refactored the code and changed a conditional causing atmel_spi_dma_map_xfer to never be called in PDC mode. This causes the driver to silently fail. This patch changes the conditional to match the behaviour of the previous commit before the refactor. Signed-off-by: Ville Baillie --- drivers/spi/spi-atmel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index 788dcdf25f00..f00e9c9b426e 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c @@ -1301,7 +1301,7 @@ static int atmel_spi_one_transfer(struct spi_master *master, * DMA map early, for performance (empties dcache ASAP) and * better fault reporting. */ - if ((!master->cur_msg_mapped) + if ((!master->cur_msg->is_dma_mapped) && as->use_pdc) { if (atmel_spi_dma_map_xfer(as, xfer) < 0) return -ENOMEM; -- 2.17.1