From nobody@FreeBSD.org  Thu Jan 29 22:51:34 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 6F44116A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 29 Jan 2004 22:51:34 -0800 (PST)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 4441043D3F
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 29 Jan 2004 22:51:33 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.10/8.12.10) with ESMTP id i0U6pWdL070190
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 29 Jan 2004 22:51:32 -0800 (PST)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.10/8.12.10/Submit) id i0U6pWLA070187;
	Thu, 29 Jan 2004 22:51:32 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200401300651.i0U6pWLA070187@www.freebsd.org>
Date: Thu, 29 Jan 2004 22:51:32 -0800 (PST)
From: Hiroki Mori <hiroki.mori@jcom.home.ne.jp>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Bad CISTPL_VERS_1 and clash on notebook.
X-Send-Pr-Version: www-2.0

>Number:         62098
>Category:       kern
>Synopsis:       [pccard] [patch] Bad CISTPL_VERS_1 and clash on notebook.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 29 23:00:37 PST 2004
>Closed-Date:    Tue Aug 26 23:06:01 MDT 2008
>Last-Modified:  Tue Aug 26 23:06:01 MDT 2008
>Originator:     Hiroki Mori
>Release:        5.2-CURRENT
>Organization:
>Environment:
FreeBSD c1.hogehoge.co.jp 5.2-CURRENT FreeBSD 5.2-CURRENT #40: Fri Jan 30 11:20:12 JST 2004     root@c1.hogehoge.co.jp:/usr/src/sys/i386/compile/GENERIC  i386

>Description:
TDK Compact Flash card 16M(TCO16H) has as follow CIS entory. If I insert this FreeBSD Box then happen panic.

CISTPL_VERS_1
15 0b 04 01 54 44 4b 20 54 43 5f 48 ff

This CIS entory has bug. But I hope FreeBSD don't clash on this problem.
>How-To-Repeat:
Insert TDK Compact Flash card 16M(TCO16H) to FreeBSD BOX.
>Fix:
*** pccard.c.org	Fri Nov  7 12:19:48 2003
--- pccard.c	Fri Jan 30 11:18:49 2004
***************
*** 154,162 ****
  	const char *vendorstr, *prodstr;
  	char *str;
  
! 	if (pccard_get_vendor_str(dev, &vendorstr))
  		return (0);
! 	if (pccard_get_product_str(dev, &prodstr))
  		return (0);
  	str = malloc(strlen(vendorstr) + strlen(prodstr) + 2, M_DEVBUF,
  	    M_WAITOK);
--- 154,164 ----
  	const char *vendorstr, *prodstr;
  	char *str;
  
! 	pccard_get_vendor_str(dev, &vendorstr);
! 	if (vendorstr == NULL)
  		return (0);
! 	pccard_get_product_str(dev, &prodstr);
! 	if (prodstr == NULL)
  		return (0);
  	str = malloc(strlen(vendorstr) + strlen(prodstr) + 2, M_DEVBUF,
  	    M_WAITOK);
***************
*** 340,348 ****
  		return (NULL);
  	if (pccard_get_function_number(dev, &fcn))
  		return (NULL);
! 	if (pccard_get_vendor_str(dev, &vendorstr))
  		return (NULL);
! 	if (pccard_get_product_str(dev, &prodstr))
  		return (NULL);
  	for (ent = tab; ent->pp_vendor != 0; ent =
  	    (const struct pccard_product *) ((const char *) ent + ent_size)) {
--- 342,352 ----
  		return (NULL);
  	if (pccard_get_function_number(dev, &fcn))
  		return (NULL);
! 	pccard_get_vendor_str(dev, &vendorstr);
! 	if (vendorstr == NULL)
  		return (NULL);
! 	pccard_get_product_str(dev, &prodstr);
! 	if (prodstr == NULL)
  		return (NULL);
  	for (ent = tab; ent->pp_vendor != 0; ent =
  	    (const struct pccard_product *) ((const char *) ent + ent_size)) {

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: imp 
State-Changed-When: Tue Aug 26 23:05:23 MDT 2008 
State-Changed-Why:  
I believe that this has already been fixed... 


http://www.freebsd.org/cgi/query-pr.cgi?pr=62098 
>Unformatted:
