mpfs/mpfs_usb.c: Fix interrupt handling in SMP mode
The interrupt handler accesses the device as well as the driver's private data. Thus, must take the big kernel lock in SMP mode to protect them. Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
This commit is contained in:
parent
72bba3b2ee
commit
67b17cb4d7
1 changed files with 10 additions and 0 deletions
|
|
@ -3430,6 +3430,10 @@ static int mpfs_usb_interrupt(int irq, void *context, void *arg)
|
|||
uint16_t pending_tx_ep;
|
||||
int i;
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
irqstate_t flags = enter_critical_section();
|
||||
#endif
|
||||
|
||||
/* Get the device interrupts */
|
||||
|
||||
isr = getreg8(MPFS_USB_IRQ);
|
||||
|
|
@ -3455,6 +3459,9 @@ static int mpfs_usb_interrupt(int irq, void *context, void *arg)
|
|||
priv->usbdev.dualspeed = 1;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
leave_critical_section(flags);
|
||||
#endif
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
|
@ -3539,6 +3546,9 @@ static int mpfs_usb_interrupt(int irq, void *context, void *arg)
|
|||
mpfs_resume(priv);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
leave_critical_section(flags);
|
||||
#endif
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue