Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3071338ybt; Mon, 29 Jun 2020 14:32:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwX5PdPI53p5GNeWaWRseRYC4gmMai86w/FSWOFmdv3C0AS0NeAfLPZ6SJLTgE/I7/5h9gP X-Received: by 2002:aa7:d341:: with SMTP id m1mr7917524edr.50.1593466345330; Mon, 29 Jun 2020 14:32:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593466345; cv=none; d=google.com; s=arc-20160816; b=n95E+pmUPPYjGjeqLqP8oU3XYKO2wYxGwFQ+O5ylZkSk0jIBbieAX5c81hbhi+CxEd lUvbu99GwawJhhaziYZHr4cMlPxFuVKtT4BU/EqzJybdrVBK8hvAE7puvZx5131u2R1Q zY1n9tS0z7VopXayEkz4W9XaNISRysHLOccGscwWyS8hEZuUV3le23QAkxUzga5tb7nz lEgF267dbSg10qTDCK4tlNsccFvEKXHZK/fPw23D48lUCbPl2NNBnxRQtDa8gN5TUTYS u7JuB+yaB6yER0kyYv8P/JrFnP1LUqlJSanPWsne0aiizE9HynMD1FfWteAdQmyZr0F5 bnRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=gnWyT6fX93LGIqHkGXUYPtmgWxO0CLIsv0SDQR9mnQw=; b=raU7kqpeDB/snZ8jVNdMb8QCVf0BvRpXmKUEabHsr9eS6KVFlfi20uAr7NmpBw412O t3yNXrRsahfgeoX5mbxhXFzr9vcSQpphuAww1QliTNBPLW+W0i/AtibDYvmYCwyy15WJ j1iyQ42yMlJYfNj0YZOhXbVnFJJ/6j65MI4yRWcchA/2LRIX9irrg1NRxua0BKR2zn2l Mtb22o+MZuni9n2I1351x2owLCzbpRle/iMoO1qwjirohgvjmqGIpLbCMYoNNY/ckGu9 4onjUf5LJxeEHWELKcR/WTMAdROuIjD8UujA2undCaD20yM+hPGp+Y+aWNOWpgDQQwZS kGWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uV2p61E7; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lk3si350071ejb.653.2020.06.29.14.32.02; Mon, 29 Jun 2020 14:32:25 -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=@kernel.org header.s=default header.b=uV2p61E7; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730996AbgF2V3r (ORCPT + 99 others); Mon, 29 Jun 2020 17:29:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:60652 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728909AbgF2SlZ (ORCPT ); Mon, 29 Jun 2020 14:41:25 -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 E4D8323B08; Mon, 29 Jun 2020 14:26:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593440768; bh=IEYbbfxHL0R+rJ5eiAE7+uNb2jSF+lIweaM7Y+Gfts8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uV2p61E7ul0vof3Ye7MwmEoZfRUDkdelrmFKPTDe7nX3rTdBPdKqf+PXonbfnc+ZS IE6x4O0iKrR9J6T3f7gZXK4vHqJrCxmgaTcwfOc3rNzgZnlvj20lMrj6UNr+h3I6Uo wQMWBv7DyXdsEhfd31poJwTw1BFlfPXjllT+muXE= Date: Mon, 29 Jun 2020 10:26:06 -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: <20200629142606.GR1931@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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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. > >Regards, >-Ralph > >diff --git a/drivers/spi/spi-dw-mmio.c b/drivers/spi/spi-dw-mmio.c >index c563c2815093..99641c485288 100644 >--- a/drivers/spi/spi-dw-mmio.c >+++ b/drivers/spi/spi-dw-mmio.c >@@ -358,7 +358,7 @@ static int mmio_spi_dma_transfer(struct dw_spi *dws, struct spi_transfer *xfer) Um, I can't find this function anywhere... what am I missing? -- Thanks, Sasha