On 2012-11-20 11:05 AM, Felix Liao wrote:
>> Hi Felix F, I'm Felix Liao from WatchGuard, I think we should 
>> spin_lock_irqsave and spin_unlock_irqrestore on sc_pcu_lock in the 
>> ath9k_tasklet() instead of spin_lock/spin_unlock, just to avoid the tasklet 
>> being interrupted by the hardware IRQ, do you think so?
>Using an IRQ spinlock in the tasklet is not the correct solution. If the IRQ 
>fires while the tasklet is running, it means that the driver does not properly 
>disable IRQs in the handler. They're supposed to get disabled there and 
>re-enabled only after the tasklet has completed.


My 2 cents. 
I disagree this statement "They're supposed to get disabled there and 
re-enabled only after the tasklet has completed."
In general, IRQs should be able to interrupt tasklet. Otherwise, it defeats the 
purpose of using tasklet. 

Only when both tasklet and IRQs can access common resources(critical region), 
IRQ needs to be disabled before tasklet access this resource and re-enable 
after that.

_______________________________________________
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel
_______________________________________________
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

Reply via email to