On Thu, 27 Nov 2025 23:07:02 +0000 Andre Carvalho wrote:
Should we not be listening for the REGISTER event then? On boot we force UP the device if we find it, theoretically there may be a case where user space is not configured to UP the device, and then we'd never resume the target?
This is indeed a limitation on the current implementation. Based on your feedback, I'm working on a new version of this series handling REGISTER instead of UP and ensuring we force UP the device. This will make it consistent with the boot behavior you described.
Based on my tests, I can't force the device UP while handling the REGISTER event. I believe this is due to dev_open attempting to lock the device which is already held. For this reason, I'm resorting to defering this to a workqueue, similar to my approach on v1 [1] (but correctly handling target_list lock).
Let me know if this approach makes sense or if I'm missing something.
SG, that's probably the most resilient solution.