Path: utzoo!attcan!uunet!wuarchive!julius.cs.uiuc.edu!apple!apple.com!rick From: rick@apple.com (Rick Auricchio) Newsgroups: comp.unix.aux Subject: Re: SCSI device driver PROBLEM Message-ID: <10716@goofy.Apple.COM> Date: 15 Oct 90 17:17:55 GMT Sender: usenet@Apple.COM Reply-To: rick@apple.com (Rick Auricchio) Organization: Apple Computer Inc, Cupertino CA Lines: 30 In article urlichs@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@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.