*BSD News Article 22029


Return to BSD News archive

Xref: sserve comp.os.386bsd.questions:5732 comp.os.386bsd.development:1294
Newsgroups: comp.os.386bsd.questions,comp.os.386bsd.development
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!doc.ic.ac.uk!uknet!pipex!uunet!world!hd
From: hd@world.std.com (HD Associates)
Subject: Re: SCSI drivers do a TEST_UNIT_READY..
Message-ID: <CEItrq.7n3@world.std.com>
Organization: The World Public Access UNIX, Brookline, MA
References: <28vrml$v7p@thebes.cc.waikato.ac.nz>
Date: Thu, 7 Oct 1993 09:45:25 GMT
Lines: 40

In article <28vrml$v7p@thebes.cc.waikato.ac.nz>,
Hamish Marson <hamish@thebes.cc.waikato.ac.nz> wrote:
>
>Hi all, can someone enlighten me as to why 386BSD does a TEST_UNIT_READY
>command first on each device and marks the device as absent without
>an INQUIRY when TEST_UNIT_READY is an optional command. Does noone
>out there use SCSI devices that don't do TEST_UNIT_READY.... Am I
>just halluconating? Or is there a really good reason for this? I'm 
>trying to get the WD7000 driver going on a Connor30170, and a Quantum
>40M of some description that Linux will see, but the TESTUNITREADY command
>times out on both devices...

Hamish is right and this is a problem in the SCSI system.

TEST UNIT READY is mandatory in SCSI 2 but optional in SCSI 1.

If TEST UNIT READY fails the device is not brought on line, and so SCSI
1 devices may not be probed properly.

And for a SCSI-2 devices, if TEST UNIT READY works but generates sense
with a "not recommended" error (not 70 or 71) it will also fail.

The TEST UNIT READY either needs to be dropped, or only done for a device
that says it is SCSI-II, and then the sense checking needs to be souped up.

The affected code is in scsiconf.c.
Hamish can go in and #ifdef out the call to "scsi_ready" and just do the
"scsi_inquire" and see if things work better.

>Also why are the adapters set to address 0? I thought 7 was more 
>standard.....

Which adapter do you use and how is the ID code set?  The two that I've
used (1542 and 1740) have the host adapter ID set by the user.

Peter
-- 
Peter Dufault               Real Time Machine Control and Simulation
HD Associates               Voice: 508 433 6936
hd@world.std.com            Fax:   508 433 5267