TIS interrupt routing and enable registers may lose their state across S3, while the driver retains its software indication that interrupts work. A subsequent locality or command wait can then sleep for an interrupt that cannot arrive. Remember whether interrupts worked before suspend and restore the vector, pending status, and enable mask before TPM2_Startup. Put the transport in polling mode first; the interrupt handler promotes it back to interrupt waits only after observing an interrupt from the restored configuration. If register restoration fails, Startup and subsequent commands continue using polling. Preserve the initial interrupt-enable mask, including the firmware's trigger and polarity selection proven by the attach-time interrupt test, and restore that exact mask rather than accepting post-S3 defaults. Program the same safe baseline for polling devices during attach and resume. Acquire locality, disable global interrupt delivery, and acknowledge pending status so firmware cannot leave interrupts armed without a handler. Use the same register-programming helper during attach and resume, and stop trying to configure interrupts after a locality acquisition failure. Three consecutive device suspend and resume cycles completed on a Lenovo TPM2 FIFO device without an IRQ resource. GetRandom succeeded after each resume, and module detach completed without errors. MFC after: 2 weeks
Details
Details
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped