[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210913130210.GD3544071@ziepe.ca>
Date: Mon, 13 Sep 2021 10:02:10 -0300
From: Jason Gunthorpe <jgg@...pe.ca>
To: Florian Eckert <fe@....tdt.de>
Cc: peterhuewe@....de, jarkko@...nel.org,
Eckert.Florian@...glemail.com, linux-integrity@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/1] tpm/tpm_i2c_infineon: Fix init endian vendor check
On Mon, Sep 13, 2021 at 02:05:21PM +0200, Florian Eckert wrote:
> On my embedded system I use this tpm infineon chip via i2c bus.
> The system is a MIPS architecture and therefore works in big endian mode.
>
> The problem is, that the chip type is not correctly recognized,
> because the vendor ID is wrongly aligned in the memory.
>
> By declaring the vendor ID variable as a `__le32` type, the TPM chip is
> then correctly recognized by the driver and feels then responsible.
>
> The device works than as expected.
>
> Signed-off-by: Florian Eckert <fe@....tdt.de>
> ---
> v2:
> * use variable type instead of le32_to_cpus function call
> drivers/char/tpm/tpm_i2c_infineon.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
And if you do this it need to be made sparse clean/etc
Jason
Powered by blists - more mailing lists