From nobody@FreeBSD.org  Sat Jan 12 09:33:52 2002
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 1D8BE37B417
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 12 Jan 2002 09:32:32 -0800 (PST)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.6/8.11.6) id g0CHWWQ88296;
	Sat, 12 Jan 2002 09:32:32 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200201121732.g0CHWWQ88296@freefall.freebsd.org>
Date: Sat, 12 Jan 2002 09:32:32 -0800 (PST)
From: Nobuyoshi Sato <jju@ds.cs.toyo.ac.jp>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Some pccard.conf entries does not work after pccardd's CIS string comparison fix.
X-Send-Pr-Version: www-1.0

>Number:         33815
>Category:       conf
>Synopsis:       Some pccard.conf entries does not work after pccardd's CIS string comparison fix.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 12 09:40:01 PST 2002
>Closed-Date:    Tue Jan 29 13:17:30 PST 2002
>Last-Modified:  Sat Feb 23 08:50:01 PST 2002
>Originator:     Nobuyoshi Sato
>Release:        FreeBSD 5.0-CURRENT-20011230-JPSNAP i386
>Organization:
Toyo University
>Environment:
FreeBSD skuld.ds.cs.toyo.ac.jp 5.0-CURRENT-20011230-JPSNAP FreeBSD 5.0-CURRENT-20011230-JPSNAP #1: Wed Jan 2 06:18:30 JST 2002 root@skuld.ds.cs.toyo.ac.jp:/usr/src/sys/i386/compile/SKULD i386
>Description:
By commit of usr.sbin/pccard/pccardd/cardd.c at Nov 29 (Dec
10 in -STABLE), pccardd's string comparison between
pccard.conf's entry and PC card's CIS tupple became strict
matching.

As influences of this commit, some PC cards don't work since
some /etc/default/pccard.conf's card identifiers entries are
incorrectly described.

For example, in my IO DATA's CBIDE2 has following CIS tupple
(an extract):
Tuple #2, code = 0x15 (Version 1 info), length = 24
    000:  04 01 49 4f 20 44 41 54 41 00 43 42 49 44 45 32
    010:  20 20 20 20 20 20 00 ff
        Version = 4.1, Manuf = [IO DATA], card vers = [CBIDE2      ]

CBIDE2 matched following pccard.conf entry:
# IO DATA CBIDE2 in 16 bit mode
# (bundled with IO DATA CDP-AX24T, Panasonic DVD-ROM LK-RV8171D)
card "IO DATA" "CBIDE2"
        config  default "ata" ?

And ata driver was attached successfully. However, now,
no entries matches with "CBIDE2      ", and it doesn't work.

Other card, Lexar Media's CF card ("CL ATA FLASH CARD LEXAR"
"TIDALWV") dose't work now.

>How-To-Repeat:
Simpley insert IO DATA's CBIDE2 and/or Lexar Media's CF Card
into the PC card slot.

Other cards may occur this problem.

>Fix:
Fix /etc/defaults/pccard.conf's PC card entries as following:
--- pccard.conf.orig    Sun Dec 30 03:10:56 2001
+++ pccard.conf Mon Jan  7 03:49:53 2002
@@ -109,7 +109,7 @@
        logstr  "MCD-601p"

 # Lexar Media compact flash
-card "CL ATA FLASH CARD LEXAR " "TIDALWV"
+card "CL ATA FLASH CARD LEXAR  " "TIDALWV"
 #   auto does not work
        config 0x1 "ata" ?

@@ -181,7 +181,7 @@

 # IO DATA CBIDE2 in 16 bit mode
 # (bundled with IO DATA CDP-AX24T, Panasonic DVD-ROM LK-RV8171D)
-card "IO DATA" "CBIDE2"
+card "IO DATA" "CBIDE2      "
        config  default "ata" ?

 # IO Data PCIDE-II (bundled with CDP-TX6, etc.)

Note that some other card(s) may occur this problem is its
pccard.conf entry differs from its CIS tupple.


>Release-Note:
>Audit-Trail:

From: Yoshihiko Sarumaru <mistral@imasy.or.jp>
To: freebsd-gnats-submit@FreeBSD.org, jju@ds.cs.toyo.ac.jp
Cc: iwasaki@FreeBSD.org
Subject: Re: conf/33815: Some pccard.conf entries does not work after pccardd's 
	CIS string comparison fix.
Date: Sat, 19 Jan 2002 23:47:57 +0900

 # I cc'ed this to iwasaki-san, because I he commited last change to cardd.c,
 # and I think he may responsible for this issue.
 
 There is more cards effected by this change to cardd.c.
 
 I collected CIS tuple from http://www.linkclub.or.jp/~clover/cis/, and
 pick up cards that trailing spaces in their Manuf or "card vers*".*
 
 Then I found more two may be sacrificed cards (I don't have those cards!).
 
 I don't believe that these 4 cards are the only victime cards. Should we
 ignore
 the trailing spaces?
 
 --- /usr/src/etc/defaults/pccard.conf Fri Dec 28 17:46:35 2001
 +++ pccard.conf Sat Jan 19 23:15:54 2002
 @@ -111,7 +111,7 @@
 logstr "MCD-601p"
 
 # Lexar Media compact flash
 -card "CL ATA FLASH CARD LEXAR " "TIDALWV"
 +card "CL ATA FLASH CARD LEXAR " "TIDALWV"
 # auto does not work
 config 0x1 "ata" ?
 
 @@ -183,7 +183,7 @@
 
 # IO DATA CBIDE2 in 16 bit mode
 # (bundled with IO DATA CDP-AX24T, Panasonic DVD-ROM LK-RV8171D)
 -card "IO DATA" "CBIDE2"
 +card "IO DATA" "CBIDE2 "
 config default "ata" ?
 
 # IO Data PCIDE-II (bundled with CDP-TX6, etc.)
 @@ -199,7 +199,7 @@
 config default "ata" ?
 
 # TOSHIBA Portable 24X Speed CD-ROM Drive PA2673UJ
 -card "LOOKMEET" "CBIDE2"
 +card "LOOKMEET" "CBIDE2 "
 config default "ata" ?
 
 # Maxtor ATA HDD
 @@ -1232,7 +1232,7 @@
 config auto "nsp" ?
 
 # Hewlett Packard M820e (CD-writer)
 -card "KME" "SCSI-CARD-001"
 +card "KME " "SCSI-CARD-001"
 config auto "nsp" ?
 
 # WORKBIT Ninja SCSI series
 
 

From: mistral@imasy.or.jp (Yoshihiko SARUMARU)
To: freebsd-gnats-submit@FreeBSD.org, jju@ds.cs.toyo.ac.jp
Cc: iwasaki@FreeBSD.org
Subject: Re: conf/33815: Some pccard.conf entries does not work after pccardd's
	 CIS string comparison fix.
Date: Sat, 19 Jan 2002 23:57:21 +0900

 Sorry, Mozilla get together spaces into one space :-(
 
 
 mistral% diff /usr/src/etc/defaults/pccard.conf pccard.conf
 114c114
 < card "CL ATA FLASH CARD LEXAR " "TIDALWV"
 ---
 > card "CL ATA FLASH CARD LEXAR  " "TIDALWV"
 186c186
 < card "IO DATA" "CBIDE2"
 ---
 > card "IO DATA" "CBIDE2      "
 202c202
 < card "LOOKMEET" "CBIDE2"
 ---
 > card "LOOKMEET" "CBIDE2      "
 1235c1235
 < card "KME" "SCSI-CARD-001"
 ---
 > card "KME    " "SCSI-CARD-001"
State-Changed-From-To: open->closed 
State-Changed-By: sanpei 
State-Changed-When: Tue Jan 29 13:17:30 PST 2002 
State-Changed-Why:  
Rev. 1.230	src/etc/defaults/pccard.conf  


http://www.FreeBSD.org/cgi/query-pr.cgi?pr=33815 

From: Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org>
To: mistral@imasy.or.jp
Cc: freebsd-gnats-submit@FreeBSD.org, jju@ds.cs.toyo.ac.jp,
	iwasaki@FreeBSD.org
Subject: Re: conf/33815: Some pccard.conf entries does not work after
 pccardd's CIS string comparison fix.
Date: Sun, 24 Feb 2002 01:42:16 +0900 (JST)

 I believe I've made better changes in  1.231 ->  1.232.
 Please let me know if the changes cause any problems.
 
 Thanks
 
 > mistral% diff /usr/src/etc/defaults/pccard.conf pccard.conf
 > 114c114
 > < card "CL ATA FLASH CARD LEXAR " "TIDALWV"
 > ---
 > > card "CL ATA FLASH CARD LEXAR  " "TIDALWV"
 > 186c186
 > < card "IO DATA" "CBIDE2"
 > ---
 > > card "IO DATA" "CBIDE2      "
 > 202c202
 > < card "LOOKMEET" "CBIDE2"
 > ---
 > > card "LOOKMEET" "CBIDE2      "
 > 1235c1235
 > < card "KME" "SCSI-CARD-001"
 > ---
 > > card "KME    " "SCSI-CARD-001"
>Unformatted:
