mei: me: reduce the scope on unexpected reset
Subsystems (2)
Alexander Usyskin
maintainerPATCH v2 1/1 mei: me: reduce the scope on unexpected reset
Avoid false-positive detection of unready hardware by triggering link reset only when we have driver in ENABLED state.
Reported-by Todd Brandt <[email protected]>
Tested-by Todd Brandt <[email protected]>
Fixes 2cedb296988c ("mei: me: trigger link reset if hw ready is unexpected")
Signed-off-by Alexander Usyskin <[email protected]>
---
V2: rebase over v7.0-rc4
drivers/misc/mei/hw-me.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-)
drivers/misc/mei/hw-me.c +4 -10
@@ -1337,19 +1337,13 @@ irqreturn_t mei_me_irq_thread_handler(int irq, void *dev_id)/* check if we need to start the dev */ if (!mei_host_is_ready (dev)) {if (mei_hw_is_ready (dev)) { -/* synchronized by dev mutex */ -if (waitqueue_active (&dev->wait_hw_ready)) { -dev_dbg (&dev->dev,"we need to start the dev.\n" ); - dev->recvd_hw_ready = true; -wake_up (&dev->wait_hw_ready); - }else if (dev->dev_state !=MEI_DEV_UNINITIALIZED && - dev->dev_state !=MEI_DEV_POWERING_DOWN && - dev->dev_state !=MEI_DEV_POWER_DOWN ) { +if (dev->dev_state ==MEI_DEV_ENABLED ) {dev_dbg (&dev->dev,"Force link reset.\n" );schedule_work (&dev->reset_work); }else { -dev_dbg (&dev->dev,"Ignore this interrupt in state = %d\n" , - dev->dev_state); +dev_dbg (&dev->dev,"we need to start the dev.\n" ); + dev->recvd_hw_ready = true; +wake_up (&dev->wait_hw_ready); } }else {dev_dbg (&dev->dev,"Spurious Interrupt\n" );
Signature · 1 line
2.43.0