Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Sep 2004 11:53:47 +0200
From:      Tijl Coosemans <tijl@ulyssis.org>
To:        freebsd-mobile@freebsd.org
Subject:   Re: [PATCH] ToPIC95B cardbus on old laptop
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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
<http://www.freebsd.org/cgi/query-pr.cgi?pr=66848>; 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
eShkZXZpY2VfdCBicmRldiwgaW50ICpyaWQpCit7CisJc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2Rlc3Ryb3koJnNjLT5tdHgpOwo=

--Multipart=_Fri__10_Sep_2004_11_53_47_+0200_m87LKLjYSOOhXU7b--


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