Received: by 10.213.65.68 with SMTP id h4csp3400443imn; Tue, 3 Apr 2018 04:23:58 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+Gc7NeECtt41UKT1yMhtm7HBIZ7gLkECMXygS/X1gKxxCsCmyNhZ36eQRtR7YXIAI7KId7 X-Received: by 2002:a17:902:b103:: with SMTP id q3-v6mr13830091plr.181.1522754638057; Tue, 03 Apr 2018 04:23:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522754638; cv=none; d=google.com; s=arc-20160816; b=dHIfJs9IhG/qXSpFPPOoSocPAZ7MpKgTdeEVtHKVpOl+a7gJ5Xcc5dJbRoFzzvZ37y JEFKWTQ+biAv8ojFl+JoWUGF/H+6alaY+luIUwuvBQ07YNKllLXCX87MUqG54z8KGOy5 0rUb3zHEVgZI/QbUGeLjEVp/0bdS8PgCm5PYBlxK9/G5wpPQ/SqIL2+F7Cn7aOepSKUH hdpcXgfsTqTKsGcIzbwK0FLwFz+4x0FhfyPXfYBLEaayMp+duTGmq2AwVBEKa7AV1eDF u+4XrnqRcgi8d9NSryqN8R+YDuyNf/l90Dw6Es7kK/rLRoeV3MzHARw0hbguf0TjheiO 0oCw== 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 :dkim-signature:arc-authentication-results; bh=0ypJcz5he4HSE4EcA7p/pa+FAhRnR1QLSCITbSrCIdo=; b=s7bECL/eHv9dcZ0Ef5gTLff8Uh/TXYhNMpRAW88emJ6d3e2prxtOaeK4E7QW2E62Fk goKzGSnUYq4lC1ZOaOq1pmtO8xv6sYPoLLTLPbEib2a2Wia2Hg528S+U1ttG/+C8xOux RGILTwUZXJfNiAc3exTQ0HlGFX4HXHxVJt7rSC8Luv+HkqEuvnLQIiI/gHaRdjXtHnFN WAwpg+9aa4Wdx2NxqcGOlOVUCWZCHmeEILU4FvP1EZlws+ZIME0Rwa+lGbI1ZHKDe02M 2STCdyT+YxlktRJJ1WLBKrfEjQYuk0Shg/C1luG86cVVGntHg5bRvVvYgcIAUtPP1PnT axVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@orpaltech.com header.s=mailru header.b=VFgmZbWz; dkim=pass header.i=@orpaltech.com header.s=mailru header.b=VFgmZbWz; 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 a19-v6si316144plm.736.2018.04.03.04.23.44; Tue, 03 Apr 2018 04:23:58 -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=VFgmZbWz; dkim=pass header.i=@orpaltech.com header.s=mailru header.b=VFgmZbWz; 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 S1755396AbeDCLWi (ORCPT + 99 others); Tue, 3 Apr 2018 07:22:38 -0400 Received: from gstat2.m.smailru.net ([94.100.177.128]:51618 "EHLO fallback.mail.ru" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755121AbeDCLWg (ORCPT ); Tue, 3 Apr 2018 07:22:36 -0400 X-Greylist: delayed 807 seconds by postgrey-1.27 at vger.kernel.org; Tue, 03 Apr 2018 07:22:35 EDT 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=0ypJcz5he4HSE4EcA7p/pa+FAhRnR1QLSCITbSrCIdo=; b=VFgmZbWzQMttoB7hHxnFquhFjuedEL4dP2P9q2HYHmxRkKMW87XHLtkNbqJhVEOOFf7wtFoJ/kGi/w5VgHOA47PmTxa51B6jfliK4Wp1WQYFCSiWS7QcyoPbVnHY1mTxa88XqcDrBEd06ptRzokpQsi5xFyv9tdg3vWTfKxDbpU=; Received: from [10.161.76.75] (port=37830 helo=smtp16.mail.ru) by fallback16.i with esmtp (envelope-from ) id 1f3JoG-0006nf-T8; Tue, 03 Apr 2018 14:09:05 +0300 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=0ypJcz5he4HSE4EcA7p/pa+FAhRnR1QLSCITbSrCIdo=; b=VFgmZbWzQMttoB7hHxnFquhFjuedEL4dP2P9q2HYHmxRkKMW87XHLtkNbqJhVEOOFf7wtFoJ/kGi/w5VgHOA47PmTxa51B6jfliK4Wp1WQYFCSiWS7QcyoPbVnHY1mTxa88XqcDrBEd06ptRzokpQsi5xFyv9tdg3vWTfKxDbpU=; Received: by smtp16.mail.ru with esmtpa (envelope-from ) id 1f3Jo1-0000jU-6D; Tue, 03 Apr 2018 14:08:49 +0300 Subject: Re: [PATCH 2/6] spi: sun4i: restrict transfer length in PIO-mode To: Maxime Ripard Cc: Mark Brown , Chen-Yu Tsai , linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20180329185907.27281-1-ssuloev@orpaltech.com> <20180329185907.27281-3-ssuloev@orpaltech.com> <20180403081041.3ully6bcyfwx2cx6@flea> From: Sergey Suloev Message-ID: <4390604e-092b-a89d-3581-b57ee9cbb6a1@orpaltech.com> Date: Tue, 3 Apr 2018 14:08:43 +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: <20180403081041.3ully6bcyfwx2cx6@flea> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-7FA49CB5: 0D63561A33F958A5BE0F62698ACAEC23D7076D3B86F44C0254CC0BFB986C5EF1725E5C173C3A84C30584FF81F342DA070BF47669B41AB5238734EF69C36C4A4DC4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0F5D41B9178041F3E72623479134186CDE6BA297DBC24807EABDAD6C7F3747799A X-Mailru-Sender: C5364AD02485212F3ACDC11E67D8491747533F75B4D7E0293DF07BD882ADF97B069BFC61DABEEB110841D3AAAB1726C63DDE9B364B0DF289264D2CD8C2503E8C22A194DADEED8EEDCA01A23BA9CD1BE7ED14614B50AE0675 X-Mras: OK X-Mras: OK Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/03/2018 11:10 AM, Maxime Ripard wrote: > On Thu, Mar 29, 2018 at 09:59:03PM +0300, Sergey Suloev wrote: >> There is no need to handle 3/4 empty/full interrupts as the maximum >> supported transfer length in PIO mode is 64 bytes for sun4i-family >> SoCs. > That assumes that you'll be able to treat the FIFO full interrupt and > drain the FIFO before we have the next byte coming in. This would > require a real time system, and we're not in one of them. > > Maxime > AFAIK in SPI protocol we send and receive at the same time. As soon as the transfer length is <= FIFO depth then it means that at the moment we get TC interrupt all data for this transfer sent/received already. Is your point here that draining FIFO might be a long operation and we can lose next portion of data ?