From owner-freebsd-scsi@FreeBSD.ORG Fri Oct 8 16:27:29 2004 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A79BA16A4CE for ; Fri, 8 Oct 2004 16:27:29 +0000 (GMT) Received: from nargothrond.kdm.org (nargothrond.kdm.org [70.56.43.81]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F86643D39 for ; Fri, 8 Oct 2004 16:27:29 +0000 (GMT) (envelope-from ken@nargothrond.kdm.org) Received: from nargothrond.kdm.org (localhost [127.0.0.1]) by nargothrond.kdm.org (8.12.11/8.12.11) with ESMTP id i98GRSCH055594; Fri, 8 Oct 2004 10:27:28 -0600 (MDT) (envelope-from ken@nargothrond.kdm.org) Received: (from ken@localhost) by nargothrond.kdm.org (8.12.11/8.12.5/Submit) id i98GRSFI055593; Fri, 8 Oct 2004 10:27:28 -0600 (MDT) (envelope-from ken) Date: Fri, 8 Oct 2004 10:27:28 -0600 From: "Kenneth D. Merry" To: Bruce M Simpson Message-ID: <20041008162728.GA55158@nargothrond.kdm.org> References: <20041008072854.GC718@empiric.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041008072854.GC718@empiric.icir.org> User-Agent: Mutt/1.4.2i X-Virus-Scanned: clamd / ClamAV version 0.75.1, clamav-milter version 0.75c on nargothrond.kdm.org X-Virus-Status: Clean cc: freebsd-scsi@FreeBSD.org Subject: Re: [PATCH] Add UFI related mode pages to scsi_modes X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Oct 2004 16:27:29 -0000 On Fri, Oct 08, 2004 at 00:28:54 -0700, Bruce M Simpson wrote: > [Please Cc: me as I am not subscribed to -scsi] > > Any objections to my committing this patch to HEAD? > > Most of the details herein come from the USB Mass Storage UFI Spec. Well, for page 0x1b, that'll probably be okay. I hope at some point to put device type information in the mode page database so that we can distinguish between pages with identical numbers that are different for different device types. As for page 0x1c, though, we have a problem. If you look at SPC-3, it is not a per device type page, but rather a general SCSI page (Informational Exceptions Control mode page). My guess is that the USB folks stole a reserved mode page number, and now it is used for something else. In order to make that work, we'll have to come up with a way to have different mode pages with the same number, and then automatically figure out which page format goes with the device we're talking to. The pieces of information we'll need to do that are likely: - device type (direct access, sequential access, CD, etc.) - transport/protocol information (I wouldn't have put this in the list before now, but we'll have to use this or some other similar method to distinguish between UFI devices and everything else.) - inquiry information for vendor-specific mode pages > --- /usr/src/share/misc/scsi_modes Sun Feb 24 05:27:57 2002 > +++ scsi_modes Fri Oct 8 00:26:13 2004 > @@ -291,6 +291,28 @@ > {Reserved} *i4 > } > > +# Removable devices > +0x1b "Removable Block Access Capacities Page" { > + {System Floppy Type Device} t1 > + {Supports Reporting Format Progress} t1 > + {Reserved} *t6 > + {Non CD Optical Device} t1 > + {Single or Multiple LUN Supported} t1 > + {Reserved} *t3 > + {Total Logical Units Supported} t3 > + {Reserved} *i8 > +} > + > +0x1c "Timer and Protect Page" { > + {Reserved} *i1 > + {Reserved} *t4 > + {Inactivity Time Multiplier} t4 > + {Reserved} *t6 > + {Disable Media Access until Power Cycle} t1 > + {Software Write Protect until Power Cycle} t1 > + {Reserved} *i3 > +} > + > # CD-ROM (and CD-R[W]) devices > 0x2a "CD capabilities and mechanical status page" { > {Reserved} *t4 Ken -- Kenneth Merry ken@kdm.org