Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp11526172rwd; Thu, 22 Jun 2023 14:46:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ40Kqi9GNUkTZbNqzlgC+AVLU2sCHy0T0+Lev5ZH+kMr5O3hdBq/xygFs6yj2+Me6KL8/kr X-Received: by 2002:a9d:6310:0:b0:6af:9b42:9794 with SMTP id q16-20020a9d6310000000b006af9b429794mr13227256otk.35.1687470395097; Thu, 22 Jun 2023 14:46:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687470395; cv=none; d=google.com; s=arc-20160816; b=g8/ShPM6jpzWe8dDiymrgZVyqmI8ehk3c7u/5+8fSGa3S5fcLgzkachM/2dPpBW+Xz LMVlvc83LqF7ZQcPwA/+bvkhIpQdbNo1hAOvsQNVSBdNLypHSP1+PUDrxuBfJgY7vc2H Qi+GCTsq5U/EPnTSKE7+NsUxRccXTaREW6MpJdKbbUKyZuKktedfqqpqYOczG69aliSq j8RzWJgDsJEEIPToiIMiLy5XALsDqPGW2F9En8u0v90giKS/JueaxZEmvG6WJrhqsbyU 8/ZTVxr6dDkDcm1166el8XwNgTxi4yxI2v6xLEUVe6AgAytmLccwA9NnUmHD6hy0M1AW 6liw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Crb6LJI4lW2USxg/KnmMgZMbN/cQXlDHogJ5AXmkoCg=; b=gQcEmTlvF+zgUXHrK7sCSaJ5nHelw+77GjFOuUOQh9awy4lILn25uBWOFExqQXZqmS hQKu0urmO2DUVxn2lSxlLK7/MkY0DNneiOg7SowlG/ZH2T4GiDKC7l0EYkwoo7VOzCVR cAztFoZTreDmCRYT3IMEcM34JZkSkzJQB8u/SEi40pvsdNT9I6FtTB4/2g3nfUwPYr2m UZl2/UZTyk1ZobHOzLHq5TPlBdTAYNhsflQTtaNLNKnRFk5IXRBqrEdwxtLI9yb6o6Sh tiRGYOQVgm4LPQTay+MfaF5vbi8qPeSvS2yJFaADV4ma+1rcu6RLRjUu9XYHwTiFZE7n PBTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GWOWGlXK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s3-20020a63d043000000b0053fa2f589aesi3791880pgi.884.2023.06.22.14.46.22; Thu, 22 Jun 2023 14:46:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GWOWGlXK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231231AbjFVVQx (ORCPT + 99 others); Thu, 22 Jun 2023 17:16:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229986AbjFVVQv (ORCPT ); Thu, 22 Jun 2023 17:16:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADDB7195; Thu, 22 Jun 2023 14:16:50 -0700 (PDT) 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 3C57361903; 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 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="NQj34PwTfnw4PHDi" Content-Disposition: inline In-Reply-To: <6dff003d-c727-e4a3-b5d3-f58beb2b02cb@linux.ibm.com> X-Cookie: Slow day. Practice crawling. X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --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--