Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Jun 1999 08:39:16 -0700 (PDT)
From:      Doug Ambrisko <ambrisko@whistle.com>
To:        kent@tfd.com (Kent Hauser)
Cc:        freebsd-mobile@FreeBSD.ORG
Subject:   Re: PC-Card configuration help
Message-ID:  <199906291539.IAA48250@whistle.com>
In-Reply-To: <199906290339.XAA01700@chapel-hill.tfd.com> from Kent Hauser at "Jun 28, 99 11:39:13 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Kent Hauser writes:
| I'm having trouble with a PC-Card I've got. It's a "serial port"
| card from socket communications -- basically adds another com port.
| 
| I have no trouble with PC-Card modems & figured this would be the same.
| 
| Unfortunately, I get "resourse allocation failed" for this card when
| I insert it. I got the `pccard.conf' entry by copying a similar modem
| entry.
| 
| In running the problem down, I see that the memory allocation
| fails when the card's inserted (ie alloc_memory returns -1).
| The "memory" statement in my pccard.conf along with the `dumpcis'
| output for the card are shown below. I'd appreciate any help
| anyone might have.

Try this patch ... I have that card and noticed it requests 256 bytes and
the MEMUNIT is 4096 if I recall correctly so the math returns 0 for
"size/MEMUNIT" which is not good.  To me this seems like the code should 
round up fractions, but for now I just bump up the size if the request is 
less then MEMUNIT.  Hopefully someone that knows what is to happen can 
fix it.  If you verify that this fixes your problem I will send-pr it.

Also note in -current the sio driver is broken for pccard.  I have a gross 
hack that didn't work for someone else but worked for me on a -current
of a month ago.  Unfortunately I can't test with a more update -current
right now.

Doug A.

(this is relative to /usr/src/usr.sbin/pccard/pccardd)

Index: util.c
===================================================================
RCS file: /cvs/freebsd/src/usr.sbin/pccard/pccardd/util.c,v
retrieving revision 1.12
diff -c -r1.12 util.c
*** util.c	1998/03/09 05:18:59	1.12
--- util.c	1999/06/29 15:30:03
***************
*** 172,177 ****
--- 172,179 ----
  {
  	int     i;
  
+ 	if (size < MEMUNIT)
+ 		size = MEMUNIT;
  	i = bit_fns(mem_avail, MEMBLKS, size / MEMUNIT);
  	if (i < 0)
  		return (0);


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message




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