From owner-freebsd-stable@FreeBSD.ORG Tue Mar 6 04:38:05 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3032516A402 for ; Tue, 6 Mar 2007 04:38:05 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id DE18413C471 for ; Tue, 6 Mar 2007 04:38:04 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id l264bs0T026198; Mon, 5 Mar 2007 21:37:59 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <45ECF00D.3070101@samsco.org> Date: Mon, 05 Mar 2007 21:37:33 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.2pre) Gecko/20070111 SeaMonkey/1.1 MIME-Version: 1.0 To: Craig Boston , freebsd-stable@freebsd.org References: <20070306020826.GA18228@nowhere> In-Reply-To: <20070306020826.GA18228@nowhere> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Mon, 05 Mar 2007 21:37:59 -0700 (MST) X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pooker.samsco.org Cc: Subject: Re: umass media size off-by-one? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2007 04:38:05 -0000 Craig Boston wrote: > Hi all, I ran into this while trying to use geli to encrypt an external > usb-2 hard drive. It appears that sometimes the media size reported by > umass is one sector too big. For example: > > umass0: Prolific Technology Inc. Mass Storage Device, rev 2.00/1.00, addr 2 > da0 at umass-sim0 bus 0 target 0 lun 0 > da0: Fixed Direct Access SCSI-0 device > da0: 40.000MB/s transfers > da0: 171705MB (351651889 512 byte sectors: 255H 63S/T 21889C) > > # dd if=/dev/zero of=/dev/da0 oseek=351651888 count=1 > dd: /dev/da0: Input/output error > 1+0 records in > 0+0 records out > 0 bytes transferred in 0.002951 secs (0 bytes/sec) > > # dd if=/dev/zero of=/dev/da0 oseek=351651887 count=1 > 1+0 records in > 1+0 records out > 512 bytes transferred in 0.000982 secs (521360 bytes/sec) > > This is with a "high speed, power 100 mA, config 1, Mass Storage > Device(0x3507), Prolific Technology Inc.(0x067b), rev 1.00" enclosure. > I tested with two USB flash memory devices and those seem to report the > correct size. > > I'm currently rebuilding a kernel with USB_DEBUG to see if it's specific > to a certain protocol and try to figure out if it's a bug in one of them > or if the enclosure is lying. Has anyone run into this before? > > Craig Fixed in 7-CURRENT. Contact Warner Losh to make sure that your device is quirked appropriately. Scott