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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 715C9C7EE33 for ; Wed, 1 Mar 2023 14:09:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229962AbjCAOJk (ORCPT ); Wed, 1 Mar 2023 09:09:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229944AbjCAOJi (ORCPT ); Wed, 1 Mar 2023 09:09:38 -0500 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 681983E0B7; Wed, 1 Mar 2023 06:09:28 -0800 (PST) Received: by mail-ed1-x533.google.com with SMTP id cw28so5155465edb.5; Wed, 01 Mar 2023 06:09:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677679767; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=VQ2h5y+b44F+mobDdB2zdaT79/B0GO70ffL6CZHUWgE=; b=JrRY8a+aDfmP7FhclenYHyfaudCjQqqMaVlFEzXA9zsMH1pLKxTA1IZvqtbLGQvo2j S6zzYEWFEM5tPZEu+VCWHhbWHFtT7IYXDV0J5e6HOk+15cK6DBkgz7TBehXMPuBWZzIP g+54aw9uzSVCq6g+LaveaEbLm8tLIXyVL/8Y8GF36jU2rE8jMMxOmxCgzNuRvOdcXGVw 9sF7TixOanZdaE+bxsN1as2U3iQgRMu1mTg9GtnMlrysO+ZQ9pQbmniN4tnuRWWogyCJ IlNYPuKpA50iV9ObYw18WiFTaZaZy1TRbl9qVdeT8FWLtrneFHJ/iukyrpL02BftqTbq LtdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677679767; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VQ2h5y+b44F+mobDdB2zdaT79/B0GO70ffL6CZHUWgE=; b=HvdXkk3AdeABLztt+V4nq0HiKUMbPCMm6Bocn8xEMC2El2imyn0zv0LvKMKzysdAx/ wR/VtG9Hx8cfiuaJDwI3qI8iQBycIy8BMFqxNDbuG9gcqvfCwctoWe5knlyORe83rGNo RQBcAs9er+ulrVsq9WugJP08bX81HxmoqFTkyJQhCuKIAzKsrWl9aIaSZ03eZWhxvG3/ NLoABFfmFqDuetCiG2M9MAHa5SUQQsdNClvaFc3czgCAQWEL0hRf66nYDpyG224zur69 /G9YsPZQfphA8zrar/0WlKDMX8DCkOGyvw4wFxiz5xryA53GMtlmwHwvaxA3ayqnR5DB SSvQ== X-Gm-Message-State: AO0yUKUNawCjGlFjRXLNaiUTv77dCx45rNA9V0bf8umYlopW+Ht67QKT D9r9tLoar0h8ajEtXKZCcho= X-Google-Smtp-Source: AK7set/MejFRKaJfqO1GVMw1llYY9kytb3ybjbJGwgizkRQJSDCVCjXyIjIgM0jO8roS7tmQ69h05Q== X-Received: by 2002:a17:906:4d4b:b0:8af:2a97:91d4 with SMTP id b11-20020a1709064d4b00b008af2a9791d4mr6644489ejv.14.1677679766724; Wed, 01 Mar 2023 06:09:26 -0800 (PST) Received: from orome (p200300e41f1c0800f22f74fffe1f3a53.dip0.t-ipconnect.de. [2003:e4:1f1c:800:f22f:74ff:fe1f:3a53]) by smtp.gmail.com with ESMTPSA id qp16-20020a170907207000b008eb5877a221sm5813466ejb.75.2023.03.01.06.09.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Mar 2023 06:09:26 -0800 (PST) Date: Wed, 1 Mar 2023 15:09:24 +0100 From: Thierry Reding To: Jason Gunthorpe Cc: Mark Brown , Krishna Yarlagadda , Jarkko Sakkinen , "robh+dt@kernel.org" , "peterhuewe@gmx.de" , "krzysztof.kozlowski+dt@linaro.org" , "linux-spi@vger.kernel.org" , "linux-tegra@vger.kernel.org" , "linux-integrity@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Jonathan Hunter , Sowjanya Komatineni , Laxman Dewangan Subject: Re: [Patch V5 2/3] tpm_tis-spi: Support hardware wait polling Message-ID: References: <20230227120702.13180-1-kyarlagadda@nvidia.com> <20230227120702.13180-3-kyarlagadda@nvidia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="L7TwG/A0jb5em9Jb" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.2.9 (2022-11-12) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --L7TwG/A0jb5em9Jb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 01, 2023 at 09:39:28AM -0400, Jason Gunthorpe wrote: > On Wed, Mar 01, 2023 at 12:37:27PM +0000, Mark Brown wrote: > > On Wed, Mar 01, 2023 at 08:27:45AM -0400, Jason Gunthorpe wrote: > > > On Wed, Mar 01, 2023 at 11:56:53AM +0000, Krishna Yarlagadda wrote: > >=20 > > > > TPM device connected behind half duplex controller can only work > > > > this way. So, no additional flag needed to check. > >=20 > > > Just because a DT hooks it up this way doesn't mean the kernel driver > > > can support it, eg support hasn't been implemented in an older SPI > > > driver or something. > >=20 > > > If the failure mode is anything other than the TPM doesn't probe we > > > will need to check for support. > >=20 > > It's not like these buses are hot pluggable - someone would have to > > design and manufacture a board which doesn't work. It's probably > > reasonable for this to fail with the SPI subsystem saying it can't > > support things when the operation is tried. >=20 > If the spi subsystem fails this request with these flags that would be > great, it would cause the TPM to fail probing reliably. >=20 > But does this patch do that? It looks like non-supporting half duplex > drivers will just ignore the new flag? I think the assumption is that there are currently no half duplex drivers that would be impacted by this. If I understand correctly, the TPM driver currently supports only full duplex controllers, because that's required in order to detect the wait state in software. So, yes, half duplex controllers would ignore this flag, but since they couldn't have supported TPM flow control before anyway it doesn't make a difference. Thierry --L7TwG/A0jb5em9Jb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmP/XJIACgkQ3SOs138+ s6E0sA//aMFMddr/WWIey7Ad32TSDXrGtSEPVXMk5rWm6crWKj7Py6JqCe/y+q8J uVjrk8XOsPW/YfZnPrdjQMyJ9Kke+SqFrptQ2Dy08/6szO08PURxs5vfs773EYxG viQywY/kNpaRkPUrpkSTGtwJDI3/OruuxJ539FEwwF3uPeRGykYv5BngON/2Dymo kvwRaIs/nQXtYDX/RAPPXyPbFgpRPKYE2MvEqbZ9z2gsc6BJUkYn65PcTmnARFho WuUbkltRjAFtKDlhfiOmetPQGi5COUsitMHM2gI6zqpH09mznnTo7ilwMvKP2UGd aoGRmyyV0L3a3WpMa9okjDMutqeBCNKle3q9n7ezf1Ztz8d8yRUap/VLYOjHlrt6 4M2j2L7PmZaKXSKKp91+Sky5m+2c0ZX7l1o5ahIquZtLULcSCPKpVdz2rfAwDN2N iFITSw9PyfKX7clGSJ3T8Gbr+TUm6HnG6bmTU4CFs64rolmg2JM4Tj8HJYAK+DDj /J3iYwdduA5jdOpwFEFmhwnb0XMVVYRCufIFER1Ix7cG1WMJPpPr+zHC490/Gom+ Cq54KRs2WXRXlolOmEmnsQN3iZ0tBQPHuNkJmOmQLnWhDXkNzmYMU/BiPH/WZV/A CoHwTOX/uP6FUeYJtNeXrCCz/x8gaLfG3kz9+1Ps31oO0urBnVg= =RWuP -----END PGP SIGNATURE----- --L7TwG/A0jb5em9Jb--