Search Linux Wireless

Re: ath5k: kernel timing screwed - due to unserialised register access?

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

 



2008/10/10 Thomas Gleixner <tglx@xxxxxxxxxxxxx>:
> On Fri, 10 Oct 2008, Elias Oltmanns wrote:
>> That printk() has not been hit, I'm afraid. The output of
>> sysrq_timer_list_show() looks much the same but there is no message
>> about softirqs. Just for the record, I've switched to 2.6.27 because I'm
>> debugging something else at the same time, but it doesn't make any
>> difference.
>>
>> Now, here is another question: There are various snippets like the
>> following in the ath5k driver:
>>
>>       /* Wait until the noise floor is calibrated and read the value */
>>       for (i = 20; i > 0; i--) {
>>               mdelay(1);
>
> Uurgh. That's broken. mdelay sleeps so this should not be called in
> softirq context.
>
>>               noise_floor = ath5k_hw_reg_read(ah, AR5K_PHY_NF);
>>               noise_floor = AR5K_PHY_NF_RVAL(noise_floor);
>>               if (noise_floor & AR5K_PHY_NF_ACTIVE) {
>>                       noise_floor = AR5K_PHY_NF_AVAL(noise_floor);
>>
>>                       if (noise_floor <= AR5K_TUNE_NOISE_FLOOR)
>>                               break;
>>               }
>>       }
>>
>> This particular one is in
>> drivers/net/wireless/ath5k/phy.c:ath5k_hw_noise_floor_calibration()
>> which is called from ath5k_calibrate(), the callback executed every ten
>> seconds in softirq context. Could this have anything to do with our
>
> That makes sense. The timer expires early events are multiples of 10s
> apart.
>
> Thanks,
>
>        tglx

What should we use then ? udelay(1000) ?


-- 
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick
--
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 Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux