From root@scotts-laptop.dcs.qmw.ac.uk Thu Mar 11 09:19:00 1999
Return-Path: <root@scotts-laptop.dcs.qmw.ac.uk>
Received: from scotts-laptop.dcs.qmw.ac.uk (scotts-laptop.dcs.qmw.ac.uk [138.37.89.8])
	by hub.freebsd.org (Postfix) with ESMTP id 731EC150DC
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 11 Mar 1999 09:18:06 -0800 (PST)
	(envelope-from root@scotts-laptop.dcs.qmw.ac.uk)
Received: (from root@localhost)
	by scotts-laptop.dcs.qmw.ac.uk (8.9.1/8.8.8) id RAA00740;
	Thu, 11 Mar 1999 17:18:30 GMT
	(envelope-from root)
Message-Id: <199903111718.RAA00740@scotts-laptop.dcs.qmw.ac.uk>
Date: Thu, 11 Mar 1999 17:18:30 GMT
From: scott@dcs.qmw.ac.uk
Sender: root@scotts-laptop.dcs.qmw.ac.uk
Reply-To: scott@dcs.qmw.ac.uk
To: FreeBSD-gnats-submit@freebsd.org
Subject: Intel Pro/100 PC card has CIS string > CIS_MAXSTR
X-Send-Pr-Version: 3.2

>Number:         10546
>Category:       bin
>Synopsis:       Intel Pro/100 PC card has CIS string > CIS_MAXSTR
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    imp
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 11 09:20:01 PST 1999
>Closed-Date:    Sun Jan 16 02:28:31 MST 2000
>Last-Modified:  Sun Jan 16 02:28:45 MST 2000
>Originator:     Scott Mitchell
>Release:        FreeBSD 3.0-RELEASE i386
>Organization:
Queen Mary & Westfield College
>Environment:

Any machine with PCCARD support enabled.

>Description:

CIS_MAXSTR is defined as 30 in /usr/src/usr.sbin/pccard/pccardd/readcis.h.
Certain PCMCIA cards (eg. The Intel EtherExpress Pro Mobile 10/100) contain
strings in their CIS tuples that are longer than 30 characters.  In the case
of the Intel there's a 48 byte string, other cards may have longer strings.

>How-To-Repeat:

Run pccardd, insert a PC card with a CIS string longer than 30 characters.

>Fix:

Bump the value of CIS_MAXSTR upwards.  The maximum possible amount of data in
a CIS tuple is 254 bytes, so this should be enough to cover anything...
	
The following patch does the necessary:

*** readcis.h.orig	Tue Sep 23 20:51:32 1997
--- readcis.h	Thu Mar 11 16:52:49 1999
***************
*** 26,32 ****
   * $Id: readcis.h,v 1.9 1997/09/23 19:51:32 nate Exp $
   */
  
! #define	CIS_MAXSTR	30
  struct tuple {
  	struct tuple *next;
  	unsigned char code;
--- 26,32 ----
   * $Id: readcis.h,v 1.9 1997/09/23 19:51:32 nate Exp $
   */
  
! #define	CIS_MAXSTR	254
  struct tuple {
  	struct tuple *next;
  	unsigned char code;



>Release-Note:
>Audit-Trail:

From: Nick Hilliard <nick@iol.ie>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: bin/10546: Intel Pro/100 PC card has CIS string > CIS_MAXSTR
Date: Sun, 5 Dec 1999 16:39:59 +0000 (GMT)

 > CIS_MAXSTR is defined as 30 in /usr/src/usr.sbin/pccard/pccardd/readcis.h.
 > Certain PCMCIA cards (eg. The Intel EtherExpress Pro Mobile 10/100) contain
 > strings in their CIS tuples that are longer than 30 characters.  In the case
 > of the Intel there's a 48 byte string, other cards may have longer strings.
 
 Is there any chance that this fix can be committed before the release of
 FreeBSD 3.4?  The source code indicates that there won't be any unexpected
 side-effects as a result of this change.  However, because it hasn't been
 done yet, it's causing a number of common PCMCIA cards not to be recognised
 by pccardd, including the Intel EtherExpress Pro one that Scott mentioned
 and most of the recent Xircom ethernet/modem cards.  In order to get these
 cards to work at all, it's necessary to recompile pccardd with the increased
 CIS_MAXSTR.  This is a Bad Thing.
 
 Nick
 
Responsible-Changed-From-To: freebsd-bugs->imp 
Responsible-Changed-By: imp 
Responsible-Changed-When: Tue Dec 7 12:28:19 MST 1999 
Responsible-Changed-Why:  
I'll fix this 
State-Changed-From-To: open->closed 
State-Changed-By: imp 
State-Changed-When: Sun Jan 16 02:28:31 MST 2000 
State-Changed-Why:  
I've fixed this 
>Unformatted:
