From owner-freebsd-mobile@FreeBSD.ORG Fri Sep 10 09:55:27 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 EEDB716A4CE for ; Fri, 10 Sep 2004 09:55:26 +0000 (GMT) Received: from kalimero.kotnet.org (65-36.241.81.adsl.skynet.be [81.241.36.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B65843D41 for ; Fri, 10 Sep 2004 09:55:23 +0000 (GMT) (envelope-from tijl@ulyssis.org) Received: from localhost (localhost [127.0.0.1]) by kalimero.kotnet.org (8.13.1/8.13.1) with SMTP id i8A9rlkw000903 for ; Fri, 10 Sep 2004 11:54:48 +0200 (CEST) (envelope-from tijl@ulyssis.org) Date: Fri, 10 Sep 2004 11:53:47 +0200 From: Tijl Coosemans To: freebsd-mobile@freebsd.org Message-Id: <20040910115347.03a7b2ba.tijl@ulyssis.org> In-Reply-To: <200409090735.i897ZtuT005531@grimreaper.grondar.org> References: <200409040005.03105.tijl@ulyssis.org> <200409090735.i897ZtuT005531@grimreaper.grondar.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i386-portbld-freebsd5.2) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Fri__10_Sep_2004_11_53_47_+0200_m87LKLjYSOOhXU7b" Subject: Re: [PATCH] ToPIC95B cardbus on old laptop 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, 10 Sep 2004 09:55:27 -0000 This is a multi-part message in MIME format. --Multipart=_Fri__10_Sep_2004_11_53_47_+0200_m87LKLjYSOOhXU7b Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 09 Sep 2004 08:35:55 +0100, Mark Murray wrote: > Could you please post the updated, working patch to the > freebsd-mobile@ list, with a honking great-big "[PATCH]" in the > subject so it doesn't get lost. Here it is. It addresses cardbus memory allocation for non-acpi laptops. However, as mentioned in the original patch at this might not be a clean solution. Quoting Warner Losh: ``The real issue is that the non acpi pcib driver doesn't restrict the memory ranges like it should, causing the allocation of 0!'' This patch adds a workarround in the cardbus driver, but the actual problem might not be there. --Multipart=_Fri__10_Sep_2004_11_53_47_+0200_m87LKLjYSOOhXU7b Content-Type: text/plain; name="pccbb.patch" Content-Disposition: attachment; filename="pccbb.patch" Content-Transfer-Encoding: base64 LS0tIHN5cy9kZXYvcGNjYmIvcGNjYmJfcGNpLmMub3JpZwlGcmkgU2VwIDEwIDExOjI2OjAyIDIw MDQKKysrIHN5cy9kZXYvcGNjYmIvcGNjYmJfcGNpLmMJRnJpIFNlcCAxMCAxMTozMjoyMyAyMDA0 CkBAIC0yODcsNiArMjg3LDM5IEBACiB9CiAKIHN0YXRpYyBpbnQKK2NiYl9wY2lfZ2V0X21lbW9y eShkZXZpY2VfdCBicmRldiwgaW50ICpyaWQpCit7CisJc3RydWN0IGNiYl9zb2Z0YyAqc2M7CisJ dV9pbnQzMl90IHNvY2tiYXNlOworCisJc2MgPSAoc3RydWN0IGNiYl9zb2Z0YyAqKSBkZXZpY2Vf Z2V0X3NvZnRjKGJyZGV2KTsKKwlzb2NrYmFzZSA9IHBjaV9yZWFkX2NvbmZpZyhicmRldiwgKnJp ZCwgNCk7CisJaWYgKHNvY2tiYXNlID49IDB4MTAwMDAwICYmIHNvY2tiYXNlIDwgMHhmZmZmZmZm MCkgeworCQlkZXZpY2VfcHJpbnRmKGJyZGV2LCAiQ291bGQgbm90IG1hcCByZWdpc3RlciBtZW1v cnkgMHgleFxuIiwKKwkJICAgIHNvY2tiYXNlKTsKKwkJcmV0dXJuIChFTk9NRU0pOworCX0KKwlw Y2lfd3JpdGVfY29uZmlnKGJyZGV2LCAqcmlkLCAweGZmZmZmZmZmLCA0KTsKKwlzb2NrYmFzZSA9 IHBjaV9yZWFkX2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