From owner-freebsd-scsi Sat Jul 27 09:32:25 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA19505 for freebsd-scsi-outgoing; Sat, 27 Jul 1996 09:32:25 -0700 (PDT) Received: (from grog@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA19498; Sat, 27 Jul 1996 09:32:23 -0700 (PDT) From: Greg Lehey Message-Id: <199607271632.JAA19498@freefall.freebsd.org> Subject: Re: Setting disk sector size? To: hdalog@zipnet.net Date: Sat, 27 Jul 1996 09:32:23 -0700 (PDT) Cc: scsi In-Reply-To: <199607271556.LAA00226@hda.com> from "Peter Dufault" at Jul 27, 96 11:56:05 am X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-freebsd-scsi@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > > compile a krnrel without that test in sd.c > > > and use that to change the setup.. > > > > > > > > I tried that before I sent the message. It hangs (OK, to be more > > specific, it times out). I think that the problem is that scsi tries > > to access the disk before it reads the mode page. scsiformat issues a > > direct scsi command, so I assume that I could issue a write command > > and write it back. Unfortunately, I'm on vacation at the moment, and > > I don't have any documentation with me. > > Use the control device for the disk - it will bypass normal processing > and all you can do is issue ioctl's against it. The control device > is the one with the crazy minor number: > > > crw------- 1 root wheel 13, 536870912 Jan 10 1996 /dev/rsd0.ctl > > You should be able to issue the mode page editing > and format commands against that device. Thanks, that solved the first hurdle. With 'scsi -f /dev/rsd0.ctl -m 3 -P 3' I can now display the mode page. Unfortunately, 'scsi -f /dev/rsd0.ctl -m 3 -P 3 -e' gives me a blank file to edit. I've checked with ktrace, and it seems that scsi isn't writing the file before invoking the editor. I tried copying in the output from the scsi command, but it didn't appear to do anything with it. I'm about to jump into the code, but if anybody has any suggestions first, I'd be glad to hear of them. Greg