Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ena/drv): handle last irq disregarding to sl-state #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,14 @@ static irqreturn_t prestera_tl_ISR(int irq, void *tl)

BUG_ON(!sl);

if (unlikely((sl->state == IRQ_SLOT_STATE_ALLOCATED))) /* handle last interrupt after process termination */
atomic_dec(&sl->depth);
/* handle last interrupt after process termination
* disregarding to (sl->state==IRQ_SLOT_STATE_ALLOCATED)
*/
atomic_dec(&sl->depth);
/* Disable the interrupt vector */
disable_irq_nosync(irq);
/* Enqueue the PP task BH in the tasklet */
if (unlikely((sl->state == IRQ_SLOT_STATE_ALLOCATED))) /* handle last interrupt after process termination */
tasklet_hi_schedule((struct tasklet_struct *)tl);
tasklet_hi_schedule((struct tasklet_struct *)tl);

return IRQ_HANDLED;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,14 @@ static irqreturn_t prestera_tl_ISR(int irq, void *tl)

BUG_ON(!sl);

if (unlikely((sl->state == IRQ_SLOT_STATE_ALLOCATED))) /* handle last interrupt after process termination */
atomic_dec(&sl->depth);
/* handle last interrupt after process termination
* disregarding to (sl->state==IRQ_SLOT_STATE_ALLOCATED)
*/
atomic_dec(&sl->depth);
/* Disable the interrupt vector */
disable_irq_nosync(irq);
/* Enqueue the PP task BH in the tasklet */
if (unlikely((sl->state == IRQ_SLOT_STATE_ALLOCATED))) /* handle last interrupt after process termination */
tasklet_hi_schedule((struct tasklet_struct *)tl);
tasklet_hi_schedule((struct tasklet_struct *)tl);

return IRQ_HANDLED;
}
Expand Down