From owner-freebsd-scsi Sun Jul 28 02:41:00 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id CAA11199 for freebsd-scsi-outgoing; Sun, 28 Jul 1996 02:41:00 -0700 (PDT) Received: from 199.232.245.2 (ip2-max1-fitch.zipnet.net [199.232.245.2]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id CAA11191; Sun, 28 Jul 1996 02:40:54 -0700 (PDT) Received: (from dufault@localhost) by 199.232.245.2 (8.6.11/8.6.9) id FAA01168; Sun, 28 Jul 1996 05:34:40 -0400 From: Peter Dufault Message-Id: <199607280934.FAA01168@199.232.245.2> Subject: Re: Setting disk sector size? To: grog@freefall.freebsd.org (Greg Lehey) Date: Sun, 28 Jul 1996 05:34:40 -0400 (EDT) Cc: hdalog@zipnet.net, scsi@freefall.freebsd.org In-Reply-To: <199607272253.PAA09896@freefall.freebsd.org> from "Greg Lehey" at Jul 27, 96 03:53:10 pm Reply-to: hdalog@zipnet.net X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-freebsd-scsi@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > 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 From owner-freebsd-scsi Sun Jul 28 02:51:40 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id CAA11645 for freebsd-scsi-outgoing; Sun, 28 Jul 1996 02:51:40 -0700 (PDT) Received: from 199.232.245.2 (ip2-max1-fitch.zipnet.net [199.232.245.2]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id CAA11628; Sun, 28 Jul 1996 02:51:25 -0700 (PDT) Received: (from dufault@localhost) by 199.232.245.2 (8.6.11/8.6.9) id FAA01186; Sun, 28 Jul 1996 05:45:04 -0400 From: Peter Dufault Message-Id: <199607280945.FAA01186@199.232.245.2> Subject: Re: Setting disk sector size? To: grog@freefall.freebsd.org (Greg Lehey) Date: Sun, 28 Jul 1996 05:45:03 -0400 (EDT) Cc: hdalog@zipnet.net, scsi@freefall.freebsd.org In-Reply-To: <199607272253.PAA09896@freefall.freebsd.org> from "Greg Lehey" at Jul 27, 96 03:53:10 pm Reply-to: hdalog@zipnet.net X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-freebsd-scsi@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > Since this is a used drive, we don't have any information about the > jumpers. Looking at the drive, I'd guess it's made by IBM, and it has > very few jumpers. I think I'm going to have difficulty following that > possibility. > > 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? I think I've figured it out - I think you need to change it in the block descriptor header instead of the mode page. I found this reference for an IBM drive with changeable geometry: http://www-i.almaden.ibm.com/storage/techsup/hddtech/06614/06614mso.htm And note that they specify the block length separately outside of the mode pages: > Changeable parameters are: > > Block descriptor > Block length > > Page 0 > QPE (qualify post error) I have to leave here now - I have a ride waiting. Later I'll put together a script for you to change that if you don't have the appropriate docs. -- Peter Dufault Real-Time Machine Control and Simulation HD Associates, Inc. Voice: 508 433 6936 dufault@hda.com Fax: 508 433 5267 From owner-freebsd-scsi Sun Jul 28 05:12:12 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id FAA19961 for freebsd-scsi-outgoing; Sun, 28 Jul 1996 05:12:12 -0700 (PDT) Received: from linux4nn.gn.iaf.nl (root@linux4nn.gn.iaf.nl [193.67.144.34]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id FAA19955; Sun, 28 Jul 1996 05:12:09 -0700 (PDT) Received: from uni4nn.iaf.nl (root@uni4nn.iaf.nl [193.67.144.33]) by linux4nn.gn.iaf.nl (8.6.9/8.6.9) with SMTP id OAA32254; Sun, 28 Jul 1996 14:14:52 +0200 Received: by uni4nn.iaf.nl with UUCP id AA12273 (5.67b/IDA-1.5); Sun, 28 Jul 1996 14:13:53 +0200 Received: by iafnl.es.iaf.nl with UUCP id AA15489 (5.67b/IDA-1.5); Sun, 28 Jul 1996 14:10:24 +0200 Received: (from wilko@localhost) by yedi.iaf.nl (8.6.12/8.6.6) id NAA18235; Sun, 28 Jul 1996 13:50:17 +0200 From: Wilko Bulte Message-Id: <199607281150.NAA18235@yedi.iaf.nl> X-Organisation: Private FreeBSD site - Arnhem - The Netherlands Subject: Re: Setting disk sector size? To: grog@freefall.freebsd.org (Greg Lehey) Date: Sun, 28 Jul 1996 13:50:17 +0200 (MET DST) Cc: scsi@freefall.freebsd.org In-Reply-To: <199607270129.SAA23083@freefall.freebsd.org> from "Greg Lehey" at Jul 26, 96 06:29:12 pm X-Mailer: ELM [version 2.4 PL23] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk As Greg Lehey wrote... > > A friend of mine just turned up with a Tandem disk drive (looks for > all the world like an IBM :-) which has 514 byte sectors. He also has > another one with 516 byte sectors. By all accounts we can change that > to 512 with 'scsi -m 3 -p 3 -e', except that the driver gets all > uptight about the 514 byte sectors and doesn't get as far as reading > the mode page. scsiformat can report the format, so there must be > some way to do read the information, and I suspect there's also a way > to set it. Does anybody have any ideas? I had the same experience. I went to a DEC Unix box with my 518 byte Micropolis and changed it there. A subsequent SCSI format did the rest Wilko _ ____________________________________________________________________ | / o / / _ Wilko Bulte email: wilko@yedi.iaf.nl |/|/ / / /( (_) Private FreeBSD site - Arnhem - The Netherlands -------------------------------------------------------------------------- From owner-freebsd-scsi Sun Jul 28 08:45:18 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id IAA27316 for freebsd-scsi-outgoing; Sun, 28 Jul 1996 08:45:18 -0700 (PDT) Received: (from grog@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id IAA27303; Sun, 28 Jul 1996 08:45:13 -0700 (PDT) From: Greg Lehey Message-Id: <199607281545.IAA27303@freefall.freebsd.org> Subject: Re: Setting disk sector size? To: wilko@yedi.iaf.nl (Wilko Bulte) Date: Sun, 28 Jul 1996 08:45:13 -0700 (PDT) Cc: scsi In-Reply-To: <199607281150.NAA18235@yedi.iaf.nl> from "Wilko Bulte" at Jul 28, 96 01:50:17 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-freebsd-scsi@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > As Greg Lehey wrote... > > > > A friend of mine just turned up with a Tandem disk drive (looks for > > all the world like an IBM :-) which has 514 byte sectors. He also has > > another one with 516 byte sectors. By all accounts we can change that > > to 512 with 'scsi -m 3 -p 3 -e', except that the driver gets all > > uptight about the 514 byte sectors and doesn't get as far as reading > > the mode page. scsiformat can report the format, so there must be > > some way to do read the information, and I suspect there's also a way > > to set it. Does anybody have any ideas? > > I had the same experience. I went to a DEC Unix box with my 518 byte > Micropolis and changed it there. A subsequent SCSI format did the rest Yes, we have this option too (with a Tandem box, of course), and if things get too hard I'll do just that. But I didn't want to give up without a fight :-) Greg From owner-freebsd-scsi Sun Jul 28 10:15:56 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id KAA01367 for freebsd-scsi-outgoing; Sun, 28 Jul 1996 10:15:56 -0700 (PDT) Received: from hda.com (ip82-max1-fitch.zipnet.net [199.232.245.82]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id KAA01360; Sun, 28 Jul 1996 10:15:52 -0700 (PDT) Received: (from dufault@localhost) by hda.com (8.6.11/8.6.9) id NAA01613; Sun, 28 Jul 1996 13:08:47 -0400 From: Peter Dufault Message-Id: <199607281708.NAA01613@hda.com> Subject: Re: Setting disk sector size? To: grog@freefall.freebsd.org (Greg Lehey) Date: Sun, 28 Jul 1996 13:08:46 -0400 (EDT) Cc: scsi@freefall.freebsd.org In-Reply-To: <199607281545.IAA27303@freefall.freebsd.org> from "Greg Lehey" at Jul 28, 96 08:45:13 am Reply-to: hdalog@zipnet.net X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-freebsd-scsi@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > Yes, we have this option too (with a Tandem box, of course), and if > things get too hard I'll do just that. But I didn't want to give up > without a fight :-) > See if something like this works. You'll have to remove the final "echo". I haven't tried it - I don't have a disk I'm willing to change the sector size on right now. #!/bin/sh if [ "$#" != "2" ] then echo "Usage: blocksize ctl-device-name new-block-size" exit fi CTL=$1 NEWSIZE=$2 # Print out the device we're about to destroy: scsi -f $CTL -c "12 0 0 0 v 0" 96 -i 96 "s8 z8 z16 z4" # Read in page 4. Actually, we only read the block descriptor. set `scsi -f $CTL \ -c "1A 0 4 0 C 0" \ -i 0xc "{Mode data length} i1 \ {Medium type} i1 \ {Device Specific Parameter} i1 \ {Block descriptor length} i1 \ {Density code} i1 \ {Number of blocks} i3 \ {Reserved} i1 \ {Block length} i3"` echo "Current block size is: $8" # Corresponding mode select: echo scsi -f $CTL -c "15 0 4 0 C 0" \ -o 0xc "i1 i1 i1 i1 i1 i3 i1 i3" $1 $2 $3 $4 $5 $6 $7 $NEWSIZE -- Peter Dufault Real-Time Machine Control and Simulation HD Associates, Inc. Voice: 508 433 6936 dufault@hda.com Fax: 508 433 5267 From owner-freebsd-scsi Sun Jul 28 13:51:00 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id NAA09843 for freebsd-scsi-outgoing; Sun, 28 Jul 1996 13:51:00 -0700 (PDT) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id NAA09832 for ; Sun, 28 Jul 1996 13:50:56 -0700 (PDT) Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id WAA26634; Sun, 28 Jul 1996 22:50:41 +0200 Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id WAA24510; Sun, 28 Jul 1996 22:50:40 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.7.5/8.6.9) id VAA08386; Sun, 28 Jul 1996 21:59:10 +0200 (MET DST) From: J Wunsch Message-Id: <199607281959.VAA08386@uriah.heep.sax.de> Subject: Re: Setting disk sector size? To: scsi@freebsd.org Date: Sun, 28 Jul 1996 21:59:10 +0200 (MET DST) Cc: grog@freefall.freebsd.org Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199607280945.FAA01186@199.232.245.2> from Peter Dufault at "Jul 28, 96 05:45:03 am" X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@freebsd.org X-Loop: FreeBSD.org Precedence: bulk As Peter Dufault wrote: > > Changeable parameters are: > > > > Block descriptor > > Block length > I have to leave here now - I have a ride waiting. Later I'll put > together a script for you to change that if you don't have the > appropriate docs. Since Peter left, i think it's fairly easy: scsi -f /dev/rsd0.ctl -c "15 10 0 0 v:i1 0" 12 \ -o 12 "0 0 0 8 0 0:i3 0 v:i3" 512 ^^^^^^^ ^^^^^^^^^^^^^ | |______ block descriptor: | density code = 0 | number of blocks = 0 | reserved | block length = 512 | |__________________ buffer header: mode data len (reserved) medium type (default = 0) device-specific parameter block descriptor length = 8 -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) From owner-freebsd-scsi Sun Jul 28 15:41:01 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id PAA14968 for freebsd-scsi-outgoing; Sun, 28 Jul 1996 15:41:01 -0700 (PDT) Received: (from grog@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id PAA14960; Sun, 28 Jul 1996 15:41:00 -0700 (PDT) From: Greg Lehey Message-Id: <199607282241.PAA14960@freefall.freebsd.org> Subject: Re: Setting disk sector size? To: hdalog@zipnet.net Date: Sun, 28 Jul 1996 15:40:59 -0700 (PDT) Cc: scsi In-Reply-To: <199607281708.NAA01613@hda.com> from "Peter Dufault" at Jul 28, 96 01:08:46 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-freebsd-scsi@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > > > > Yes, we have this option too (with a Tandem box, of course), and if > > things get too hard I'll do just that. But I didn't want to give up > > without a fight :-) > > > > See if something like this works. You'll have to remove the final > "echo". I haven't tried it - I don't have a disk I'm willing to > change the sector size on right now. > > (script omitted) OK, I tried this one out. It showed the correct geometry, but it didn't take the command. Here's a summary of the error messages: Returned host adapter status 2: 15 00 04 00 0c 00 Illegal request Info field and command specific info fields are both invalid (0). Additional sense code 24, qualifier 0. Senseinfo (32 of 48): 70 00 05 00 00 00 00 18 00 00 00 00 24 00 00 00 00 00 00 00 01 32 00 00 00 00 00 00 00 00 00 00 Sorry I don't have the exact info, but the machine isn't conected to the net yet. If any of this looks garbled, I'll try better. This is beginning to look like the disk doesn't like being talked to in this language. Do you think it's worth following up on your other suggestion? What about resetting to the default values (which include 512 byte sectors)? Greg From owner-freebsd-scsi Sun Jul 28 15:47:48 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id PAA15583 for freebsd-scsi-outgoing; Sun, 28 Jul 1996 15:47:48 -0700 (PDT) Received: (from grog@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id PAA15577; Sun, 28 Jul 1996 15:47:46 -0700 (PDT) From: Greg Lehey Message-Id: <199607282247.PAA15577@freefall.freebsd.org> Subject: Re: Setting disk sector size? To: joerg_wunsch@uriah.heep.sax.de Date: Sun, 28 Jul 1996 15:47:46 -0700 (PDT) Cc: scsi In-Reply-To: <199607281959.VAA08386@uriah.heep.sax.de> from "J Wunsch" at Jul 28, 96 09:59:10 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-freebsd-scsi@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > As Peter Dufault wrote: > > > > Changeable parameters are: > > > > > > Block descriptor > > > Block length > > > I have to leave here now - I have a ride waiting. Later I'll put > > together a script for you to change that if you don't have the > > appropriate docs. > > Since Peter left, i think it's fairly easy: > > scsi -f /dev/rsd0.ctl -c "15 10 0 0 v:i1 0" 12 \ > -o 12 "0 0 0 8 0 0:i3 0 v:i3" 512 > ^^^^^^^ ^^^^^^^^^^^^^ > | |______ block descriptor: > | density code = 0 > | number of blocks = 0 > | reserved > | block length = 512 > | > |__________________ buffer header: > mode data len (reserved) > medium type (default = 0) > device-specific parameter > block descriptor length = 8 Well, this one has the undoubted advantage of not returning an error message :-) Looking at the output of scsiformat, it still claims 514 byte sectors, but maybe I'm looking in the wrong place. In any case, I've tried formatting it, and we'll see in an hour or so what it has done. I'll keep you posted. Greg From owner-freebsd-scsi Sun Jul 28 18:00:15 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id SAA21590 for freebsd-scsi-outgoing; Sun, 28 Jul 1996 18:00:15 -0700 (PDT) Received: (from grog@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id SAA21576; Sun, 28 Jul 1996 18:00:13 -0700 (PDT) From: Greg Lehey Message-Id: <199607290100.SAA21576@freefall.freebsd.org> Subject: Re: Setting disk sector size? To: joerg_wunsch@uriah.heep.sax.de Date: Sun, 28 Jul 1996 18:00:13 -0700 (PDT) Cc: scsi In-Reply-To: <199607281959.VAA08386@uriah.heep.sax.de> from "J Wunsch" at Jul 28, 96 09:59:10 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-freebsd-scsi@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > Since Peter left, i think it's fairly easy: > > scsi -f /dev/rsd0.ctl -c "15 10 0 0 v:i1 0" 12 \ > -o 12 "0 0 0 8 0 0:i3 0 v:i3" 512 > Yup, that did it. It's now formatted and mounted. Thanks Greg From owner-freebsd-scsi Sun Jul 28 23:21:29 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id XAA04763 for freebsd-scsi-outgoing; Sun, 28 Jul 1996 23:21:29 -0700 (PDT) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id XAA04744 for ; Sun, 28 Jul 1996 23:21:14 -0700 (PDT) Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id IAA06966; Mon, 29 Jul 1996 08:20:46 +0200 Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id IAA07565; Mon, 29 Jul 1996 08:20:45 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.7.5/8.6.9) id IAA02558; Mon, 29 Jul 1996 08:19:19 +0200 (MET DST) From: J Wunsch Message-Id: <199607290619.IAA02558@uriah.heep.sax.de> Subject: Re: Setting disk sector size? To: scsi@freebsd.org Date: Mon, 29 Jul 1996 08:19:18 +0200 (MET DST) Cc: grog@freefall.freebsd.org (Greg Lehey) Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199607282241.PAA14960@freefall.freebsd.org> from Greg Lehey at "Jul 28, 96 03:40:59 pm" X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@freebsd.org X-Loop: FreeBSD.org Precedence: bulk As Greg Lehey wrote: > Additional sense code 24, qualifier 0. ``Invalid field in CDB'' You forgot to quote the most important notice: which value (bit/byte) was invalid. I'm too lazy to dig this out off this hexdump: > Senseinfo (32 of 48): > > 70 00 05 00 00 00 00 18 00 00 00 00 24 00 00 00 > 00 00 00 00 01 32 00 00 00 00 00 00 00 00 00 00 ...but i would assume two possible problems with Peter's suggestion: the PF bit in byte 1 was missing (Page Format == use SCSI-2 MODE SELECT), and byte 2 was 40 which selects the page control field in MODE SENSE, but is reserved in MODE SELECT. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) From owner-freebsd-scsi Mon Jul 29 08:11:11 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id IAA03351 for freebsd-scsi-outgoing; Mon, 29 Jul 1996 08:11:11 -0700 (PDT) Received: (from grog@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id IAA03344; Mon, 29 Jul 1996 08:11:08 -0700 (PDT) From: Greg Lehey Message-Id: <199607291511.IAA03344@freefall.freebsd.org> Subject: Re: Setting disk sector size? To: joerg_wunsch@uriah.heep.sax.de Date: Mon, 29 Jul 1996 08:11:08 -0700 (PDT) Cc: scsi In-Reply-To: <199607290619.IAA02558@uriah.heep.sax.de> from "J Wunsch" at Jul 29, 96 08:19:18 am X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-freebsd-scsi@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > As Greg Lehey wrote: > > > Additional sense code 24, qualifier 0. > > ``Invalid field in CDB'' > > You forgot to quote the most important notice: which value (bit/byte) > was invalid. I didn't forget: it wasn't there, or at least it wasn't recognizable. > I'm too lazy to dig this out off this hexdump: > > > Senseinfo (32 of 48): > > > > 70 00 05 00 00 00 00 18 00 00 00 00 24 00 00 00 > > 00 00 00 00 01 32 00 00 00 00 00 00 00 00 00 00 > > ...but i would assume two possible problems with Peter's suggestion: > the PF bit in byte 1 was missing (Page Format == use SCSI-2 MODE > SELECT), and byte 2 was 40 which selects the page control field in > MODE SENSE, but is reserved in MODE SELECT. Could be. My hands are somewhat tied here, since I don't have any documentation. Anyway, your command example was just what I was looking for, so the question has become somewhat academic. Greg From owner-freebsd-scsi Mon Jul 29 22:55:32 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id WAA21874 for freebsd-scsi-outgoing; Mon, 29 Jul 1996 22:55:32 -0700 (PDT) Received: from freefall.freebsd.org (localhost.cdrom.com [127.0.0.1]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id WAA21852 for ; Mon, 29 Jul 1996 22:55:30 -0700 (PDT) Message-Id: <199607300555.WAA21852@freefall.freebsd.org> To: scsi Subject: Large changes to the SCSI system -- please review Date: Mon, 29 Jul 1996 22:55:30 -0700 From: "Justin T. Gibbs" Sender: owner-freebsd-scsi@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk I've made some large changes to FreeBSD's SCSI system - changes that touch evey type driver and every controller driver. I've decided to upload the pathes for review and testing before I commit them. I have only tested these on the Adaptec 2742T with a scsi disk, dat tape, and cdrom drive, so I would only recommend you try these at this stage if you are interrested in debugging any problems you encounter. The patches to the NCR driver are not complete as the resource management is complex for that driver and I didn't feel I knew the code well enough (yet) to make them. Hopefully Stephan will be able to finish them off. Here's a list of what I've done: 1) Removed unnecessary members in data structures: There is still lots of work to be done on the current set of data structures. This was just a preliminary pass killing the obvious cruft. 2) Renamed flags and data structure members to lessen the differences with NetBSD: There are lots of gratuitous and some not so gratuitous differences between the two camps' SCSI code. I hope to bring the two code bases closer together over the next few months so that we can easily share controller drivers again. 3) Changed how transfers are queued, started, and completed: The original scsi system has had a long standing problem with how queued transactions are handled. The root of the problem comes from the policy of deferring the reservation of controller resources until way down in the controller scsi_cmd routine where we may not have a process context and thus cannot always sleep. With these patches, the scsi system relies almost entirely on queue management instead of sleeping to manage resources. More specifically, I've introduced a new data structure, the scsi_queue, that relates devices that share common controller resources. A scsi_queue has "openings" as do the individual scsi_links. A scsi_link is on the scsi_queue's run queue only when it has spare openings and work to do. When running a scsi_queue, the scsi_links are handled in round-robin fashion with each link allowed to send a single transaction per round. Before a transaction is dequeued, controller resources are obtained through scsi_link->get_cdb and attached to the scsi_xfer structure. get_cdb and free_cdb are two entry points provided by the controller drivers that encapsulate controller resource management. They should never be called directly by the controller driver (the wd7000 driver is the only exception to this rule). Transaction ordering is also maintained by locking the scsi_link off the run queue until the controller drivers acknowleges a command is started by calling scsi_xs_started(). This strategy should yield greater performance since a freed controller resource can start any scsi_link attached to that device instead of only attempting to start pending transactions on the device that just completed a transaction. The round-robin scheme also ensures resource fairness when devices with multiple openings compete for a small number of resources. The scheduling algorithm should be changed to support real-time priorities and the scsi_queue structure is an opaque type to the controller drivers to make this easier to accomplish. 4) Centralized error handling and "done" processing: The scsi_cmd entry point now returns void. The controller drivers now use exclusively scsi_done() along with a properly set scsi_xfer->error to report errors. This removes superflous code paths and duplicated code. 5) Commands are built directly in the scsi_xfer structure instead of on the stack: The original design forced each and every command structure to be copied into the scsi_xfer by the scsi_scsi_cmd routine. The scsi_xfer is now obtained up front and the command built directly into the scsi_xfer->cmd_store. The members of the scsi_xfer structure are filled in directly via an inline scsi_prepare_xs instead of stuffing all of them on the stack to simply be assigned into the scsi_xfer by scsi_scsi_cmd. scsi_scsi_cmd has also been replaced by scsi_schedule_xs(). 6) Converted individual controller resource management to use the queue(3) macros. Many of the drivers performed complicated list manipulations that were simplified by using the queue macros. The generic scsi layer's queue managment is also queue(3) based. 7) Removed error detection and reporting from the xxstart routines: The goal here is to make the xxstart routines as small and efficient as possible. Error detection occurs in the strategy routine or in the sense handlers. If an error is detected that may affect queued transactions, the new driver entry point clean_queue() is called to synchronously remove any entries that would have been gradually drained by the start routines in the past. 8) Added the complete driver entry point: The complete entry point is called as the last operation on a scsi_xfer before it is freed. This is the place where device usage statistic hooks should be added. In NetBSD, they have overloaded the scsi_done routine by adding an additional argument to serve this purpose which I think is the wrong approach. 9) Removed the async driver entry point: This entry point has never been used. 10) Brough in Jason Thorpe's ch driver. I haven't added the quirk entries for the supported changers yet, but we should probably invert the meaning of our quirks (probe multiple luns by default) first. For those of you who have made it this far, and want to brave all of these changes, the diffs can be found at: ftp://freefall.FreeBSD.org/incoming/scsi-diffs.970729.gz Architectural discussion, comments, diffs, and bug reports welcome. Thanks, -- Justin T. Gibbs =========================================== FreeBSD: Turning PCs into workstations =========================================== From owner-freebsd-scsi Tue Jul 30 07:55:08 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id HAA26190 for freebsd-scsi-outgoing; Tue, 30 Jul 1996 07:55:08 -0700 (PDT) Received: from FileServ1.MI.Uni-Koeln.DE (FileServ1.MI.Uni-Koeln.DE [134.95.212.1]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id HAA26181 for ; Tue, 30 Jul 1996 07:55:02 -0700 (PDT) Received: from x14.mi.uni-koeln.de (annexr3-4.slip.Uni-Koeln.DE) by FileServ1.MI.Uni-Koeln.DE with SMTP id AA25041 (5.67b/IDA-1.5 for ); Tue, 30 Jul 1996 16:54:51 +0200 Received: (from se@localhost) by x14.mi.uni-koeln.de (8.7.5/8.6.9) id QAA22711 for scsi@freefall.freebsd.org; Tue, 30 Jul 1996 16:54:43 +0200 (MET DST) Resent-Message-Id: <199607301454.QAA22711@x14.mi.uni-koeln.de> Resent-From: se@zpr.uni-koeln.de (Stefan Esser) Resent-Date: Tue, 30 Jul 1996 16:54:42 +0000 X-Mailer: Mail User's Shell (7.2.6 alpha(2) 7/9/95) Resent-To: scsi@freefall.freebsd.org Received: (from se@localhost) by x14.mi.uni-koeln.de (8.7.5/8.6.9) id OAA19721; Tue, 30 Jul 1996 14:30:25 +0200 (MET DST) Date: Tue, 30 Jul 1996 14:30:25 +0200 (MET DST) Message-Id: <199607301230.OAA19721@x14.mi.uni-koeln.de> From: Stefan Esser To: "Justin T. Gibbs" Cc: scsi@freefall.freebsd.org Subject: Re: Large changes to the SCSI system -- please review In-Reply-To: <199607300555.WAA21852@freefall.freebsd.org> References: <199607300555.WAA21852@freefall.freebsd.org> Sender: owner-freebsd-scsi@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Justin T. Gibbs writes: > I've made some large changes to FreeBSD's SCSI system - changes that touch > evey type driver and every controller driver. I've decided to upload the > pathes for review and testing before I commit them. I have only tested > these on the Adaptec 2742T with a scsi disk, dat tape, and cdrom drive, so > I would only recommend you try these at this stage if you are interrested > in debugging any problems you encounter. The patches to the NCR driver are > not complete as the resource management is complex for that driver and I > didn't feel I knew the code well enough (yet) to make them. Hopefully > Stephan will be able to finish them off. Here's a list of what I've done: I have just applied the patches and will print the modified files in the SCSI directory and the diffs to the NCR driver later today. I'll try to adapt the NCR driver to the new generic SCSI layer as soon as possible. Regards, STefan From owner-freebsd-scsi Tue Jul 30 08:35:50 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id IAA03377 for freebsd-scsi-outgoing; Tue, 30 Jul 1996 08:35:50 -0700 (PDT) Received: from freefall.freebsd.org (localhost.cdrom.com [127.0.0.1]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id IAA03370; Tue, 30 Jul 1996 08:35:47 -0700 (PDT) Message-Id: <199607301535.IAA03370@freefall.freebsd.org> To: Stefan Esser cc: scsi@freefall.freebsd.org Subject: Re: Large changes to the SCSI system -- please review In-reply-to: Your message of "Tue, 30 Jul 1996 14:30:25 +0200." <199607301230.OAA19721@x14.mi.uni-koeln.de> Date: Tue, 30 Jul 1996 08:35:47 -0700 From: "Justin T. Gibbs" Sender: owner-freebsd-scsi@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >I have just applied the patches and will print the modified >files in the SCSI directory and the diffs to the NCR driver >later today. I'll try to adapt the NCR driver to the new >generic SCSI layer as soon as possible. > >Regards, STefan Great! Please let me know if there is anything that, as a controller driver author, doesn't work well for you in the new scheme. -- Justin T. Gibbs =========================================== FreeBSD: Turning PCs into workstations =========================================== From owner-freebsd-scsi Tue Jul 30 09:46:16 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA17491 for freebsd-scsi-outgoing; Tue, 30 Jul 1996 09:46:16 -0700 (PDT) Received: from sag.space.lockheed.com (sag.space.lockheed.com [192.68.162.134]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id JAA17476 for ; Tue, 30 Jul 1996 09:46:14 -0700 (PDT) Received: from localhost by sag.space.lockheed.com; (5.65v3.2/1.1.8.2/21Nov95-0423PM) id AA00745; Tue, 30 Jul 1996 09:46:13 -0700 Date: Tue, 30 Jul 1996 09:46:13 -0700 (PDT) From: "Brian N. Handy" To: freebsd-scsi@freebsd.org Subject: WORM errors Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-scsi@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Heya folks, Been burning CD's for a while now with an HP 4020i, and got the following error a couple of days ago...the CD appears normal and happy, but I guess I'm not sure. The error only happened that one time. The script "write_cd.sh" is a slightly bent-up version of the thing Jordan posted many moons ago. Essentially just all the stuff that happens after an ISO filesystem has been generated. Thanks, Brian ======================================================================= # source bin/write_cd.sh SCIOCCOMMAND ioctl: Command accepted. return status 3 (Sense Returned) host adapter status 2 Command out (6 of 6): 00 00 00 00 00 00 Error code is "current errors" Segment number is 00 Sense key is "Unit attention" The Information field is 80000000 (-2147483648). The Command Specific Information field is 00000000 (0). Additional sense code: 28 Additional sense code qualifier: 00 sense (32 of 48): f0 00 06 80 00 00 00 0a 00 00 00 00 28 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Writing the CD... 610498 kilobytes, 2035 seconds 1220996+0 records in 30524+1 records out 625149952 bytes transferred in 2039 secs (306596 bytes/sec) wormcontrol: ioctl(WORMIOFIXATION): Input/output error From owner-freebsd-scsi Tue Jul 30 15:51:52 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id PAA15350 for freebsd-scsi-outgoing; Tue, 30 Jul 1996 15:51:52 -0700 (PDT) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id PAA15320 for ; Tue, 30 Jul 1996 15:51:37 -0700 (PDT) Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id AAA23600; Wed, 31 Jul 1996 00:50:52 +0200 Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id AAA26705; Wed, 31 Jul 1996 00:50:51 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.7.5/8.6.9) id WAA12096; Tue, 30 Jul 1996 22:35:39 +0200 (MET DST) From: J Wunsch Message-Id: <199607302035.WAA12096@uriah.heep.sax.de> Subject: Re: WORM errors To: freebsd-scsi@freebsd.org Date: Tue, 30 Jul 1996 22:35:39 +0200 (MET DST) Cc: handy@sag.space.lockheed.com (Brian N. Handy) Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: from "Brian N. Handy" at "Jul 30, 96 09:46:13 am" X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@freebsd.org X-Loop: FreeBSD.org Precedence: bulk As Brian N. Handy wrote: > Error code is "current errors" > Segment number is 00 > Sense key is "Unit attention" You should better catch UA's before starting anything else. The simplest way to do this is: scsi -f /dev/rworm0.ctl -c "0 0 0 0 0 0" > /dev/null 2>&1 It's a TEST UNIT READY command. > 625149952 bytes transferred in 2039 secs (306596 bytes/sec) > wormcontrol: ioctl(WORMIOFIXATION): Input/output error Well, we need the SCSI error message for this (from the syslog or the console). -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) From owner-freebsd-scsi Tue Jul 30 16:21:12 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id QAA16788 for freebsd-scsi-outgoing; Tue, 30 Jul 1996 16:21:12 -0700 (PDT) Received: from sag.space.lockheed.com (sag.space.lockheed.com [192.68.162.134]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id QAA16783 for ; Tue, 30 Jul 1996 16:21:11 -0700 (PDT) Received: from localhost by sag.space.lockheed.com; (5.65v3.2/1.1.8.2/21Nov95-0423PM) id AA32225; Tue, 30 Jul 1996 16:20:44 -0700 Date: Tue, 30 Jul 1996 16:20:44 -0700 (PDT) From: "Brian N. Handy" To: Joerg Wunsch Cc: freebsd-scsi@freebsd.org Subject: Re: WORM errors In-Reply-To: <199607302035.WAA12096@uriah.heep.sax.de> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-scsi@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Tue, 30 Jul 1996, J Wunsch replied: >> Error code is "current errors" >> Segment number is 00 >> Sense key is "Unit attention" > >You should better catch UA's before starting anything else. The >simplest way to do this is: > > scsi -f /dev/rworm0.ctl -c "0 0 0 0 0 0" > /dev/null 2>&1 Yep...got that. It's the first command in my script. >> 625149952 bytes transferred in 2039 secs (306596 bytes/sec) >> wormcontrol: ioctl(WORMIOFIXATION): Input/output error > >Well, we need the SCSI error message for this (from the syslog or the >console). I wasn't there for this, but I bet this has something to do with it: worm0(aha0:1:0): ABORTED COMMAND asc:50,0 Write append error worm0(aha0:1:0): ABORTED COMMAND info:80002283 asc:50,0 Write append error Brian From owner-freebsd-scsi Tue Jul 30 22:51:25 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id WAA07745 for freebsd-scsi-outgoing; Tue, 30 Jul 1996 22:51:25 -0700 (PDT) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id WAA07736 for ; Tue, 30 Jul 1996 22:51:20 -0700 (PDT) Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id HAA01670; Wed, 31 Jul 1996 07:50:56 +0200 Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id HAA01457; Wed, 31 Jul 1996 07:50:55 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.7.5/8.6.9) id HAA14257; Wed, 31 Jul 1996 07:37:22 +0200 (MET DST) From: J Wunsch Message-Id: <199607310537.HAA14257@uriah.heep.sax.de> Subject: Re: WORM errors To: freebsd-scsi@freebsd.org Date: Wed, 31 Jul 1996 07:37:21 +0200 (MET DST) Cc: handy@sag.space.lockheed.com (Brian N. Handy) Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: from "Brian N. Handy" at "Jul 30, 96 04:20:44 pm" X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@freebsd.org X-Loop: FreeBSD.org Precedence: bulk As Brian N. Handy wrote: > >> Error code is "current errors" > >> Segment number is 00 > >> Sense key is "Unit attention" > > scsi -f /dev/rworm0.ctl -c "0 0 0 0 0 0" > /dev/null 2>&1 > > Yep...got that. It's the first command in my script. Hmm, but then it's surprising why you're still getting another unit attention condition. > >> 625149952 bytes transferred in 2039 secs (306596 bytes/sec) > >> wormcontrol: ioctl(WORMIOFIXATION): Input/output error > > > >Well, we need the SCSI error message for this (from the syslog or the > >console). > > I wasn't there for this, but I bet this has something to do with it: > > worm0(aha0:1:0): ABORTED COMMAND asc:50,0 Write append error > worm0(aha0:1:0): ABORTED COMMAND info:80002283 asc:50,0 Write append error Hmm, you gotta look into your SCSI reference manual for this. Either, the write operation starved, or the fixation encountered the end of medium? Sorry, only the reference can answer you this. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) From owner-freebsd-scsi Wed Jul 31 12:42:53 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id MAA20133 for freebsd-scsi-outgoing; Wed, 31 Jul 1996 12:42:53 -0700 (PDT) Received: from freefall.freebsd.org (localhost.cdrom.com [127.0.0.1]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id MAA20128 for ; Wed, 31 Jul 1996 12:42:51 -0700 (PDT) Message-Id: <199607311942.MAA20128@freefall.freebsd.org> To: scsi@FreeBSD.org Subject: RE: Large changes to SCSI system... Date: Wed, 31 Jul 1996 12:42:51 -0700 From: "Justin T. Gibbs" Sender: owner-freebsd-scsi@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk Has anyone tried these yet? -- Justin T. Gibbs =========================================== FreeBSD: Turning PCs into workstations =========================================== From owner-freebsd-scsi Thu Aug 1 22:06:48 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id WAA19709 for freebsd-scsi-outgoing; Thu, 1 Aug 1996 22:06:48 -0700 (PDT) Received: from GndRsh.aac.dev.com (GndRsh.aac.dev.com [198.145.92.241]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id WAA19703 for ; Thu, 1 Aug 1996 22:06:40 -0700 (PDT) Received: (from rgrimes@localhost) by GndRsh.aac.dev.com (8.6.12/8.6.12) id WAA02700; Thu, 1 Aug 1996 22:06:36 -0700 From: "Rodney W. Grimes" Message-Id: <199608020506.WAA02700@GndRsh.aac.dev.com> Subject: Re: Large changes to SCSI system... To: gibbs@freefall.freebsd.org (Justin T. Gibbs) Date: Thu, 1 Aug 1996 22:06:36 -0700 (PDT) Cc: scsi@FreeBSD.org In-Reply-To: <199607311942.MAA20128@freefall.freebsd.org> from "Justin T. Gibbs" at "Jul 31, 96 12:42:51 pm" X-Mailer: ELM [version 2.4ME+ PL11 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk > Has anyone tried these yet? If I can get my tables cleared for this weekend and my 2.2 disk up to date I'll run them through a few tests. I can check the 174x, bt747, 1542B, 2940U and bt946 code out. If the NCR patches come in I can also test 53C810/53C825. -- Rod Grimes rgrimes@gndrsh.aac.dev.com Accurate Automation Company Reliable computers for FreeBSD From owner-freebsd-scsi Fri Aug 2 09:36:16 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA15551 for freebsd-scsi-outgoing; Fri, 2 Aug 1996 09:36:16 -0700 (PDT) Received: from freefall.freebsd.org (localhost.cdrom.com [127.0.0.1]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id JAA15546 for ; Fri, 2 Aug 1996 09:36:15 -0700 (PDT) Message-Id: <199608021636.JAA15546@freefall.freebsd.org> To: scsi Subject: scsi-diffs.960802.gz now availible Date: Fri, 02 Aug 1996 09:36:14 -0700 From: "Justin T. Gibbs" Sender: owner-freebsd-scsi@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk I've put an updated copy of my scsi diffs in Freefall's incoming directory. These split out the scsi_queue stuff into a separate file and pulls some of the crud in scsiconf.h into separate headers too. The includes are still a mess, but this should make it easier for people to review the new queue management code since its all in one place now. I also added Jason Thorpe's chio program. -- Justin T. Gibbs =========================================== FreeBSD: Turning PCs into workstations =========================================== From owner-freebsd-scsi Sat Aug 3 11:59:08 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id LAA00675 for freebsd-scsi-outgoing; Sat, 3 Aug 1996 11:59:08 -0700 (PDT) Received: from vector.jhs.no_domain (slip139-92-42-176.ut.nl.ibm.net [139.92.42.176]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id LAA00621; Sat, 3 Aug 1996 11:58:46 -0700 (PDT) Received: from vector.jhs.no_domain (localhost [127.0.0.1]) by vector.jhs.no_domain (8.7.5/8.6.9) with ESMTP id PAA01488; Sat, 3 Aug 1996 15:38:04 +0200 (MET DST) Message-Id: <199608031338.PAA01488@vector.jhs.no_domain> To: grog@lemis.de (Greg Lehey) cc: scsi@freebsd.org, fabio@cesar.unicamp.br, fty@mcnc.org, gcrutchr@nightflight.com, j@uriah.heep.sax.de, jc@irbs.com, julian@freebsd.org, kuku@gilberto.physik.rwth-aachen.de, mrm@Sceard.com, nikm@ixa.net, tomppa@fidata.fi, wilko@yedi.iaf.nl, Scott Kelly Subject: Re: 8 * 0xFF bytes at intermittent multiples of 0x1000 From: "Julian H. Stacey" Reply-To: "Julian H. Stacey" Organization: Vector Systems Ltd. Address: Holz Strasse 27d, 80469 Munich, Germany Phone: +49.89.268616 Fax: +49.89.2608126 Web: http://www.freebsd.org/~jhs/ Mailer: EXMH 1.6.7, PGP available In-reply-to: Your message of "Sun, 14 Jul 1996 16:23:13 +0200." <199607141423.QAA22112@allegro.lemis.de> Date: Sat, 03 Aug 1996 15:38:03 +0200 Sender: owner-freebsd-scsi@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi, Reference: > From: grog@lemis.de (Greg Lehey) > Date: Sun, 14 Jul 1996 16:23:13 +0200 (MET DST) > > In early June 1996, Julian H. Stacey wrote: > > > > To scsi@freebsd.org > > Cc Adaptec 1542A SCSI Adapter People, Julian Elischer. > > > > [ I last posted to +1542A owners + bugs@ , > > but scsi@ now seems more appropriate than bugs@. > > I & some other 1542A people are most probably not on scsi@ list, > > so please be careful if trimming CC line. > > ] > > > > I (Julian Stacey ) did a load more hardware changes & test - s, > > including swapping my Adaptec 1542A for a 1542B, & swapping sd0 & sd1, > > & eventually deduced it was not my 1542A that was mis-behaving, > > (returning 8 * 0xFF bytes at intermittent multiples of 0x1000), > > but was one of 2 HP 97548S SCSI 1 633MB disks. > > > > Either the disk is faulty, or maybe the scsi code might not be > > allowing for some strange sequence, or some such. > > > > __HOWEVER__ > > We can't dismiss it as an isolated equipment fault, as > > - tomppa@fidata.fi detects similar data corruptions, > > - scott@relay.forest.com seems to be having similar problems, > > but with a 1542B, > > - perhaps other people are suffering similar corruption > > without realising it. > > > > Partial Conclusion: > > 1542A people can `relax', to the extent that 1542B seems to be > > able to trigger the fault too (I don't have a1542C or 2940 etc) > > I've just run into this same problem, but I can't confirm your > findings. I wasn't clear which findings you can't confirm, so I read ahead, & conclude you mean you can't confirm my disc hardware error suspicion; I conclude you suspect software error, like I used to ? > I'm putting together a machine out of old junk parts. > > Currently it has a 486/66 with 16 MB and two full-height 5\(14" > drives: > > (aha0:0:0): "CDC 94161-9 6226" type 0 fixed SCSI 1 > sd0(aha0:0:0): Direct-Access 148MB (304605 512 byte sectors) > (aha0:1:0): "CDC 94171-9 5836" type 0 fixed SCSI 1 > sd1(aha0:1:0): Direct-Access 308MB (631017 512 byte sectors) > > Although these drives both claim to be CDC, the second one has a > Seagate label on it. My good drive is: "HP 97548S 8928" type 0 fixed SCSI 1 Direct-Access 633MB (1296512 512 byte sectors) My flaky drive is: "HP 97548S C023" type 0 fixed SCSI 1 Direct-Access 633MB (1296512 512 byte sectors) (`good` & `flaky` being independent of 1542A or 1542B, also independent of sd0 & sd1 physical allocation, also independent of whether running 2.0.5 Rel or 2.1.0 Rel ) > I installed 2.1-RELEASE on the machine from CD-ROM, and immediately > after booting lots of programs SIGSEGVed. I compared them with the > original and found almost exactly the same symptoms you describe: > here's the result of comparing /usr/bin at a later time: > > /usr/bin/cu bin/cu differ: char 40961, line 131 > /usr/bin/uucp bin/uucp differ: char 32769, line 97 > /usr/bin/uupick bin/uupick differ: char 32769, line 102 > /usr/bin/uustat bin/uustat differ: char 32769, line 111 > /usr/bin/as bin/as differ: char 81921, line 185 > /usr/bin/awk bin/awk differ: char 32769, line 83 > /usr/bin/bc bin/bc differ: char 32769, line 134 > /usr/bin/cvs bin/cvs differ: char 212993, line 725 > /usr/bin/gdb bin/gdb differ: char 475137, line 5209 > /usr/bin/grep bin/grep differ: char 32771, line 107 > /usr/bin/egrep bin/egrep differ: char 32771, line 107 > /usr/bin/fgrep bin/fgrep differ: char 32771, line 107 > (many more) > > It's interesting to note how many come immediately after the first 32 > KB. In the cases I looked at, a number of bytes had been replaced by > 0xff; the total size of the executable didn't change. In most other > cases, too, the corruption was at or immediately after the beginning > of a memory page. Ah ! new perspective :-) i'd been thinking only in times of disc PCB ICs, & size of on disc card buffer chips. > Another point: I've only seen this corruption on the second disk. Yes that's what I first saw, but then, observations changed, can't explain that ! > Considering that they're almost identical, that's interesting. I > don't know how to explain it, except that maybe it's a coincidence. > > The big difference from your experience is that I replaced the 1542A > with a 1542B, and the problems completely disappeared. Let's look at > the other responders: > > >> Date: Tue, 11 Jun 1996 16:56:50 -0400 > >> From: Scott Kelly > >> To: jhs@freebsd.org > >> Subject: Adaptec 1542A Users (from 12 Apr 1996) > >> > >> > >> I seem to be having similar problems, but with a 1542B... Do you know if t - here > >> has been a driver update since April? > > Are you sure that these are the exact problems? What other hardware > are you running? > > > For reference, I'll append parts of my last mail: > >> Tomi Vainio > >> Has confirmed he sees the same Adaptec 1542A SCSI adapter bug that I do. > >> > >> > I connected sd1 to my 1542A and here are results: > >> > > >> > 1. No problems if testblock is only one that generates disk activity. > >> > 2. I launched couple find processes to sd0 and at same time I > >> > run testblock. Testblock failed only 1/10 of test runs. > >> > 3. I copied files with cp to sd1 when running testblock on > >> > sd1. Testblock failed on every time. > > Yes, I had a vague feeling that it was related to the amount of disk > activity. > > > >> So it looks like a generic bug in FreeBSD code: > >> With a 1542A (& not a 1542B, which seems OK), > >> In simultaneous multiple task write mode to sd1 (or 2 or 3 or 4), > >> At random multiples of 0x1000 bytes, > >> The first 8 bytes of a block get forced to 0xFF. > >> (Of course it may well be that FreeBSD code is not `in error' but merely > >> doesnt allow for some wart in the 1542A, that's fixed in the 1542B, > >> but whatever, we need a fix). > > > > As above in this mail, I think I'm wrong there, it's not 1542A sepcific, > > I get it with 2 different 1542B's as well > > Do you have 1542Bs with which you don't get it? No, I only have 2 1542Bs & 1 A, all show error on same drive. > When I get a bit of time, I intend to install BSD/OS on the same > configuration and see if it has the same problems. Let us know your further deductions from that please :-) > Greg I used to feel I had found a bug in the driver, but now tend to view my problem here as a bad disc, but its worrying when I hear you observe the same things I do, & others see similar things too ! I have NETBSD src/ here (but no bins & no OS-BSD), but not much time, & anyway seem to recall Julian Elischer wrote scsi for both Net & Free, so if Free & Net are resumably similar scsi code, it'd be a less meaningful test than you trying OS BSD on your system). Anyone else who even just suspects misbehaving discs, is welcome to a copy of my testblock.c & .man (it runs in user not root mode, & wont destroy your file systems & data :-) Julian -- Julian H. Stacey jhs@freebsd.org http://www.freebsd.org/~jhs/ From owner-freebsd-scsi Sat Aug 3 17:41:32 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id RAA00430 for freebsd-scsi-outgoing; Sat, 3 Aug 1996 17:41:32 -0700 (PDT) Received: from mailbox.neosoft.com (mailbox.neosoft.com [206.109.1.16]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id RAA00425 for ; Sat, 3 Aug 1996 17:41:30 -0700 (PDT) Received: from bonkers.taronga.com (root@bonkers.neosoft.com [206.109.2.48]) by mailbox.neosoft.com (8.7.5/8.7.3) with SMTP id TAA26354 for ; Sat, 3 Aug 1996 19:41:25 -0500 (CDT) Received: (from peter@localhost) by bonkers.taronga.com (8.6.11/8.6.9) id TAA22365; Sat, 3 Aug 1996 19:37:48 -0500 Date: Sat, 3 Aug 1996 19:37:48 -0500 From: peter@taronga.com (Peter da Silva) Message-Id: <199608040037.TAA22365@bonkers.taronga.com> To: scsi@freebsd.org Subject: Re: 8 * 0xFF bytes at intermittent multiples of 0x1000 Newsgroups: taronga.freebsd.scsi In-Reply-To: <199608031338.PAA01488@vector.jhs.no_domain> References: <199607141423.QAA22112@allegro.lemis.de> Organization: none Sender: owner-freebsd-scsi@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I've been having weird problems with a variety of tape drives on the 1542B. I haven't been able to reliably get any tape to work. *sigh* I had a disk dedicated to swap on it at one point, but was having too many problems with it so I gave that up. I'm currently running 2.0.5R, and will be upgrading to 2.1.5R when it comes out on CD. If anyone has things they'd like me to try let me know.