cvs commit: src/sys/dev/ata ata-chipset.c
Søren Schmidt
sos at DeepCore.dk
Tue Aug 24 13:36:53 PDT 2004
Scott Long wrote:
> SXren Schmidt wrote:
>
>> sos 2004-08-24 20:11:26 UTC
>>
>> FreeBSD src repository
>>
>> Modified files:
>> sys/dev/ata ata-chipset.c Log:
>> Sii_reset needs to wait up to 1 second to get slow disks with it so
>> use tsleep instead of DELAY.
>> Revision Changes Path
>> 1.82 +1 -1 src/sys/dev/ata/ata-chipset.c
>
>
> I'm having a hard time following the code here, but it looks like
> ch->hw.reset() can get called with a mutex held, yes? hw.reset() will
> in turn wind up calling ctrl->reset(), which will call sii_reset() in
> the sii case. That means that the tsleep() can get called with a
> mutex held. This is probably not what you want. Also, if you are
> expecting the ctrl->reset() to work correctly before interrupts are
> enabled, you should be aware that tsleep and msleep will return
> immediately instead of sleeping in this case. Only DELAY() is safe
> (relatively) to use at boot before interrupts are enabled.
The path were the delay is needed is first used when interrupts are
enabled so that part should be safe. I shouldn't be calling hw.reset
with a mutex held AFAIK.
Anyhow what I need is just a way to wait ~1 sec without busyspinning the
CPU as DELAY does (or has that been changed ?).
-Søren
More information about the cvs-src
mailing list