Date: Wed, 10 Apr 2002 10:52:03 -0400 From: Jake Burkholder <jake@locore.ca> To: John Baldwin <jhb@FreeBSD.org> Cc: Bruce Evans <bde@zeta.org.au>, cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Brian Somers <brian@FreeBSD.org> Subject: Re: cvs commit: src/sys/dev/digi digi.c Message-ID: <20020410105203.B209@locore.ca> In-Reply-To: <XFMail.20020410090618.jhb@FreeBSD.org>; from jhb@FreeBSD.org on Wed, Apr 10, 2002 at 09:06:18AM -0400 References: <20020410204138.C7535-100000@gamplex.bde.org> <XFMail.20020410090618.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Apparently, On Wed, Apr 10, 2002 at 09:06:18AM -0400, John Baldwin said words to the effect of; > > On 10-Apr-2002 Bruce Evans wrote: > > On Tue, 9 Apr 2002, Brian Somers wrote: > > > >> brian 2002/04/09 20:13:28 PDT > >> > >> Modified files: > >> sys/dev/digi digi.c > >> Log: > >> Add a digi_delay() function and use it instead of tsleep() when polling > >> the card for command completion. > >> > >> digi_delay() uses either tsleep() or DELAY() depending on the value of > >> ``cold''. > >> > >> Pointed in the right direction by: jhb > > > > Maybe tsleep() should sleep when cold if given a timeout. This is not quite > > right, since the semantics of the timeout arg is to give a maximum wait, > > not a delay, but it is better than ... > > > >> > >> Revision Changes Path > >> 1.25 +14 -5 src/sys/dev/digi/digi.c > > > > N * (+14 -5) in N drivers. All drivers that support dynamic loading need > > something like this, since busy-waiting on running systems is unacceptable. > > Not that I will ever want to use this misfeature. > > I've thought about having some sort of separate API for code that just ways to > delay. Right now they use tsleep() on a channel that never gets woken up with > a timeout. If we had a delay(int timo) function then it could use a callout > when callouts were working and fall back to DELAY() in the cold case. No, this is wrong. Anything that uses cold is wrong. The correct fix is to move the clock initialization earlier in boot to be before the device probe. Jake To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020410105203.B209>