Re: [PATCH v7 07/22] coco/tdx-host: Implement firmware upload sysfs ABI for TDX module updates
From: Chao Gao
Date: Wed Apr 01 2026 - 04:03:19 EST
On Tue, Mar 31, 2026 at 08:11:22AM -0700, Dave Hansen wrote:
>On 3/31/26 05:41, Chao Gao wrote:
>> +static enum fw_upload_err tdx_fw_poll_complete(struct fw_upload *fwl)
>> +{
>> + /*
>> + * TDX module updates are completed in the previous phase
>> + * (tdx_fw_write()). If any error occurred, the previous phase
>> + * would return an error code to abort the update process. In
>> + * other words, reaching this point means the update succeeded.
>> + */
>> + return FW_UPLOAD_ERR_NONE;
>> +}
>> +
>
>This will be the seventh 'fw_upload_ops' and the third that has this
>pattern of not needing a ->poll_complete() implementation. It seems like
>allowing a NULL ->poll_complete or having a common stub for this pattern
>would be worthwhile.
Thanks for this suggestion. allowing a NULL ->poll_complete looks good.
I will post a separate series for this. the core change would be: