Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5094241imu; Sun, 20 Jan 2019 03:26:45 -0800 (PST) X-Google-Smtp-Source: ALg8bN5BSUU5a5VSCGAbZlkbEB0vRl8tmuqeuHyU5xNAY3LffC6x6+M04FpsnFrlqAvyBeTvTC6P X-Received: by 2002:a63:c141:: with SMTP id p1mr24421512pgi.424.1547983605520; Sun, 20 Jan 2019 03:26:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547983605; cv=none; d=google.com; s=arc-20160816; b=07gouKaSlEfVyoUxWOyw1yBF/XMJxO6vIaMljnpsFxamWa3ntwiCIy6husZj4gg4Lx JxcAFhpqDzinoXOcjI5sgk9QdFxPyHdtMOBLqjGKFiZzszC2prcwVWqD9sC+2G0xlMmX MMrMIIrLqMxQj4KWnURYzTjCcXaJGFkj0z32K9zcb1htwvXdbPL9eaPff5ICFRUMLHLL keBux6M/tI1deGKM1phe4rtOe+XaRR3gs1CGCEvLD3hTAX+QzGfINZuxXUpFuEhXgpYz 30lewlaBu2T1nUOlz655IMpqaGKOFJrArTU6GqxVrqtIjKFoCMKDp4Gy/JXc0LlGucRq IaVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=VA0ZLqrAe+QukMvcPb251O7lcS3ckYiasgDxs7Lo/C0=; b=fL8ldD4hg9WWk71JmPWy5iPi72gBkyU+CNv5wGOOROtg7UeZ+uJTjrm88vBu7x2q11 8bNVkEhob22RHGGf/sLb0UbCClb5erpwnPQ6JeUXScbPNNxAWZ9aFzilBOQtH8IKXUPY tlgmY507/euEhKBaFCtazAkVUiHVZFkytXvSHkoVS2xQPhteZrzprNiTYg9+aE0SYDiU lIdYy9+35j0b2Cb+FM5k9MZ1PywEglhEU8byYaZv+W1wbN4CqPi3u4+JQOdmZzh15Z0/ jDX359NZF3zUFI5XxhJ7Ykc6dFPbKSCNtiKd1PByQxJx25UibcSyhx3caAO8lk1K+kUG P3fg== ARC-Authentication-Results: i=1; mx.google.com; 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 q19si9278653pfh.138.2019.01.20.03.26.10; Sun, 20 Jan 2019 03:26:45 -0800 (PST) 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; 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 S1730509AbfATLY1 convert rfc822-to-8bit (ORCPT + 99 others); Sun, 20 Jan 2019 06:24:27 -0500 Received: from 212-186-180-163.static.upcbusiness.at ([212.186.180.163]:39902 "EHLO cgate.sperl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730458AbfATLY0 (ORCPT ); Sun, 20 Jan 2019 06:24:26 -0500 Received: from msmac.intern.sperl.org (account martin@sperl.org [10.10.10.11] verified) by sperl.org (CommuniGate Pro SMTP 6.2.1 _community_) with ESMTPSA id 7755101; Sun, 20 Jan 2019 11:24:23 +0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: Regression: spi: core: avoid waking pump thread from spi_sync instead run teardown delayed From: kernel@martin.sperl.org In-Reply-To: <20190118191202.GG6260@sirena.org.uk> Date: Sun, 20 Jan 2019 12:24:23 +0100 Cc: Jon Hunter , linux-tegra , Linux Kernel Mailing List , linux-spi@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: References: <7C4A5EFC-8235-40C8-96E1-E6020529DF72@martin.sperl.org> <20190115192619.GG5522@sirena.org.uk> <5D3256B1-5DAE-4E3F-9099-5425F4BCA304@martin.sperl.org> <20190115212539.GK5522@sirena.org.uk> <20190118191202.GG6260@sirena.org.uk> To: Mark Brown X-Mailer: Apple Mail (2.3124) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mark! > On 18.01.2019, at 20:12, Mark Brown wrote: > > On Fri, Jan 18, 2019 at 06:11:31PM +0100, kernel@martin.sperl.org wrote: > >> Does something like this looks acceptable? > > Yes, it does! > >> SPI_CONTROLLER_MODE_EXCLUSIVE could replace the bus_lock_flag. >> I am also not sure of the “convention” of memory mode (i.e >> using mem_ops). Is it maybe implicitly spi_bus_locked - i.e >> typically only a single device? > > Yes, it does - we're basically handing over the entire SPI bus to > another bit of hardware that will do memory mapped flash access so we > can't really have anything else trying to do SPI operations at the same > time. These kind of changes it requires are consuming a bit more time than I was hoping for. So maybe at this very moment the best is reverting the patch. I have some patches that would move towards that goal in baby steps without having to resort to a big rewrite at this very moment. Maybe Jon can check each patch one after another to see if any is producing the unexpected behavior and only then you would include them... As for the root cause of the regression: my guess is that spi-mem is just not triggering a shutdown any more because of how message_pump works. The improvement of the state-machine can then get addressed separately. Martin