From owner-freebsd-current Mon Jul 5 12:20: 6 1999 Delivered-To: freebsd-current@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id 0A8C714DCB for ; Mon, 5 Jul 1999 12:20:03 -0700 (PDT) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id NAA77943; Mon, 5 Jul 1999 13:19:48 -0600 (MDT) (envelope-from ken) Message-Id: <199907051919.NAA77943@panzer.kdm.org> Subject: Re: Recent current misreports scsi disk size In-Reply-To: <19990705213730.A353@myhakas.matti.ee> from Vallo Kallaste at "Jul 5, 1999 09:37:30 pm" To: vallo@matti.ee Date: Mon, 5 Jul 1999 13:19:48 -0600 (MDT) Cc: freebsd-current@FreeBSD.ORG, mjacob@feral.com From: "Kenneth D. Merry" 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 X-Loop: FreeBSD.ORG 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