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