lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <01959c869e01075705cd436afa822f2586d0509c.camel@kernel.org>
Date:   Sat, 11 Mar 2023 23:48:57 +0200
From:   Jarkko Sakkinen <jarkko@...nel.org>
To:     Krishna Yarlagadda <kyarlagadda@...dia.com>, robh+dt@...nel.org,
        broonie@...nel.org, peterhuewe@....de, jgg@...pe.ca,
        krzysztof.kozlowski+dt@...aro.org, linux-spi@...r.kernel.org,
        linux-tegra@...r.kernel.org, linux-integrity@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     thierry.reding@...il.com, jonathanh@...dia.com,
        skomatineni@...dia.com, ldewangan@...dia.com
Subject: Re: [Patch V8 2/3] tpm_tis-spi: Add hardware wait polling

On Thu, 2023-03-02 at 09:48 +0530, Krishna Yarlagadda wrote:
> +int tpm_tis_spi_transfer(struct tpm_tis_data *data, u32 addr, u16
> len,
> +                        u8 *in, const u8 *out)
> +{
> +       struct tpm_tis_spi_phy *phy = to_tpm_tis_spi_phy(data);
> +       struct spi_controller *ctlr = phy->spi_device->controller;
> +
> +       /*
> +        * TPM flow control over SPI requires full duplex support.
> +        * Send entire message to a half duplex controller to handle
> +        * wait polling in controller.
> +        * Set TPM HW flow control flag..
> +        */
> +       if (ctlr->flags & SPI_CONTROLLER_HALF_DUPLEX)
> +               return tpm_tis_spi_hw_flow_transfer(data, addr, len,
> in,
> +                                                   out);
> +       else
> +               return tpm_tis_spi_sw_flow_transfer(data, addr, len,
> in,
> +                                                   out);
> +}
> +

Based on the condition, better names would be

1. tpm_tis_spi_transfer_half()
2. tpm_tis_spi_transfer_full()

BR, Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ