Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp841289pxb; Fri, 22 Apr 2022 12:19:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyn3DqLLqiMjzNzM+hUCGJ4AjWKh6GSdcAOeqiIFfsri1Il26eT27NRMjT7Zso439QddyTO X-Received: by 2002:a17:902:d2c5:b0:158:f839:4d8a with SMTP id n5-20020a170902d2c500b00158f8394d8amr6068745plc.108.1650655181688; Fri, 22 Apr 2022 12:19:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650655181; cv=none; d=google.com; s=arc-20160816; b=Qf1HdhA3LjZBkGkwa44c3+ddtzVy9YYtv7Wq+R4qoMD0D9GVVSxd3gxp0CA2pSG+wS EaXjxuUW94dBSfUJAT2bkEoe1RsVcKY2nwMxe515PRKuYitdVsBXqjt24DXmw5inxtQO FpiFYMcmhRvatHJg2dNjHZxqtEv4b+m5ESmcSjXUDfW4uft3m6djFXxjA36TyPhnsu84 44WdQeu1PtIomB0DKyjBR2QjGDhOyAUO/ud/gXbZw80OFLsJQF8S8GARZGYoFWIXo7+g r8ye22KjdQZETqHlbkeXtLc2Wf5u2qvbmQvviE3UDt1B5wgxpf7q0vcjUQCJ3yX0qDFH lu5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=W/2Za70C1RHKqi8XDzjUDlZrNvCkjmOJSSy94nVWdeo=; b=rPCgHSJfT+uIeo4fvfUtzy7ajaZGOchEQ46DBQMM2SKS4+U5tyEdHsntj+dkEN+Ijx Gn44VXpTtFjx0cFaKWoD2Z+Egy4hfEfgi3BRKn5clpEfnu6VJM90PymuBTcHjCa86AFQ 8gIwvIrQOetjOJB14vStiOj12CG0lpLwwDnJluss4p1px+lujPFQ7SBDBAB3OhOkfj64 373pzbJJvIj7J8ZK9Ny+yM30kyoKKEEbmq9jwa2uGVFOHSTBwYhgKtYQCQDtR1LLqHqp +bz1hJ46y/W5wh7pSisrRqD+tArARKPZ97zLgZXsXabboN99BCIKo9/62JctkfelO06L 7HKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=V6zMP4bR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id f7-20020a170902860700b00156ae419651si8468266plo.401.2022.04.22.12.19.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 12:19:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=V6zMP4bR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 14ACE1569F5; Fri, 22 Apr 2022 11:34:15 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229436AbiDUQ2R (ORCPT + 99 others); Thu, 21 Apr 2022 12:28:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1390499AbiDUQKY (ORCPT ); Thu, 21 Apr 2022 12:10:24 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DAA14739D for ; Thu, 21 Apr 2022 09:07:34 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id 17-20020a05600c021100b00393a19f8f98so708346wmi.4 for ; Thu, 21 Apr 2022 09:07:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=W/2Za70C1RHKqi8XDzjUDlZrNvCkjmOJSSy94nVWdeo=; b=V6zMP4bR03OtSHzQnhQ8C07/7liPhzxks7VIQDG9UyNJlBm3gL9cl4qycYdZpw/6/8 gnRZzPoPbAm6EteTZIlMDohqau4tlXHabCZVBb8CNbV34fkBdNicaT8J7KVwITEkZ202 MF+Jc+m5W5Nd6ChFOK7ImjudxfaZq5yp7KfW4iFKia9NQ2gtarCUKeCP1t3Ij7iJphyq bxp3IJ8k2nd9DtzjAWA/30ru4FTtDp8Cfli7RMLYwxFFZynSMhKH+hYRChs7nfdIceq7 gc3SzrGQ7nDluILkLngZeZYVy8TBLepLx6mbM/bq0f9FBLKpE9t00Ah4un9atburVfsZ nBOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=W/2Za70C1RHKqi8XDzjUDlZrNvCkjmOJSSy94nVWdeo=; b=NI1WuebuGKkwoVC1n7BqUE4Tav7yXj0fSFuWnMdLvNVOH5IvNvgNASRogJWvJik6ie Lb73ktDll3m7yldg9oIdLIURD4w3BjMg5M9bbEzoeer+LHW9PTb/hovcsKspr9kU+N24 EI6epcgXOkP12TsUptqGuylLRUQvgsmXTSZqxaDpq2jk2wk68AwRpqIOkFoaOGzD8Eca 6oLwupsOKAnPXyPc1Mf+rM/TsHOy/+ENiaoaaiPcDyzZYq090pjs+Dq6KCC+ArSLnSp1 if2Hjqj1qpI+Rh4lYYe+Y+W6/+/6I+ECwzi5xLP3mOdVzp7FI9f5VBRhDV8kvgfOKxqy JAxw== X-Gm-Message-State: AOAM532fsXtZswL3pYnP6spH2QLi4jHLWS/XoV0oU8cn8D4RRPCIWh/N 6suWeAtO9oApYkn1UYJxmDvE+YnDwe80n0mM4WH+Cw== X-Received: by 2002:a05:600c:1990:b0:392:7119:b55d with SMTP id t16-20020a05600c199000b003927119b55dmr75078wmq.49.1650557252813; Thu, 21 Apr 2022 09:07:32 -0700 (PDT) MIME-Version: 1.0 References: <20220419163749.1.Ica39bd8d1494f750a70a668e5929f6e5e63241f2@changeid> In-Reply-To: From: Jes Klinke Date: Thu, 21 Apr 2022 09:07:21 -0700 Message-ID: Subject: Re: [PATCH v2] tpm: cr50: Add new device/vendor ID 0x504a6666 To: Paul Menzel Cc: "Jes B. Klinke" , linux-integrity@vger.kernel.org, Jarkko Sakkinen , Jason Gunthorpe , Peter Huewe , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,USER_IN_DEF_DKIM_WL autolearn=no 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 Dear Paul, On Wed, Apr 20, 2022 at 3:52 AM Paul Menzel wrote: > > Dear Jes, > > > Am 20.04.22 um 01:37 schrieb Jes B. Klinke: > > Accept one additional numerical value of DID:VID for next generation > > Google TPM with new firmware, to be used in future Chromebooks. > > > > The TPM with the new firmware has the code name TI50, and is going to > > use the same interfaces. > > > > Signed-off-by: Jes B. Klinke > > Reviewed-by: Jarkko Sakkinen > > --- > > > > drivers/char/tpm/tpm_tis_i2c_cr50.c | 7 ++++--- > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/char/tpm/tpm_tis_i2c_cr50.c b/drivers/char/tpm/tpm= _tis_i2c_cr50.c > > index f6c0affbb4567..4ddb8ff3a8569 100644 > > --- a/drivers/char/tpm/tpm_tis_i2c_cr50.c > > +++ b/drivers/char/tpm/tpm_tis_i2c_cr50.c > > @@ -31,6 +31,7 @@ > > #define TPM_CR50_TIMEOUT_SHORT_MS 2 /* Short timeout = during transactions */ > > #define TPM_CR50_TIMEOUT_NOIRQ_MS 20 /* Timeout for TP= M ready without IRQ */ > > #define TPM_CR50_I2C_DID_VID 0x00281ae0L /* Device= and vendor ID reg value */ > > +#define TPM_TI50_I2C_DID_VID 0x504a6666L /* Device and ven= dor ID reg value */ > > #define TPM_CR50_I2C_MAX_RETRIES 3 /* Max retries du= e to I2C errors */ > > #define TPM_CR50_I2C_RETRY_DELAY_LO 55 /* Min usecs betw= een retries on I2C */ > > #define TPM_CR50_I2C_RETRY_DELAY_HI 65 /* Max usecs betw= een retries on I2C */ > > @@ -742,15 +743,15 @@ static int tpm_cr50_i2c_probe(struct i2c_client *= client) > > } > > > > vendor =3D le32_to_cpup((__le32 *)buf); > > - if (vendor !=3D TPM_CR50_I2C_DID_VID) { > > + if (vendor !=3D TPM_CR50_I2C_DID_VID && vendor !=3D TPM_TI50_I2C_= DID_VID) { > > dev_err(dev, "Vendor ID did not match! ID was %08x\n", ve= ndor); > > tpm_cr50_release_locality(chip, true); > > return -ENODEV; > > } > > > > - dev_info(dev, "cr50 TPM 2.0 (i2c 0x%02x irq %d id 0x%x)\n", > > + dev_info(dev, "%s TPM 2.0 (i2c 0x%02x irq %d id 0x%x)\n", > > + vendor =3D=3D TPM_TI50_I2C_DID_VID ? "ti50" : "cr50", > > client->addr, client->irq, vendor >> 16); > > - > > Remove this blank line wasn=E2=80=99t needed, I gues. You are right, I should probably have left the blank line untouched. It does not hurt the readability of the code much to remove it, though. > > return tpm_chip_register(chip); > > } > > > > Thank for addressing the other comments, and congratulations on getting > your first commit into the Linux kernel. When I think about it, I did propose a kernel patch in 2002, to introduce /proc/sys/kernel/core_pattern, so this is my second patch. All the mailing lists, and formal review process this time seemed daunting at first, though, so thank you for guiding me through the process. Regards Jes