At Mon, 23 Sep 2002 20:43:19 +0100 (BST),
Chris Rankin wrote:
> 
> > > > another point:  doesn't the busy-loop in
> > > > host_read/write_ctrl_unsafe
> > > > need udelay() or something to produce a certain
> > > > delay length?
> > > > otherwise the timeout is very dependent on a
> > > > machine.
> > > 
> > > Yes, possibly. Provided udelay() isn't deprecated
> > and
> > > doesn't schedule or anything.
> > 
> > no and no.  it's a simply busy delay for the given
> > time length
> > with _relatively_ good accuracy (up to 1ms).
> > 
> > > I tested this driver on
> > > a P120 - not exactly a speed daemon... ;-)!
> > 
> > ah, then the current driver will fail definitely on
> > 2GHz P4 ;)
> 
> Yeah, if you can find one with an ISA slot free...
> ;-). Anyway, I'll put that udelay() in then; udelay(1)
> will probably be enough.

then please don't use HZ for timeout value, since HZ can be different
from 100 on non-i386 architectures (and even on i386 on 2.5).

> I'll also remove that #error
> if there's no OSS emulation, and I don't think any
> action is needed for the verify_area() calls.

i forgot to mention - please add #include <linux/delay.h>
if you use udelay() or mdelay().  

and leave verify_area() as you like.  as said, checking the return
value from copy_from/to_user() is the general way, but of course it's
not the only way and everybody may write his code :)


Takashi


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to