Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp331330ybm; Wed, 22 May 2019 04:04:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqxGCa1QDqeJ5qWEMx+xlT+W4KceSoDq2/R/ogc4SMtpKWNV/PR9chQ1ORXS3phJZZqWchzJ X-Received: by 2002:a65:4bc3:: with SMTP id p3mr29402704pgr.413.1558523040309; Wed, 22 May 2019 04:04:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558523040; cv=none; d=google.com; s=arc-20160816; b=Yi8hhbmp7RCuNPbOrHaT0qCSihd+1bBLsOsyQKKCNm6C34nSa7tghg46DEHGWxol6w NrkTU4soFgHVgNLAzqXsgQ5TlMfgWldTIdP09t3Qg9KV9pBA+cmr4WkZKJZu2yoDwRyr 11Z+KHtxpfVTNawsU4A/xt8fcww/TQodz9zgpX5c0gRzuhZpmG0i+/ITYAb0ztM80Jal wb/korCacnFGZB5nF/XoLeEl8bIWQTu3tNBwxhHdJq8eFI0hJurMkE7sr9uMBRRpYIsZ +kqvIoTmb5a6wkqbkXRHQdCP9vN0a82vc4pWc+Ias6BAwMxmEY5C0mok3FpvKT7XVoKi 1L7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:message-id :dkim-signature; bh=k7gXDpgsRbDzPYykyp8yT+pXmsBZ7LxZ7ySJOQkqcXw=; b=hp97uhGz8t2mW7nuY8ZKz6WbmaEjjG+zgjbhJEAOoJKGFCHEC2J1Ty5MjmQp1Trpsk WAdmjjNfzmGDxcFj4ZxAVSIn8ipIXqwiW7e/gQ2gnm2ArEPdNE8y2miZDoXDDG1cX5xw NM6vpv402CA78A8mOLSUbTI+KQaZaFipe06YwNT/LwzRFOv48UYmBP14hxQoC3t6PH+I Cn4MJaGvis2sq3jDBMvdaG246BPKvnffOLOvWBmhCi13liInhIhq2925WW/dQS5M552P B1dgM9Ubg9FUCB5krsMlr/iYd5ZLD1xgn1yx4yvXVTAfkiX1p0Yy+ozHwSdT1OSCbCKI +ywg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=AGZZdOV5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d39si26037025pla.316.2019.05.22.04.03.43; Wed, 22 May 2019 04:04:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=AGZZdOV5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729295AbfEVLAi (ORCPT + 99 others); Wed, 22 May 2019 07:00:38 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:18815 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728743AbfEVLAh (ORCPT ); Wed, 22 May 2019 07:00:37 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4588mz3Nsdz9v2JK; Wed, 22 May 2019 13:00:35 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=AGZZdOV5; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id 1p8m7ConjVBO; Wed, 22 May 2019 13:00:35 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 4588mz28Wtz9v2JJ; Wed, 22 May 2019 13:00:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1558522835; bh=k7gXDpgsRbDzPYykyp8yT+pXmsBZ7LxZ7ySJOQkqcXw=; h=From:Subject:To:Cc:Date:From; b=AGZZdOV5RUVapAjUuLLyoEBn8omopPog2JyYv4LASsAhWoXCdyU9I93TVKTjbPhLx BgF3zcvxOIsUMriKEtcbgmJBnzV2xbvEeYGHovscztGKkFIOj3aqmSDax2qJxfIrV8 fMmKfkOYYtWdG1ZjhuQLnAgi583uvHmh3ojdsWZI= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 76CBB8B838; Wed, 22 May 2019 13:00:36 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id C2x4lgf7MCwK; Wed, 22 May 2019 13:00:36 +0200 (CEST) Received: from po16846vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 54E698B823; Wed, 22 May 2019 13:00:36 +0200 (CEST) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 2F081684F2; Wed, 22 May 2019 11:00:36 +0000 (UTC) Message-Id: <9c1b9545e6683666a795cd89070fa9491f33b9da.1558522754.git.christophe.leroy@c-s.fr> From: Christophe Leroy Subject: [PATCH] spi: spi-fsl-spi: call spi_finalize_current_message() at the end To: Mark Brown Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-spi@vger.kernel.org Date: Wed, 22 May 2019 11:00:36 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org spi_finalize_current_message() shall be called once all actions are finished, otherwise the last actions might step over a newly started transfer. Fixes: c592becbe704 ("spi: fsl-(e)spi: migrate to generic master queueing") Signed-off-by: Christophe Leroy --- drivers/spi/spi-fsl-spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c index b36ac6aa3b1f..7fbdaf066719 100644 --- a/drivers/spi/spi-fsl-spi.c +++ b/drivers/spi/spi-fsl-spi.c @@ -432,7 +432,6 @@ static int fsl_spi_do_one_msg(struct spi_master *master, } m->status = status; - spi_finalize_current_message(master); if (status || !cs_change) { ndelay(nsecs); @@ -440,6 +439,7 @@ static int fsl_spi_do_one_msg(struct spi_master *master, } fsl_spi_setup_transfer(spi, NULL); + spi_finalize_current_message(master); return 0; } -- 2.13.3