From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5EC17C433E0 for ; Fri, 26 Jun 2020 20:07:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2BDF220720 for ; Fri, 26 Jun 2020 20:07:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593202037; bh=4oOD88XtGZC/uNbNT6wOOaDIgm3VB5umJpU7EFUTnZU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=I6RpKo72LraQF0HCe8tDZeAH+6TE/l1pajUDoLM8twX0QKr0r4kQQnFh+hcTSXaVd 48TpBlppX1aC9thu80Hh0lIm+PfdjBEZYFyrlqfdIlWRwo9jSXC89Ssk8hEVmWRt3s 2lYyIsTCGiza2K0irLSYmkMsSe6bbd5rs6qJ38ac= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725890AbgFZUHN (ORCPT ); Fri, 26 Jun 2020 16:07:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:46088 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725806AbgFZUHM (ORCPT ); Fri, 26 Jun 2020 16:07:12 -0400 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 058C8206C3; Fri, 26 Jun 2020 20:07:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593202032; bh=4oOD88XtGZC/uNbNT6wOOaDIgm3VB5umJpU7EFUTnZU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=obzLXtBTVJJGSeD0cbiCHxDtXmWB/hH2sZPMR14C2iGv+nabdMnUhC/p+gsX3vzpb DRB7pEDj2buzXO6nXa8YiLcW4x6TMxuNaz7hDeb1bYxuyZ6m4QyyrLWFTEgVH8/cAk 1O3qQ4wXoWWBgv7oVCTJoTnL+YCkuF4EttpdzthU= Date: Fri, 26 Jun 2020 16:07:10 -0400 From: Sasha Levin To: Ralph Siemsen Cc: Serge Semin , Pavel Machek , Serge Semin , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Georgy Vlasov , Ramil Zaripov , Alexey Malahov , Thomas Bogendoerfer , Arnd Bergmann , Andy Shevchenko , Feng Tang , Rob Herring , linux-mips@vger.kernel.org, devicetree@vger.kernel.org, Mark Brown Subject: Re: [PATCH 4.19 182/267] spi: dw: Return any value retrieved from the dma_transfer callback Message-ID: <20200626200710.GK1931@sasha-vm> References: <20200619141648.840376470@linuxfoundation.org> <20200619141657.498868116@linuxfoundation.org> <20200619210719.GB12233@amd> <20200622205121.4xuki7guyj6u5yul@mobilestation> <20200626151800.GA22242@maple.netwinder.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200626151800.GA22242@maple.netwinder.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Fri, Jun 26, 2020 at 11:18:00AM -0400, Ralph Siemsen wrote: >Hi Serge, Pavel, Greg, > >On Mon, Jun 22, 2020 at 11:51:21PM +0300, Serge Semin wrote: >>Hello Pavel >> >>On Fri, Jun 19, 2020 at 11:07:19PM +0200, Pavel Machek wrote: >> >>>Mainline patch simply changes return value, but code is different in >>>v4.19, and poll_transfer will now be avoided when dws->dma_mapped. Is >>>that a problem? >> >>Actually no.) In that old 4.19 context it's even better to return straight away >>no matter what value is returned by the dma_transfer() callback. > >This patch changes the return dma_transfer return value from 0 to 1, >however it was only done in spi-dw-mid.c func mid_spi_dma_transfer(). > >There is an identical function in spi-dw-mmio.c that needs the same >treatment, otherwise access to the SPI device becomes erratic and even >causes kernel to hang. Guess how I found this ;-) > >So the following patch is needed as well, at least in 4.9 and 4.19, I >did not check/test other versions. Mainline does not need this, since >the code seems to have been refactored to avoid the duplication. Could you add your signed-off-by tag please? :) -- Thanks, Sasha