Date: Tue, 24 Aug 2004 14:23:42 -0600 From: Scott Long <scottl@freebsd.org> To: SXren Schmidt <sos@freebsd.org> Cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/dev/ata ata-chipset.c Message-ID: <412BA3CE.3060305@freebsd.org> In-Reply-To: <200408242011.i7OKBQfI033557@repoman.freebsd.org> References: <200408242011.i7OKBQfI033557@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?412BA3CE.3060305>