* [9fans] SCSI initialisation
@ 2003-04-29 9:15 Lucio De Re
2003-04-29 9:59 ` Nigel Roles
0 siblings, 1 reply; 3+ messages in thread
From: Lucio De Re @ 2003-04-29 9:15 UTC (permalink / raw)
To: 9fans mailing list
The current (?) version of /sys/src/boot/pc/sdscsi.c has the
following in :/^scsiverify:
if((r->sense[2] & 0x0F) != 0x02)
continue;
if(r->sense[12] == 0x3A){
status = SDok;
break;
}
as opposed to, in /sys/src/9/pc/sdscsi.c:
if((r->sense[2] & 0x0F) != 0x02)
continue;
/*
* Unit is 'not ready'.
* If it needs an initialising command, set status
* so it will be spun-up below.
* If there's no medium, that's OK too, but don't
* try to spin it up.
*/
if(r->sense[12] == 0x04 && r->sense[13] == 0x02){
status = SDok;
break;
}
if(r->sense[12] == 0x3A)
break;
Sadly, my controller seems to return
r->sense[12] == 0x04 && r->sense[13] == 0x01
and I have no idea what to make of it :-(
Suggestions? I can't find my SCSI reference manual, so I'ma bit at
the mercy of the list. Oh, the problem I'm trying to address is
9load's inability to use #S/sd00/9fat/plan9.ini.
++L
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [9fans] SCSI initialisation
2003-04-29 9:15 [9fans] SCSI initialisation Lucio De Re
@ 2003-04-29 9:59 ` Nigel Roles
2003-04-29 10:07 ` Lucio De Re
0 siblings, 1 reply; 3+ messages in thread
From: Nigel Roles @ 2003-04-29 9:59 UTC (permalink / raw)
To: 9fans
> r->sense[12] == 0x04 && r->sense[13] == 0x01
>
> and I have no idea what to make of it :-(
It means that the device is "in the process of becoming ready".
I expect you can figure out how to handle that.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [9fans] SCSI initialisation
2003-04-29 9:59 ` Nigel Roles
@ 2003-04-29 10:07 ` Lucio De Re
0 siblings, 0 replies; 3+ messages in thread
From: Lucio De Re @ 2003-04-29 10:07 UTC (permalink / raw)
To: 9fans
On Tue, Apr 29, 2003 at 10:59:00AM +0100, Nigel Roles wrote:
>
> > r->sense[12] == 0x04 && r->sense[13] == 0x01
> >
> > and I have no idea what to make of it :-(
>
> It means that the device is "in the process of becoming ready".
>
> I expect you can figure out how to handle that.
I gambled on
if (r->sense[12] == 0x04){
status = SDcheck;
if(r->sense[13] == 0x01)
status = SDok;
break;
}
...
return (status == SDok || status == SDcheck);
which seems to have worked. I guess I ought to take the more patient
approach of actually waiting for r->sense[13] == 0? Or are the sense
values meant to be something else altogether?
++L
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-04-29 10:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-29 9:15 [9fans] SCSI initialisation Lucio De Re
2003-04-29 9:59 ` Nigel Roles
2003-04-29 10:07 ` Lucio De Re
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).