From owner-cvs-all Thu Dec 10 23:19:36 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA27720 for cvs-all-outgoing; Thu, 10 Dec 1998 23:19:36 -0800 (PST) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA27715; Thu, 10 Dec 1998 23:19:35 -0800 (PST) (envelope-from mjacob@FreeBSD.org) From: Matt Jacob Received: (from mjacob@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id XAA00622; Thu, 10 Dec 1998 23:19:36 -0800 (PST) Date: Thu, 10 Dec 1998 23:19:36 -0800 (PST) Message-Id: <199812110719.XAA00622@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: cvs commit: src/sys/cam/scsi scsi_sa.c Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk mjacob 1998/12/10 23:19:36 PST Modified files: sys/cam/scsi scsi_sa.c Log: Some fixes to handle fixed mode and variable mode more sensibly- and also incorporate some notion of which revision the device is. If it's < SCSI2, for example, READ BLOCK LIMITS is not a MANDATORY command. At any rate, the initial state is to try and read block limits to get a notion of the smallest and largest record size as well as the granularity. However, this doesn't mean that the device should actually *in* fixed block mode should the max && min be equal... *That* choice is (for now) determined by whether the device comes up with a blocksize of nonzero. If so, then it's a fixed block preferred device, otherwise not (this will change again soon). When actually doing I/O, and you're in fixed length mode, the block count is *not* the byte count divided by the minimum block size- it's the byte count divided by the current blocksize (or use shift/mask shortcuts if that worked out...). Then when you *change* the blocksize via an ioctl, make sure this actually propagates to the stored notion of blocksize (and update the shift/mask shortcuts). Misc Other: When doing a mode select, only use the SCSI_SAME_DENSITY (0x7f) code if the device is >= SCSI2- otherwise just use the saved density code. Recover from the ripple of ILLEGAL REQUEST not being 'retried' in that RESERVE/RELEASE is not a mandatory command for < SCSI2 (so ignore it if it fails). Revision Changes Path 1.7 +167 -46 src/sys/cam/scsi/scsi_sa.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message