From owner-cvs-all@FreeBSD.ORG Wed Feb 28 10:10:25 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 25EDC16A400; Wed, 28 Feb 2007 10:10:25 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id D92D513C428; Wed, 28 Feb 2007 10:10:24 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id l1SA9twR090068; Wed, 28 Feb 2007 03:09:56 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 28 Feb 2007 03:10:00 -0700 (MST) Message-Id: <20070228.031000.1649769988.imp@bsdimp.com> To: phk@phk.freebsd.dk From: "M. Warner Losh" In-Reply-To: <42088.1172642925@critter.freebsd.dk> References: <200702272233.l1RMXocb004983@repoman.freebsd.org> <42088.1172642925@critter.freebsd.dk> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Wed, 28 Feb 2007 03:09:56 -0700 (MST) Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/usb umass.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Feb 2007 10:10:25 -0000 In message: <42088.1172642925@critter.freebsd.dk> "Poul-Henning Kamp" writes: : In message <200702272233.l1RMXocb004983@repoman.freebsd.org>, Warner Losh write : s: : : > Some USB mass storage devices return the number of sectors in response : > to a READ_CAPACITY request rather than the maximum sector (off by one : > problem). This causes a huge cascade of errors as the geom tasting : > code tries to read the last sector (which isn't really there in the : > face of this error). automated tools that manipulate disk labels and : > such also have issues. : > : > Create a new quirk READ_CAPACITY_OFFBY1 : : A better idea would be to have scsi_da.c try to read the : last sector and chop it if it fails. Why is that a better idea? There are only a few known bad bridges out there that do this (Linux has about a dozen in its quirk list). CAM errors are rather verbose, and in this case there are 4 retries each giving about 5 lines of output (I know this because something in the geom tasting reads the last sector, or tries). After careful consideration on scsi@, this was agreed to be the least painful solution to the broken bridges. There's already a lot of code in umass to cope with the quirky umass devices, and a little more wouldn't hurt. Warner