From owner-freebsd-usb@FreeBSD.ORG Mon Dec 31 00:54:45 2007 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C567316A41A for ; Mon, 31 Dec 2007 00:54:45 +0000 (UTC) (envelope-from henrik@gulbra.net) Received: from av10-2-sn2.hy.skanova.net (av10-2-sn2.hy.skanova.net [81.228.8.182]) by mx1.freebsd.org (Postfix) with ESMTP id 84AB513C47E for ; Mon, 31 Dec 2007 00:54:45 +0000 (UTC) (envelope-from henrik@gulbra.net) Received: by av10-2-sn2.hy.skanova.net (Postfix, from userid 502) id DA93B39594; Mon, 31 Dec 2007 01:54:43 +0100 (CET) Received: from smtp4-1-sn2.hy.skanova.net (smtp4-1-sn2.hy.skanova.net [81.228.8.92]) by av10-2-sn2.hy.skanova.net (Postfix) with ESMTP id B8D6439536; Mon, 31 Dec 2007 01:54:43 +0100 (CET) Received: from [192.168.0.2] (81-235-156-87-no29.tbcn.telia.com [81.235.156.87]) by smtp4-1-sn2.hy.skanova.net (Postfix) with ESMTP id 57E2C37E45; Mon, 31 Dec 2007 01:54:43 +0100 (CET) From: Henrik Gulbrandsen To: ticso@cicely.de In-Reply-To: <20071227201515.GC31522@cicely12.cicely.de> References: <1198689316.1119.382.camel@Particle> <20071226.114812.1649771240.imp@bsdimp.com> <1198713403.1119.414.camel@Particle> <20071226.174523.1326317191.imp@bsdimp.com> <1198781185.1119.478.camel@Particle> <20071227201515.GC31522@cicely12.cicely.de> Content-Type: text/plain Date: Mon, 31 Dec 2007 01:53:10 +0100 Message-Id: <1199062390.75510.12.camel@Particle> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: READ_CAPACITY_OFFBY1 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Dec 2007 00:54:45 -0000 On Thu, 2007-12-27 at 21:15 +0100, Bernd Walter wrote: > This is my cellphone with a 2GB micro-SD: > da9 at umass-sim3 bus 3 target 0 lun 0 > da9: < > Removable Direct Access SCSI-0 device > da9: 1.000MB/s transfers > da9: 1950MB (3994377 512 byte sectors: 255H 63S/T 248C) > > It offers not the complete media - it offers the slice as the whole > media, so theoretically I can adjust the drive size by any number of > blocks. I hate when reality interferes with a clean design! :-) OK. I'm convinced. We might still use heuristics as a hint for future bug hunters, but I'm not going to worry about that for the moment. This is the quirk patch needed for the 128 MB Creative MuVo device (where "MB" seems to be 1024000 bytes...). I hope email formatting works. PR usb/78984 can hopefully be closed once this is applied. /Henrik =============================================================================== --- sys/dev/usb/umass.c.orig 2007-12-29 11:13:06.000000000 +0100 +++ sys/dev/usb/umass.c 2007-12-29 14:37:57.000000000 +0100 @@ -374,6 +374,10 @@ UMASS_PROTO_SCSI | UMASS_PROTO_BBB, FORCE_SHORT_INQUIRY | NO_START_STOP | IGNORE_RESIDUE }, + { USB_VENDOR_CREATIVE, USB_PRODUCT_CREATIVE_NOMAD, 0x001, + UMASS_PROTO_SCSI | UMASS_PROTO_BBB, + READ_CAPACITY_OFFBY1 + }, { USB_VENDOR_DESKNOTE, USB_PRODUCT_DESKNOTE_UCR_61S2B, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_QUIRKS ===============================================================================