Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp528549pxb; Wed, 8 Sep 2021 06:43:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8/0oOz7lmihvKBV7gUcTsE02GEYJ2MJpvqcnMjXzpQAARKFTZoXYUmRNXJTlIU5EIX+kk X-Received: by 2002:a05:6638:d11:: with SMTP id q17mr3705219jaj.63.1631108594803; Wed, 08 Sep 2021 06:43:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631108594; cv=none; d=google.com; s=arc-20160816; b=BSdd6e+6RRPXBx4bH/TWL8O3yV5sw+0eueo/jX2uR6OsS05jqVVAFJc+JQxrOrYL4d L0us8p8nQ6AoE9BmwhLay+DMKXr99k4VNnHRAPc5L7DGIblbDlqf07l/4/QwtEKvoaCC +2VSGuJu7FPzvqzuz3LNUb15Hzxv1EV13hbT0GFMa6ofdNPgr6H+dCublY8Z5Y+2ibBK dWpb8lSGz9ndtJkejy9lEsSGMpOTy2cWyPr98O72IQuH1lpslwAnAk4yBSGBoUkwMp9N aGaT7IAt8xsZwwnIvP/3/ehO7yztXB0WUAkHgqVuSSU/xYm8iwUlvB6CrxcJAZOspMbG WwpA== 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=o02AjA/DkBO4MKiA0z1x+QbupBud7qRnZyGIFZHcYao=; b=xWnLxjy8RzjDjtzxHobkADmjiXcUK/0cX86wi89LXa0vz4nRvoCiS6gRcWMBWtUDwL DlwpuFUuRsoR1CEMVDYNmar3CQBu4unGlVI4W6TpxGibKMzUl8RBfkBt6j+wxxw7bmXj WiiifUc4/IhfpDx253410fvLFhlmly7jNcn8uq7KgbVnEW5nmhcFWFePAGxnkWo2rt9a ihMm69N+TMpj2Kk4ALRiNXgxq6igxLhtRmSwD9MJS+VBz25pAvgDR848+7T5d+CmgxJ0 EG01S6r1O+skK6w1OD5I1j/fYgezvSPUlXR1ng19tI8kbHOGBUQap5kb+9+cM9hzNelN WPRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=l4sa+fy6; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h25si2092408ioj.39.2021.09.08.06.43.02; Wed, 08 Sep 2021 06:43:14 -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=@ziepe.ca header.s=google header.b=l4sa+fy6; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235655AbhIHNlQ (ORCPT + 99 others); Wed, 8 Sep 2021 09:41:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235421AbhIHNlM (ORCPT ); Wed, 8 Sep 2021 09:41:12 -0400 Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C15D8C061757 for ; Wed, 8 Sep 2021 06:40:04 -0700 (PDT) Received: by mail-qt1-x836.google.com with SMTP id s15so1822161qta.10 for ; Wed, 08 Sep 2021 06:40:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=o02AjA/DkBO4MKiA0z1x+QbupBud7qRnZyGIFZHcYao=; b=l4sa+fy6SodMxTIshaKj9PVhrINrHfR0TBUotmfywrtBxkPUctE7ARDVtoLyJzqk0T a0DOinLWVb+AL1c/NFBMxMlDmrCGqFKdBRPNUizuq2pjvHcqlsGus/Mgrk/DYkJVvbYI US00z4gGu5tSC0R/bourR4g6SDrNv2CwsnYSHyWOwC41g/vE7lSYDbjIVyhiPvuFVH4R 9CAyW+JIGXraIK5zdOqmQnRWnfO7TBLs+bchKMTdza0KYq4tUA/MPtYD2oP4yGz02NvQ gryrj4XHXZLi9N79O+GOV/Yi48cTb7RlsYLruxYLpv2la3dERb+odMaMgOmX2q2yxlen 2CfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=o02AjA/DkBO4MKiA0z1x+QbupBud7qRnZyGIFZHcYao=; b=sAKyRIIBNyMx+i7s8O+ra8794kmdnqKPxVt1Di+5JnagGGayhupWzqz4EOT6XaYAcQ xdGzorx3QHkHNuqB19V3YohQkIo8ib42zaGNliQalpyq0oNYLlU84rJ92kVRloRKyCgB 7Inj2Rc2YyC24QSzFYo7BjQDRysmko8wkGbGTyZ1lNictS89C6TXjqh7Py1CN66hQTR2 XRpcWprHcXoTxAoTLzouHYQ2SwJAvFJGxivLm2zRuehbqORCpJOnE1fZoKo35R4l1WDx FJRORULHexsXzXU7JvhPJ4W09pPfZkOg7sZe/TodtHUJlP2LITK1rJ3Hl0afdMxcw1Zl KlFw== X-Gm-Message-State: AOAM530jEUVYYklIqhjOdsfwJ+OlkojC6zp0xnRW4R0GG8k0OLk6xgJj FEha/jKutZVV1CF+2Z3+f9V4kg== X-Received: by 2002:ac8:5194:: with SMTP id c20mr3672777qtn.68.1631108403918; Wed, 08 Sep 2021 06:40:03 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-162-113-129.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.113.129]) by smtp.gmail.com with ESMTPSA id 67sm1759261qkl.1.2021.09.08.06.40.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Sep 2021 06:40:03 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1mNxo2-00EWef-D5; Wed, 08 Sep 2021 10:40:02 -0300 Date: Wed, 8 Sep 2021 10:40:02 -0300 From: Jason Gunthorpe To: Florian Eckert Cc: peterhuewe@gmx.de, jarkko@kernel.org, Eckert.Florian@googlemail.com, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] tpm/tpm_i2c_infineon: Fix init endian vendor check Message-ID: <20210908134002.GY1200268@ziepe.ca> References: <20210908133416.12408-1-fe@dev.tdt.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210908133416.12408-1-fe@dev.tdt.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 08, 2021 at 03:34:16PM +0200, Florian Eckert wrote: > On my embedded system I use this tpm infineon chip via I2C. > My system is a MIPS architecture and therefore works in big endian mode. > > The problem is that the chip type is not recognised, because the vendor ID > is incorrectly stored in memory. > > By converting the vendor ID with ie32_to_cpus() to the correct format, > the TPM chip is recognised by the driver and works as expected. > > Signed-off-by: Florian Eckert > --- > drivers/char/tpm/tpm_i2c_infineon.c | 2 ++ > 1 file changed, 2 insertions(+) vendor should be marked as a __le32 and so forth Jason