Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jul 1996 05:34:40 -0400 (EDT)
From:      Peter Dufault <dufault@199.232.245.2>
To:        grog@freefall.freebsd.org (Greg Lehey)
Cc:        hdalog@zipnet.net, scsi@freefall.freebsd.org
Subject:   Re: Setting disk sector size?
Message-ID:  <199607280934.FAA01168@199.232.245.2>
In-Reply-To: <199607272253.PAA09896@freefall.freebsd.org> from "Greg Lehey" at Jul 27, 96 03:53:10 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> That's funny that the default is 512 bytes, then.  And how come
> scsiformat -pv shows all the parameters?

It is a shell script and is reading back and printing out the
parameters for you using scsi(8).

(...)
> 
> It seems to me that an obvious approach would be to try to write
> back the mode page and see what happens.  What command does that?

The easiest thing is to copy the scsi(8) source and change the place it sets
"editinfo.can_edit" from an expression based on the changeability
to a hardwired 1:

From:
	editinfo[editind].can_edit = ((int)arg != 0);

To:
	editinfo[editind].can_edit = 1;


Then everything will show up in the editing page.  You'll most
likely get "invalid field in parameter list".  I just looked through the
mode select section of the spec again - I don't see anything
that would imply ever being able to change a field that comes back
as being not changeable.  It says:

"7.2.10.2 Changeable Values

"A PC field value of 1h requests that the target return a mask
denoting those mode parameters that are changeable.  In the mask,
the fields of the mode parameters that are changeable shall be set
to all one bits and the fields of the mode parameters that are
non-changeable (i.e., defined by the target) shall be set to all
zero bits.

"NOTE:  An attempt to change a non-changeable mode parameter (via
MODE SELECT) results in an error condition (see 7.2.8)"

I'm afraid this may be a tough one to figure out without more
information on the drive.

-- 
Peter Dufault               Real-Time Machine Control and Simulation
HD Associates, Inc.         Voice: 508 433 6936
dufault@hda.com             Fax:   508 433 5267



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607280934.FAA01168>