Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2054206ybk; Mon, 11 May 2020 10:46:07 -0700 (PDT) X-Google-Smtp-Source: APiQypLLuJacnZc58C35j06PwiID1EOETNW4EFweoim3SVadx0VecwrkPtblAEaqOypzNtN/FYsg X-Received: by 2002:a17:906:4c8e:: with SMTP id q14mr14984862eju.208.1589219167074; Mon, 11 May 2020 10:46:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589219167; cv=none; d=google.com; s=arc-20160816; b=XrZ5kBwBbwx0NV99+Qx8lEJpzcttj7s6onCloYyKdOxd9vFeMkZBkGuOm180Bl6s3g 6s0hdQJfSPE6FNYLRMxrbzMr1XnqhYyaCMGWHCVQBi+WO6zi7P2pwuq4UHHQhsZK4mcV 3fqN4REdI+fGCmH5ak9dTvN4VoOMyBKGAme3aqcZXMqZ+fY2g42t7tusYnVeiXP+JiKN erSlqjwHVPgOxx6pflqEFXDR9JI2kYtXPWrqdzV8MnueJTV1wNfDmAWPo+GIFZYsywxq w34WVgYvl/iagMeO3V20ryh1WXunakw2VBCMxHQFALoMrM13SeBVu2xHhq3BhzTtLCRt RCEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=NTeP/o2FUTI4B8dV4RAhD1c2d2hb/G3rR2+VPXqmfJs=; b=Hw8hqJf7w3jH+U5djSM47Of1Kzcl4joTMqYcVVjHvtpYYKlSFFAX0O4aeFkIe0bMYt b5bGSPqdA/crXeGcLmwu5jI5tRcJOzdh6nPyBCmjF9To5vE/BZInDXRUmIXbYIT0PpGX qpP9Wh+LJvt8DNbSbV0NUHpdhUCdKl0NY4t7sG/GE7qWBPmrZnN38xgqPFj+sb38F4Z9 O0O6Zv/O3jZSnnGOTv3jwoX5B0GezXzLiIGLBS3e4n73xHUelu/d6rVE/Q+NlANBhQfi DlJ5k5qTT6TB0Z8GSlbeTD7qp89miLAacQQJl36lRs/ZDoJCn+UgPowEzuuT0v5M+Edk OsYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=M5M0yr01; 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 b10si6445696ejd.323.2020.05.11.10.45.43; Mon, 11 May 2020 10:46:07 -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=M5M0yr01; 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 S1730842AbgEKRoS (ORCPT + 99 others); Mon, 11 May 2020 13:44:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:41816 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726661AbgEKRoS (ORCPT ); Mon, 11 May 2020 13:44:18 -0400 Received: from localhost (fw-tnat.cambridge.arm.com [217.140.96.140]) (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 8A81E206D6; Mon, 11 May 2020 17:44:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589219057; bh=TyqQgXbRU7CHTNnWXo92tDp4bkKKH+QHCcrcrAeZ0Xg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M5M0yr01sJrjR4NQQHjYco8Zm2A79QvQoS+JgFLzt3UtWZozf/K5RaXdDLDwpsV4n wQ4Llyx/KGkvcaEaZuIe/aT5WnmIVgxYInVSxRkj1xyI6x7VQqYBwTQcCt1+Wq38K2 eFbuTzTTMJ7pHQiH04ug7PF5ar1YT8bmqKYk6agc= Date: Mon, 11 May 2020 18:44:14 +0100 From: Mark Brown To: Serge Semin Cc: Serge Semin , Andy Shevchenko , Vinod Koul , Viresh Kumar , Dan Williams , Alexey Malahov , Thomas Bogendoerfer , Paul Burton , Ralf Baechle , Arnd Bergmann , Rob Herring , linux-mips@vger.kernel.org, devicetree@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 4/6] dmaengine: dw: Print warning if multi-block is unsupported Message-ID: <20200511174414.GL8216@sirena.org.uk> 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> <20200511134502.hjbu5evkiuh75chr@mobilestation> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="W/+CTqSGWdiRg+8j" Content-Disposition: inline In-Reply-To: <20200511134502.hjbu5evkiuh75chr@mobilestation> X-Cookie: TANSTAAFL User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --W/+CTqSGWdiRg+8j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, May 11, 2020 at 04:45:02PM +0300, Serge Semin wrote: > On Mon, May 11, 2020 at 12:58:13PM +0100, Mark Brown wrote: > > 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. There is a constraint enumeration interface in the DMA API which you should be able to extend for this if it doesn't already support what you need. > 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. You can set max_transfer_size and/or max_message_size in the SPI driver - you should be able to do this on probe. --W/+CTqSGWdiRg+8j Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl65ju0ACgkQJNaLcl1U h9BWuwf9GYDZfT9SEAR6UO5jhJk6RWwFsHU3BhxdAnvDK/l2K93uI+11WQq2An8H yiMiIaTllJPZmNs7mg1+lxpT1gRmKbmoXqb3DFml9K4gKxVJMXoIAPyhTL6wLqaV wiCzkwszsZsVvzFiQyPNAau0qzkaOC+wHPr8PUiEFxZIRUxEsThin07HXK7X0APj 7LoKnOaB28MWVN/ezndCECaxoOgexp8LZ6jhVMMg/Kpd8UMCaJwB8yEz80uBFL+q mglQQesF6cb/dQZcynpOyCWm2dZhnCdd5yvyHWH1d2rVbcfi3xoTq+tWfPMLbW12 45bciv1TxBU7iqLX1sF/YYO33YIO1Q== =HGPI -----END PGP SIGNATURE----- --W/+CTqSGWdiRg+8j--