Received: by 10.213.65.68 with SMTP id h4csp1087608imn; Wed, 4 Apr 2018 12:21:53 -0700 (PDT) X-Google-Smtp-Source: AIpwx491hWmHOhLShQeK6+EdUNcur51Sr66PSWRWfejcwTtahKx3JEs0VouUU+AhqAxSmAz2XBPe X-Received: by 10.99.96.84 with SMTP id u81mr12889640pgb.231.1522869713777; Wed, 04 Apr 2018 12:21:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522869713; cv=none; d=google.com; s=arc-20160816; b=JyK4QaCx3DDJlsRBLg4OpD6MoVWj5vUWVKpSGY3Tgu9WNys7YUIaHRQ2RxXN/NBZqx Tx2nGHxDyJoo85hzXaem/0u7NepW53Ds/JVGXGKT4uqfb7Cc+i6jjA1jt3eYyEs1Pzje eFjZfKi4nz5yCWpddf8e3SseDCvn0ePbFZi0NnleVQpBKJeLCHEFQWwiXRATZuc+C1+m Ut4rVyvFufurjpOrXEIg4K2H7S+jSGV1EgvbrXhlmdSqWZxXTpBQs2Nk1LAlt3B1GHb0 srjBZd9OGiRTc6CnFtbhtEUnrHhsfRmNqN8KtVrNYUOoGdirYF1h8fIkKgO8eCBhJzHD JSBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=G3XS8Z4yUi2ZvXwihgWJnJgG6EJo2nK+onzPZcPLUqY=; b=vTofzRy6gwZ6v1dR5388qya1t7Kzlo7Ul8Sq5Rm/Ow5RTvDKWGokRiKhWIuPOK5N+I YttvdqO0iy4niv+XqCw/D5F1eZEDJJvGQR0Nq9G6k+AOvJMybi+wEdxU2CFiJma6Z78d pFRGMk02MjwHkJEXr/LNOykLlC9IkX1ERePz8/k/1nYLMzzaQHza0ADIUCONbO/pWdRb GEfzfqfokd5svqCsJqnvP541cNnUyfaDqy/58Gs4IxYUKCVlSMJOFetM1zRPB2BUeqBl JcKfp2xknk7p5g0dP/yASG4y9CyeNZmDzQd2Pr5+gRkHOA58pwGCMJuIDmvSEUDI6QXb V7eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@orpaltech.com header.s=mailru header.b=j4FC8S8m; 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 j15si2747203pfn.389.2018.04.04.12.21.39; Wed, 04 Apr 2018 12:21:53 -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=@orpaltech.com header.s=mailru header.b=j4FC8S8m; 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 S1752468AbeDDTUI (ORCPT + 99 others); Wed, 4 Apr 2018 15:20:08 -0400 Received: from smtp62.i.mail.ru ([217.69.128.42]:52150 "EHLO smtp62.i.mail.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752424AbeDDTUH (ORCPT ); Wed, 4 Apr 2018 15:20:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=orpaltech.com; s=mailru; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject; bh=G3XS8Z4yUi2ZvXwihgWJnJgG6EJo2nK+onzPZcPLUqY=; b=j4FC8S8mk4HUp+sJpjaV2DphaAaXWNOGYHAnXmAvDrUEt1syZcY+6O887FU+soRAtClDuAnkN4nNDYEA4S2G+TezeY0LNjNZ6Dygf7tmqrqPnFWtHsgKBNkCF3EnK59TRHpugFRJf2XAwrASHmqQZPslLf9/p4BVPGOtbIfjaPg=; Received: by smtp62.i.mail.ru with esmtpa (envelope-from ) id 1f3nwy-0003IF-57; Wed, 04 Apr 2018 22:20:04 +0300 Subject: Re: [PATCH v2 1/6] spi: core: handle timeout error from transfer_one() To: Maxime Ripard Cc: Chen-Yu Tsai , Mark Brown , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org References: <20180403152905.1524-1-ssuloev@orpaltech.com> <20180403152905.1524-2-ssuloev@orpaltech.com> <20180403155224.GA11578@sirena.org.uk> <20180403161824.GB11578@sirena.org.uk> <20180404070817.6cens44jvlmdaxtm@flea> From: Sergey Suloev Message-ID: Date: Wed, 4 Apr 2018 22:19:59 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180404070817.6cens44jvlmdaxtm@flea> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Authentication-Results: smtp62.i.mail.ru; auth=pass smtp.auth=ssuloev@orpaltech.com smtp.mailfrom=ssuloev@orpaltech.com X-7FA49CB5: 0D63561A33F958A56F5296078A3C987776889ED789FDEA0FFC839A7D10C5E1E9725E5C173C3A84C3A1C30C8AFC676C8B9AD636F337C3FD3E5E1C53F199C2BB95B5C8C57E37DE458B4C7702A67D5C3316FA3894348FB808DB48C21F01D89DB561574AF45C6390F7469DAA53EE0834AAEE X-Mailru-Sender: C5364AD02485212F3ACDC11E67D84917B83A51F760C4735767E24D0D576F94E6069BFC61DABEEB110841D3AAAB1726C63DDE9B364B0DF289264D2CD8C2503E8C22A194DADEED8EEDCA01A23BA9CD1BE7ED14614B50AE0675 X-Mras: OK Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/04/2018 10:08 AM, Maxime Ripard wrote: > On Tue, Apr 03, 2018 at 07:24:11PM +0300, Sergey Suloev wrote: >> On 04/03/2018 07:18 PM, Mark Brown wrote: >>> On Tue, Apr 03, 2018 at 07:00:55PM +0300, Sergey Suloev wrote: >>>> On 04/03/2018 06:52 PM, Mark Brown wrote: >>>>> On Tue, Apr 03, 2018 at 06:29:00PM +0300, Sergey Suloev wrote: >>>>>> As long as sun4i/sun6i SPI drivers have overriden the default >>>>>> "wait for completion" procedure then we need to properly >>>>>> handle -ETIMEDOUT error from transfer_one(). >>>>> Why is this connected to those drivers specifically? >>>> These 2 drivers have their own "waiting" code and not using the code from >>>> SPI core. >>> Does this not apply to any other driver - why is this something we only >>> have to do when these drivers do it? That's what's setting off alarm >>> bells. >> sun4i/sun6i drivers have let's say "smart" waiting while SPI core uses a >> fixed interval to wait. >> >> I can't say for every SPI driver in kernel, that's outside of my area of >> expertise. > I'm not sure what's specific about the sun4i / sun6i case here. Your > patch doesn't have anything to do with the delay before the timeout, > but the fact that we return -ETIMEDOUT in the first place. > > And I'm pretty sure that papering over an error returned by a driver > is not the right thing to do. > > Maxime > > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel do you mean the changes in spi.c are not required at all ? My point was to eat ETIMEDOUT error from transfer_one() as it is just a mark and shouldn't be handled as a normal error.