From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A59FDEB64DA for ; Thu, 22 Jun 2023 21:17:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=nZHR/ZBxZ5OQPtBPYvd6nCdMXa8PvA/PoxCWk9qHrQM=; b=Rq94T3wrjg+CAF0Scetao6CAoo UmGrtGzCVfSQ+WCE/RTw5lA6dZ1hl8afEmXmGe3L3JjM9b8nFguxGR/bZffh5pwOb7UoI4vvlhJBo F406LPbiQ1MAFA3kxnFs+q7gRLnXyIzSm5OOOokXaNTCjKs8HRPUY+xlQOWB+FfLe+5F/d6RnH3UE WQIUbnc+B7sPBltaZqWHGwh9CjlI1i9V45s24H625cL2ZZ6mEEDsremZCb5VHxRYC1GBnFPnSFSvX ds8h8ILzwIFgISuuIuwOyQ7WQ7LlriYUFKcp6XPYsT3KjMshuqU8m3csA8okeAQQ1E3DceRGft3zV FU3+eU5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qCRfk-001pnc-15; Thu, 22 Jun 2023 21:16:56 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qCRff-001pjX-1M for linux-arm-kernel@lists.infradead.org; Thu, 22 Jun 2023 21:16:55 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2F4D6618EC; Thu, 22 Jun 2023 21:16:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FB0EC433C8; Thu, 22 Jun 2023 21:16:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687468609; bh=xSZmrtBW6K2rFKUlZrWXt4n85rXjSVP9x5eUXJgvqlw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GWOWGlXKarrlCwefPs3N9AZYJF7/V69mjTQH5dY7oYTdXl96w80eQks0w6kb9DXIl 3MCXebr6FFkL4gWeuhLDUaG7BRQwdliUwS1t1ZjCI6WppJUmUC5zBZiAiMkrvO0hJ6 EumX4G34tn8LzfFU3hgon6XcXqgIBhiB9tz5GqPM5uU8xLYq/trbuQwq8MD4DL57Kn 1u11VAIytyWQGo1EFZxOY3dI2LyJB5mmVXDRWw0LkBBch3MzMpzZBGLENIxzX6NShd b0PPjUcVbumaPcZVESJfw0M6DypUW8ZTmzjTosWiqDtbDqAMLKNuqQcTI1jGrSzhWK alHlYpiXJv4zA== Date: Thu, 22 Jun 2023 22:16:42 +0100 From: Mark Brown To: Eddie James Cc: Vincent Whitchurch , krzysztof.kozlowski@linaro.org, andi@etezian.org, kernel@axis.com, alim.akhtar@samsung.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 3/4] spi: Split transfers larger than max size Message-ID: References: <20220927112117.77599-1-vincent.whitchurch@axis.com> <20220927112117.77599-4-vincent.whitchurch@axis.com> <6dff003d-c727-e4a3-b5d3-f58beb2b02cb@linux.ibm.com> MIME-Version: 1.0 In-Reply-To: <6dff003d-c727-e4a3-b5d3-f58beb2b02cb@linux.ibm.com> X-Cookie: Slow day. Practice crawling. X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230622_141651_546545_F7423365 X-CRM114-Status: GOOD ( 21.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1823361609952928684==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============1823361609952928684== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="NQj34PwTfnw4PHDi" Content-Disposition: inline --NQj34PwTfnw4PHDi Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 22, 2023 at 02:48:36PM -0500, Eddie James wrote: > On 9/27/22 06:21, Vincent Whitchurch wrote: > > A couple of drivers call spi_split_transfers_maxsize() from their > > ->prepare_message() callbacks to split transfers which are too big for > > them to handle. Add support in the core to do this based on > > ->max_transfer_size() to avoid code duplication. > I've been testing AT25 functionality in linux 6.1 and I believe this patch > is breaking the AT25 protocol. It will split a write command up such that > some of the data is in a different transfer than=A0 the write enable and > address. According to my understanding of the AT25 spec, that doesn't > work... Someone correct me if I'm wrong though. Do we need a flag to > enable/disable this behavior depending on the client perhaps? Could you be more specific about the manner in which you think this is breaking things? The size of transfer is immaterial to the client device on SPI, the client will be counting clocks while the chip select is asserted. How the controller chooses to split things up is really not particularly visible or relevant, it might bitbang things out one bit at a time, transfer a single word at a time or batch things up further. So long as the chip select is asserted it's all the same to the client device. In any case this is all based on the maximum transfer size advertised by the conteroller driver, if the device can physically handle larger transfers then there's no reason for it to set a limit. If the driver can't physically handle larger transfers and it does make a difference then the system simply won't work. --NQj34PwTfnw4PHDi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmSUujkACgkQJNaLcl1U h9CPqgf/X1FRQ/Sr3bPuUa1Qk8QD6FT06cmknaYG6mWBtbznGfhPMgnpM0ivm/2c FKdQxPc7eUI5mBzxjx3wsm6Agmnw3LEV7kfgrwNYBUlwMH6BcMxmQ9S6rBqhvgXj tBXUiGkEjui8JRRBQZKy+lYexFEp6tGeFeW6OiLYShkyIZtZQiX93RhXB8zhLglK TMuOVuzrJDnXG35gAaa2ws0NQDkjI+5x/gsnQqkeRKOAyf8My2euyWMi2I2MWK7z L2dW33I3biwLv4X0fK75Yd5IhbRNBuu+hLv1WLutJ/v2yB4MHYaljnFbwlW57ooA EIT4Z/A4Qgo5MQl1zHN2TEGYH8+wIg== =vzqY -----END PGP SIGNATURE----- --NQj34PwTfnw4PHDi-- --===============1823361609952928684== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============1823361609952928684==--