Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Jul 1999 13:19:48 -0600 (MDT)
From:      "Kenneth D. Merry" <ken@plutotech.com>
To:        vallo@matti.ee
Cc:        freebsd-current@FreeBSD.ORG, mjacob@feral.com
Subject:   Re: Recent current misreports scsi disk size
Message-ID:  <199907051919.NAA77943@panzer.kdm.org>
In-Reply-To: <19990705213730.A353@myhakas.matti.ee> from Vallo Kallaste at "Jul 5, 1999 09:37:30 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
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: <QUANTUM VIKING II 4.5WSE 5520> 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: <QUANTUM VIKING II 4.5WSE 5520> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907051919.NAA77943>