Re: pccbb pccard rman - Something is very wrong somewhere
"M. Warner Losh" <[email protected]>
| Newsgroups | gmane.os.freebsd.current,gmane.os.freebsd.devel.mobile |
|---|---|
| Message-ID | <[email protected]> |
In message: <[email protected]> "Carlos Velasco" <[email protected]> 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 _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "[email protected]"