Skip to content

drivers:jtag: Add time Out to avoid JTAG hang#253

Open
modolaty wants to merge 1 commit intointeg_sp8from
v080A_jtag
Open

drivers:jtag: Add time Out to avoid JTAG hang#253
modolaty wants to merge 1 commit intointeg_sp8from
v080A_jtag

Conversation

@modolaty
Copy link
Copy Markdown
Collaborator

To avoid JTAG driver hang add 1 sec time out to
wait_event_interruptible_timeout()

Tested:

  • verified in Morocco

To avoid JTAG driver hang add 1 sec time out to
    wait_event_interruptible_timeout()

Tested:
- verified in Morocco

Signed-off-by: modolaty <[email protected]>
@modolaty modolaty requested review from ashok2ku and srgovard March 30, 2026 22:05
aspeed_jtag->flag &
ASPEED_JTAG_INTCTRL_SHCPL_IRQ_STAT,
(long)msecs_to_jiffies(1000));
if (Lres == 0) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add
if (Lres < 0)
return Lres;

Lres = wait_event_interruptible_timeout(aspeed_jtag->jtag_wq,
aspeed_jtag->flag &
ASPEED_JTAG_INTCTRL_SHCPL_IRQ_STAT,
(long)msecs_to_jiffies(1000));
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check if this work - is long required - msecs_to_jiffies(1000);

if (Lres == 0) {
dev_err(aspeed_jtag->dev,
"aspeed_jtag_wait_shift_complete: timeout after 1 sec \n");
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add - return -ETIMEDOUT;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants