Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1886259ybk; Mon, 11 May 2020 06:47:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWle49LefgDKoB5LzFu32IVivY9NgUleWqnMqiB+NgN0ks0SIjwg7ybIO0t7IxehMjmHz+ X-Received: by 2002:aa7:c60c:: with SMTP id h12mr583813edq.243.1589204872460; Mon, 11 May 2020 06:47:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589204872; cv=none; d=google.com; s=arc-20160816; b=0WuHVnK2YxRho6M82BYYZuQ8LPcMbXSw1ECoKy1yyNJRyjrufajmzUbpkeRFuKYQwU 0veMCZmqZ8ZHejWVcjMP61fOCmWocGFHEfCfc9N34h2rkWEvvthxwCXoAnAYaboCuy+9 74nFU0EU5ffZ8OQuM+WDJWqTw4klQuJSJOKpE7HlhsaXcTWulwUeR1L+pOI4RmMtU/5U WXC+689889XdqIn5LiyIGTS/zetTwIEiT7l65C8Hu7ZkgX0cxp9bf4tnVtCFUT7yqg5d BWSXLM4tXp3sgJ8gI2gD3vlrnbt52kJ4l1GdyWQWomjmbVBlhZUhoeEnF1kSLuyV98yF Osag== 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; bh=F268/dMw7+iu4uuQVh6tAKNV0ilIC8qtDeGq9hsrEY4=; b=wk4OCWE1ZtRpIPHpAmK6DXp7KTyStSROiNZsko8eLPCKVEbPIHEDj6dCi0+MXDzq4U cSj7BMTtqGi5Jdy7B+vhpVcyW216ROY1o1ut37HeXmGN6WwdyQpT7c+FPC+J1RRTHiX3 c/FzJhts759vR2kkulnVnioGYkysxCGb09pnsQi7plLI2YIik3cEkVBznDZSuCPhsmpY vK8zyk5OoXbu3p6RDcudrDOLlqB/oWRsgpDWJi+NbCZbqHxidcYlCW9T0CsA16fzHk9F 07kElOoayGZpF31JgKukq1jJK7fXBkYQnlW7WpQMBdpeXdByIpXG2N9VOb8NPVjJSFN1 YpPA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v22si5886086ejw.454.2020.05.11.06.47.28; Mon, 11 May 2020 06:47:52 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730181AbgEKNpH (ORCPT + 99 others); Mon, 11 May 2020 09:45:07 -0400 Received: from mail.baikalelectronics.com ([87.245.175.226]:49194 "EHLO mail.baikalelectronics.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729641AbgEKNpG (ORCPT ); Mon, 11 May 2020 09:45:06 -0400 Received: from localhost (unknown [127.0.0.1]) by mail.baikalelectronics.ru (Postfix) with ESMTP id EC8F08030807; Mon, 11 May 2020 13:45:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at baikalelectronics.ru Received: from mail.baikalelectronics.ru ([127.0.0.1]) by localhost (mail.baikalelectronics.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b5TYIIyRMs46; Mon, 11 May 2020 16:45:03 +0300 (MSK) Date: Mon, 11 May 2020 16:45:02 +0300 From: Serge Semin To: Mark Brown CC: Serge Semin , Andy Shevchenko , Vinod Koul , Viresh Kumar , Dan Williams , Alexey Malahov , Thomas Bogendoerfer , Paul Burton , Ralf Baechle , Arnd Bergmann , Rob Herring , , , , Subject: Re: [PATCH v2 4/6] dmaengine: dw: Print warning if multi-block is unsupported Message-ID: <20200511134502.hjbu5evkiuh75chr@mobilestation> References: <20200306131048.ADBE18030797@mail.baikalelectronics.ru> <20200508105304.14065-1-Sergey.Semin@baikalelectronics.ru> <20200508105304.14065-5-Sergey.Semin@baikalelectronics.ru> <20200508112604.GJ185537@smile.fi.intel.com> <20200508115334.GE4820@sirena.org.uk> <20200511021016.wptcgnc3iq3kadgz@mobilestation> <20200511115813.GG8216@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200511115813.GG8216@sirena.org.uk> X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 11, 2020 at 12:58:13PM +0100, Mark Brown wrote: > On Mon, May 11, 2020 at 05:10:16AM +0300, Serge Semin wrote: > > > Alas linearizing the SPI messages won't help in this case because the DW DMA > > driver will split it into the max transaction chunks anyway. > > That sounds like you need to also impose a limit on the maximum message > size as well then, with that you should be able to handle messages up > to whatever that limit is. There's code for that bit already, so long > as the limit is not too low it should be fine for most devices and > client drivers can see the limit so they can be updated to work with it > if needed. Hmm, this might work. The problem will be with imposing such limitation through the DW APB SSI driver. In order to do this I need to know: 1) Whether multi-block LLP is supported by the DW DMA controller. 2) Maximum DW DMA transfer block size. Then I'll be able to use this information in the can_dma() callback to enable the DMA xfers only for the safe transfers. Did you mean something like this when you said "There's code for that bit already" ? If you meant the max_dma_len parameter, then setting it won't work, because it just limits the SG items size not the total length of a single transfer. So the question is of how to export the multi-block LLP flag from DW DMAc driver. Andy? -Sergey