From owner-freebsd-scsi Tue Jul 11 03:49:44 1995 Return-Path: freebsd-scsi-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id DAA16623 for freebsd-scsi-outgoing; Tue, 11 Jul 1995 03:49:44 -0700 Received: from bunyip.cc.uq.oz.au (bunyip.cc.uq.oz.au [130.102.2.1]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id DAA16615 for ; Tue, 11 Jul 1995 03:49:41 -0700 Received: from cc.uq.oz.au by bunyip.cc.uq.oz.au id <04766-0@bunyip.cc.uq.oz.au>; Tue, 11 Jul 1995 20:49:35 +1000 Received: from netfl15a.devetir.qld.gov.au by pandora.devetir.qld.gov.au (8.6.10/DEVETIR-E0.3a) with ESMTP id UAA29129; Tue, 11 Jul 1995 20:53:56 +1000 Received: from localhost by netfl15a.devetir.qld.gov.au (8.6.8.1/DEVETIR-0.1) id KAA24365; Tue, 11 Jul 1995 10:50:30 GMT Message-Id: <199507111050.KAA24365@netfl15a.devetir.qld.gov.au> X-Mailer: exmh version 1.6 4/21/95 To: dufault@hda.com cc: scsi@freebsd.org Subject: Determining the sector size of a SCSI device in FreeBSD Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 11 Jul 1995 20:50:29 +1000 From: Stephen Hocking Sender: freebsd-scsi-owner@freebsd.org Precedence: bulk Peter, do you know if there's a quick way to determine the transfer size of a SCSI device under FreeBSD? The reason I want to know is so I can adapt the existing seagate.c to do transfers without phase checking. The old (2.0R) driver had the facility to do this, and as result it was more than two times quicker off a given device than what I'm seeing now. Stephen I do not speak for the Worker's Compensation Board of Queensland - They don't pay me enough for that! From owner-freebsd-scsi Tue Jul 11 04:40:39 1995 Return-Path: freebsd-scsi-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id EAA17658 for freebsd-scsi-outgoing; Tue, 11 Jul 1995 04:40:39 -0700 Received: from hda.com (hda.com [199.232.40.182]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id EAA17652 for ; Tue, 11 Jul 1995 04:40:36 -0700 Received: (dufault@localhost) by hda.com (8.6.11/8.3) id HAA02292; Tue, 11 Jul 1995 07:37:37 -0400 From: Peter Dufault Message-Id: <199507111137.HAA02292@hda.com> Subject: Re: Determining the sector size of a SCSI device in FreeBSD To: sysseh@devetir.qld.gov.au (Stephen Hocking) Date: Tue, 11 Jul 1995 07:37:37 -0400 (EDT) Cc: scsi@freebsd.org In-Reply-To: <199507111050.KAA24365@netfl15a.devetir.qld.gov.au> from "Stephen Hocking" at Jul 11, 95 08:50:29 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 1303 Sender: freebsd-scsi-owner@freebsd.org Precedence: bulk Stephen Hocking writes: > > Peter, do you know if there's a quick way to determine the transfer size of a > SCSI device under FreeBSD? The reason I want to know is so I can adapt the > existing seagate.c to do transfers without phase checking. The old (2.0R) > driver had the facility to do this, and as result it was more than two times > quicker off a given device than what I'm seeing now. Do you mean the sector size the device is formatted with or something different? For the sector size: from a user program you can check data bytes per physical sector in mode page 3: > hda# scsi -f /dev/rsd2.ctl -m 3 > Tracks per Zone: 21 > Alternate Sectors per Zone: 5 > Alternate Tracks per Zone: 0 > Alternate Tracks per Logical Unit: 21 > Sectors per Track: 88 > Data Bytes per Physical Sector: 512 > Interleave: 1 > Track Skew Factor: 10 > Cylinder Skew Factor: 17 > SSEC: 0 > HSEC: 1 > RMB: 0 > SURF: 0 It is also in the block descriptor header returned for the sense, and is stored in disk_parms->secsiz when the drive is successfully opened. Look around in "sd.c" for disk_parms->secsiz. Peter -- Peter Dufault Real Time Machine Control and Simulation HD Associates, Inc. Voice: 508 433 6936 dufault@hda.com Fax: 508 433 5267