From owner-freebsd-current Mon Jul 5 12:57:28 1999 Delivered-To: freebsd-current@freebsd.org Received: from feral.com (feral.com [192.67.166.1]) by hub.freebsd.org (Postfix) with ESMTP id BF4B914F61 for ; Mon, 5 Jul 1999 12:57:26 -0700 (PDT) (envelope-from mjacob@feral.com) Received: from semuta.feral.com (semuta [192.67.166.70]) by feral.com (8.8.7/8.8.7) with ESMTP id MAA09857; Mon, 5 Jul 1999 12:57:20 -0700 Date: Mon, 5 Jul 1999 12:56:24 -0700 (PDT) From: Matthew Jacob Reply-To: mjacob@feral.com To: "Kenneth D. Merry" Cc: vallo@matti.ee, freebsd-current@FreeBSD.ORG Subject: Re: Recent current misreports scsi disk size In-Reply-To: <199907051919.NAA77943@panzer.kdm.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Sorry, I pooched it. I'll fix. On Mon, 5 Jul 1999, Kenneth D. Merry wrote: > Vallo Kallaste wrote... > > Hello > > > > I just cvsupped the src-all, built the world, kernel and noticed that: > > > > changing root device to da0s1a > > da0 at ncr0 bus 0 target 5 lun 0 > > da0: Fixed Direct Access SCSI-2 device > > da0: 40.000MB/s transfers (20.000MHz, offset 16, 16bit), Tagged Queueing Enabled > > da0: 254MB (8910423 512 byte sectors: 255H 63S/T 554C) > > da1 at ncr0 bus 0 target 6 lun 0 > > da1: Fixed Direct Access SCSI-2 device > > da1: 40.000MB/s transfers (20.000MHz, offset 16, 16bit), Tagged Queueing Enabled > > da1: 254MB (8910423 512 byte sectors: 255H 63S/T 554C) > > ^^^^^ > > Actually the size is around 4GB. > > The change made to scsi_da.c in revision 1.28 doesn't quite work right for > disks over 2G on 32 bit machines. > > You can probably revert back to scsi_da.c version 1.27 and fix the problem. > > Instead of this: > > (((unsigned long) dp->secsize) * ((unsigned long) dp->sectors)) >> 20ul, > > The calculation might work better as something like this: > > (((u_int64_t)dp->secsize) * ((u_int64_t) dp->sectors)) >> 20 > > That'll probably cause a printf format warning, though. > > Ken > -- > Kenneth Merry > ken@plutotech.com > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message