From owner-freebsd-mobile@FreeBSD.ORG Thu Apr 8 17:36:10 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 D2AB916A4CE; Thu, 8 Apr 2004 17:36:10 -0700 (PDT) Received: from smtp.newipnet.com (5.Red-80-32-157.pooles.rima-tde.net [80.32.157.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2BC9143D1D; Thu, 8 Apr 2004 17:36:09 -0700 (PDT) (envelope-from freebsd@newipnet.com) Received: by smtp.newipnet.com (ESMTP Server, from userid 511) id E7B6A20519; Fri, 9 Apr 2004 02:36:06 +0200 (CEST) Received: from madre (madre.newipnet.com [192.168.128.4]) by smtp.newipnet.com (ESMTP Server) with ESMTP id B441C20286; Fri, 9 Apr 2004 02:36:01 +0200 (CEST) Message-ID: <200404090234530949.15ACB39A@192.168.128.16> In-Reply-To: <20040407.092146.40772577.imp@bsdimp.com> References: <20040406.162834.02299817.imp@bsdimp.com> <20040406.231324.131273745.imp@bsdimp.com> <200404071245040782.0D909C4C@192.168.128.16> <20040407.092146.40772577.imp@bsdimp.com> X-Mailer: Courier 3.50.00.09.1092 (http://www.rosecitysoftware.com) (P) Date: Fri, 09 Apr 2004 02:34:53 +0200 From: "Carlos Velasco" To: "M. Warner Losh" Content-Type: text/plain; charset="us-ascii" X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on atlas.newipnet.com X-Spam-Level: X-Spam-Status: No, hits=-104.9 required=5.0 tests=BAYES_00,USER_IN_WHITELIST autolearn=ham version=2.63 cc: jon@freebsd.org cc: freebsd-mobile@freebsd.org cc: freebsd-current@freebsd.org cc: marc@mit.edu Subject: Re[2]: 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: Fri, 09 Apr 2004 00:36:11 -0000 On 07/04/2004 at 9:21 M. Warner Losh wrote: >Cool! There's some unintended effects of doing this for ALL memory >allocations on the CardBus cards. However, it is relatively easy to >fix in a slightly different way. Here's the diffs I have in my tree. >Do they also solve the problems for you? I've run with a 4k >allocation boundary locally, but that only helps slightly. We need the below patch for it to work as pccbb is overriding alignment for pcic. However it does not work, it reads CIS but card doesn't work. I think it's because further resources (pccard0: ccr_res == 88002000-880023ff, base=ff80) need 64k alignment too for card to work. --- dev/pccbb/pccbb.c Sun Apr 4 22:37:54 2004 +++ dev/pccbb/pccbb.c Thu Apr 8 13:42:53 2004 @@ -1765,8 +1765,9 @@ start = cbb_start_mem; if (end < start) end = start; - flags = (flags & ~RF_ALIGNMENT_MASK) | - rman_make_alignment_flags(CBB_MEMALIGN); + if (RF_ALIGNMENT(flags) < CBB_MEMALIGN_BITS) + flags = (flags & ~RF_ALIGNMENT_MASK) | + rman_make_alignment_flags(CBB_MEMALIGN); break; case SYS_RES_IOPORT: if (start < cbb_start_16_io) Regards, Carlos Velasco