From owner-freebsd-current Mon Nov 4 0: 3:24 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4340537B408 for ; Mon, 4 Nov 2002 00:03:22 -0800 (PST) Received: from zibbi.icomtek.csir.co.za (zibbi.icomtek.csir.co.za [146.64.24.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id B380643E3B for ; Mon, 4 Nov 2002 00:03:19 -0800 (PST) (envelope-from jhay@zibbi.icomtek.csir.co.za) Received: from zibbi.icomtek.csir.co.za (localhost [IPv6:::1]) by zibbi.icomtek.csir.co.za (8.12.6/8.12.6) with ESMTP id gA482oD8093122; Mon, 4 Nov 2002 10:02:50 +0200 (SAT) (envelope-from jhay@zibbi.icomtek.csir.co.za) Received: (from jhay@localhost) by zibbi.icomtek.csir.co.za (8.12.6/8.12.6/Submit) id gA482oJj093121; Mon, 4 Nov 2002 10:02:50 +0200 (SAT) (envelope-from jhay) From: John Hay Message-Id: <200211040802.gA482oJj093121@zibbi.icomtek.csir.co.za> Subject: Re: umass CF geometry problems, was Re: fdisk -BI ob clean disk broken In-Reply-To: <20021104084214.D17734-100000@uitsmijter.van-laarhoven.org> from Nick Hibma at "Nov 4, 2002 08:48:20 am" To: n_hibma@van-laarhoven.org (Nick Hibma) Date: Mon, 4 Nov 2002 10:02:50 +0200 (SAT) Cc: current@FreeBSD.ORG, phk@critter.freebsd.dk, imp@bsdimp.com X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > USB is only the transport. It doesn't add or remove functionality (the > only exception being probing for LUNs on CBI devices). If you want to > determine the geometry you will have to do this through SCSI commands. I > was hoping that the CAM code would be smart enough to request the > details from the drive itself, but perhaps there is a good reason for > asking the controller for this. > > It did work without, so it hasn't been implemented yet. Feel free to > suggest a SCSI command together with the logic. > > What is the GET_GEOMETRY used for anyway? Well the short version of the problem is that "fdisk -BI " works on -stable to get a FreeBSD partition on the Compact Flash. This does not work on -current anymore. I have traced that back to the commit in umass.c rev 1.61 that removed the fake geometry setting and just leave the cylinders, heads and sectors_per_track zero. This cause fdisk to coredump with a floating point error. > > In message: <84292.1036393958@critter.freebsd.dk> > > Poul-Henning Kamp writes: > > : We should obviously fix it. I have no idea what is possible in USB > > : devices in this respect. > > > > Nor do I. Maybe there's some SCSI command that we can send that is > > well defined enough to work often enough. > > > > However, I'm not clueful enough about SCSI to know if this can be done > > (likely reading some mode page will do it in real SCSI), nor about > > USB's mass storage devices, nor about all the wonderful and weird > > variations that one might find in the wild... John -- John Hay -- John.Hay@icomtek.csir.co.za / jhay@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message