From owner-freebsd-mobile Fri Jun 18 10:47:33 1999 Delivered-To: freebsd-mobile@freebsd.org Received: from smtp2.vnet.net (smtp2.vnet.net [166.82.1.32]) by hub.freebsd.org (Postfix) with ESMTP id EE5D214FD1 for ; Fri, 18 Jun 1999 10:47:30 -0700 (PDT) (envelope-from rivers@dignus.com) Received: from dignus.com (ponds.vnet.net [166.82.177.48]) by smtp2.vnet.net (8.9.1a/8.9.1) with ESMTP id NAA29196 for ; Fri, 18 Jun 1999 13:48:06 -0400 (EDT) Received: from lakes.dignus.com (lakes.dignus.com [10.0.0.3]) by dignus.com (8.9.2/8.8.5) with ESMTP id NAA06888 for ; Fri, 18 Jun 1999 13:47:26 -0400 (EDT) Received: (from rivers@localhost) by lakes.dignus.com (8.9.2/8.6.9) id NAA83933; Fri, 18 Jun 1999 13:47:26 -0400 (EDT) Date: Fri, 18 Jun 1999 13:47:26 -0400 (EDT) From: Thomas David Rivers Message-Id: <199906181747.NAA83933@lakes.dignus.com> To: freebsd-mobile@freebsd.org, rivers@lakes.dignus.com Subject: Fix to readcis.c for "bad" cards (EP-210 is such a card.) Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org My particular EP-210 card has a bad "Version 1 info" tuple. From the cis dump: Tuple #9, code = 0x15 (Version 1 info), length = 27 000: 04 01 45 50 2d 32 31 30 20 50 43 4d 43 49 41 20 010: 4c 41 4e 20 43 41 52 44 2e 00 ff Version = 4.1, Manuf = [EP-210 PCMCIA LAN CARD.] Wrong length for version-1 info tuple In this case, readcis() leaves trash in the "vers" field of the tuple... making it almost impossible to match a card description in the data base. (Sometimes it's NULL, sometimes it's just left-over trash.) I thought it might be better to have a "?" instead of random trash, which lets my EP-210 card work reliably. (All of the code in pccardd assumes that the `vers' field of a tuple is a valid string.) (By the way, is there an "official" place for posting pccard bugs/fixes?) Here's the change to the 3.2-PAO release, /usr/src/PAO3/usr.sbin/pccard/pccardd/readcis.c: *** readcis.c.ori Fri Jun 18 10:44:30 1999 --- readcis.c Fri Jun 18 12:39:21 1999 *************** *** 203,208 **** --- 203,210 ---- if (len > 1 && *p != 0xff) { cp->vers = strdup(p); while (*p++ && --len > 0); + } else { + cp->vers = strdup("?"); } if (cp->add_info1) { free(cp->add_info1); If this is integrated into the next PAO release, will someone please let me know. That way, I can be assured my card will be recognized for my install of subsequent versions of FreeBSD. - Thanks - - Dave Rivers - p.s. I'm not on the freebsd-mobile list... please send e-mail directly. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message