SCSI device driver PROBLEM

Rick Auricchio rick at apple.com
Tue Oct 16 03:17:55 AEST 1990


In article <voo-f2.#g3 at smurf.sub.org> urlichs at smurf.sub.org (Matthias Urlichs) writes:
>The following occurs on A/UX 2.0 sf (Seeding Final), on my IIfx.
>
>The SCSI device driver I'm currently writing tries to do the following:
>
>ds_ioctl(...) {
>[ struct scsireq *r; initialize r; general handwaving ]
>
>   int ds_ret();
>   r->faddr = ds_wakeup();
>   r->cmdlen		= ...;
>
>The big problem is that whenever r->datalen is >= 512, nothing happens:
>Everything seems to work, r->datasent ends up being equal to r->datalen, the
>command is performed on the disk, but the buffer I'm trying to read the data
>from ends up unchanged.

    If you've written this exactly like your posting, I see the problem.

>   r->faddr = ds_wakeup();

    Specifying ds_wakeup() with the parens causes an immediate call to
    the function.  You want ds_wakeup without parens to just stuff its
    address.  I got bit by this one a long time ago and it took forever
    to figure it out.
--
Rick Auricchio, Apple Computer Inc, 10300 Bubb Rd, MS 50-UX Cupertino CA 95014
rick at apple.COM  	  	 Mooney N894AR     		(408) 974-4227
		Work is for people who don't know how to fly.
My opinion is my own. My employer? They use a windsock and a fire extinguisher.



More information about the Comp.unix.aux mailing list