From owner-freebsd-scsi@FreeBSD.ORG Sun Sep 21 21:59:33 2003 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1867216A4BF for ; Sun, 21 Sep 2003 21:59:33 -0700 (PDT) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 3592243FCB for ; Sun, 21 Sep 2003 21:59:32 -0700 (PDT) (envelope-from nate@rootlabs.com) Received: (qmail 37639 invoked by uid 1000); 22 Sep 2003 04:59:34 -0000 Date: Sun, 21 Sep 2003 21:59:34 -0700 (PDT) From: Nate Lawson To: Clive Lin In-Reply-To: <20030921130539.GA64930@fatpipi.cirx.org> Message-ID: <20030921215914.O37429@root.org> References: <3F64E50E.2040608@kanji.com.au> <20030921130539.GA64930@fatpipi.cirx.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-scsi@freebsd.org cc: Andrew Snow Subject: Re: ibm x345 w/ serveraid-5i + freebsd ips driver dramas X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Sep 2003 04:59:33 -0000 On Sun, 21 Sep 2003, Clive Lin wrote: > On Mon, Sep 15, 2003 at 08:00:46AM +1000, Andrew Snow wrote: > > Problem 2: (the biggest problem) > > > > While the drive size is reported correctly, the geometry is wrong... > > 472 cyls/254 heads/63 sectors = 7552944 sectors (3687MB) ?! > > > > When setting the BIOS to "non-extended" (2GB max) support mode, freebsd > > then thinks this is the geometry: > > 1846 cyls/128 heads/32 sectors = 7561216 sectors (3692MB). > > > > So I tested a few alternate geometries instead and even though there > > were no error messages, it seemed to get reset to what FreeBSD was > > reporting, no matter how many ways I tried to use the fdisk utility. > > Hi, > > I have a quick fix for this problem. > > --- sys/dev/ips/ips_disk.c~~ Sun Sep 21 19:04:44 2003 > +++ sys/dev/ips/ips_disk.c Sun Sep 21 20:29:18 2003 > @@ -139,7 +139,7 @@ > dsc->ipsd_disk.d_fwsectors = IPS_COMP_SECTORS; > } > dsc->ipsd_disk.d_sectorsize = IPS_BLKSIZE; > - dsc->ipsd_disk.d_mediasize = totalsectors * IPS_BLKSIZE; > + dsc->ipsd_disk.d_mediasize = (long long) totalsectors * IPS_BLKSIZE; > disk_create(dsc->unit, &dsc->ipsd_disk, 0, NULL, NULL); > > device_printf(dev, "Logical Drive (%dMB)\n", > > The (long long) casting might not be suitable on other > platform. It works for me on a dual XEON x225 box, which has a > ServeRAID 5i. Committed as off_t, thanks. -Nate