cvs commit: src/sys/dev/ata ata-chipset.c
    Scott Long 
    scottl at freebsd.org
       
    Tue Aug 24 13:24:56 PDT 2004
    
    
  
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.
Scott
    
    
More information about the cvs-all
mailing list