Re: [PATCH v2 5/6] x86/microcode/intel: Support mailbox transfer
From: Chang S. Bae
Date: Thu Mar 27 2025 - 10:13:19 EST
On 3/26/2025 8:32 PM, Chao Gao wrote:
and in send_data_chunk(), do:
staging.state = wait_for_transaction();
return staging.state != UCODE_OK;
It is simpler and requires less code. Even better, send_data_chunk() can just
propagate the ucode_state to its caller.
Thanks for the suggestion. To me, this is more of a stylistic choice.
Previously, the call site had a single line:
return wait_for_transaction();
By the way, checkpatch.pl warns that 'msleep < 20ms can sleep for up to 20ms;
see function description of msleep().' This makes me wonder how the 10ms
timeout was determined but not precisely enforced. Is it arbitrary or selected
for specific reasons?
Yes, I saw that warning. It notes that msleep(1) could sleep for longer
than 1 ms, which I thought was acceptable. The 10 ms timeout was
determined through discussions with the firmware team responsible for
staging.
Thanks,
Chang