Search Linux Wireless

Re: [PATCH v2 09/22] ath9k: Handle fatal interrupts properly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2012-05-29 2:36 PM, Johannes Berg wrote:
> On Tue, 2012-05-29 at 14:29 +0200, Felix Fietkau wrote:
>> On 2012-05-24 6:02 AM, Sujith Manoharan wrote:
>> > When a fatal interrupt is received or it is detected that the baseband
>> > has hung, the chip has to be reset immediately.  Otherwise, we end up
>> > processing spurious interrupts. Ensure that we bail out properly in
>> > the ISR when the reset work hasn't completed yet.
>> > 
>> > Signed-off-by: Sujith Manoharan <c_manoha@xxxxxxxxxxxxxxxx>
>> Wouldn't it be much easier to just use a bool variable instead of the
>> combination of lock+flag? A simple variable assignment is atomic...
> 
> Is that guaranteed for bool variables?
Hm, good point. Maybe use u32 then. Either way, the lock in this patch
does almost nothing to protect against race conditions, since it doesn't
apply to other places in the code that change sc->sc_flags.
Maybe we should change that entire thing to just use set_bit/test_bit
instead.

- Felix
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux