Re: [PATCH v6 2/4] crypto: ccp: Return doorbell status code as an argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -int psp_ring_platform_doorbell(int msg)
> +int psp_ring_platform_doorbell(int msg, u32 *result)
>  {
>         struct psp_device *psp = psp_get_master_device();
>         struct psp_platform_access_device *pa_dev;
> @@ -184,6 +184,8 @@ int psp_ring_platform_doorbell(int msg)
>
>         val = FIELD_GET(PSP_CMDRESP_STS, ioread32(cmd));
>         if (val) {
> +               if (result)
> +                       *result = val;
>                 ret = -EIO;
>                 goto unlock;
>         }
The bitfields in the new mailbox architecture have changed, as it is
now a dedicated mailbox for I2C arbitration. The 8 lsbs are used for
command and response status, and bit 31 is the ready bit.
Accounting for these changes, I was able to get the TPM contention
test to pass locally. I also removed calls to "check_doorbell" and
"check_recovery" as those steps weren't described in the design doc.



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux