From owner-freebsd-mobile@FreeBSD.ORG Tue Apr 6 10:05:23 2004 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7546116A5AD; Tue, 6 Apr 2004 10:05:23 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA51843D1D; Tue, 6 Apr 2004 10:05:20 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.10/8.12.9) with ESMTP id i36H3okj091586; Tue, 6 Apr 2004 11:03:50 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 06 Apr 2004 11:04:23 -0600 (MDT) Message-Id: <20040406.110423.35013927.imp@bsdimp.com> To: freebsd@newipnet.com From: "M. Warner Losh" In-Reply-To: <200404061255150877.0875F2E3@192.168.128.16> References: <200404042342100749.00809B29@192.168.128.16> <200404061255150877.0875F2E3@192.168.128.16> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: jon@freebsd.org cc: freebsd-mobile@freebsd.org cc: freebsd-current@freebsd.org cc: marc@mit.edu Subject: Re: pccbb pccard rman - Something is very wrong somewhere X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2004 17:05:23 -0000 In message: <200404061255150877.0875F2E3@192.168.128.16> "Carlos Velasco" writes: : Hello, : : Investigating this problem, I have discovered two issues. : : One minor bug (off-by-1) in subr_rman.c: : : diff -ur sys/kern/subr_rman.c sysnew/kern/subr_rman.c : --- sys/kern/subr_rman.c Wed Jun 11 00:56:57 2003 : +++ sysnew/kern/subr_rman.c Tue Apr 6 11:41:23 2004 : @@ -234,7 +234,7 @@ : rstart += bound - (rstart & ~bmask); : } while ((rstart & amask) != 0 && rstart < end && : rstart < s->r_end); : - rend = ulmin(s->r_end, ulmax(rstart + count, end)); : + rend = ulmin(s->r_end, ulmax(rstart + count - 1, end)); : if (rstart > rend) { : DPRINTF(("adjusted start exceeds end\n")); : continue; This looks correct. It surprises me that it is there... : And the real problem, an alignment issue that prevents pccard to work: This is almost the real problem. : diff -ur sys/dev/pccbb/pccbbreg.h sysnew/dev/pccbb/pccbbreg.h : --- sys/dev/pccbb/pccbbreg.h Sat Aug 9 20:49:22 2003 : +++ sysnew/dev/pccbb/pccbbreg.h Tue Apr 6 11:40:13 2004 : @@ -74,8 +74,8 @@ : #define CBBR_IOLIMIT0 0x30 /* len=4 */ : #define CBBR_IOBASE1 0x34 /* len=4 */ : #define CBBR_IOLIMIT1 0x38 /* len=4 */ : -#define CBB_MEMALIGN 4096 : -#define CBB_MEMALIGN_BITS 12 : +#define CBB_MEMALIGN 65536 : +#define CBB_MEMALIGN_BITS 16 : #define CBB_IOALIGN 4 : #define CBB_IOALIGN_BITS 2 this is bogus. : We are aligning to 0x1000 (4096) and we should align to, at least, 0x10000 : (65536). : This solves the problem. This is a problem. : Can anyone review these patches and commit them if they are right? This isn't right. However, I'll generate a fix from my p4 tree. I'm having big problems with the new acpi code on my laptop in my p4 tree :-(. Warner