kern/85493: OLDCARD can't probe ed driver

Keiji Wada keiji at hiemalis.org
Tue Aug 30 18:25:32 GMT 2005


>Number:         85493
>Category:       kern
>Synopsis:       OLDCARD can't probe ed driver
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 30 18:20:00 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Keiji Wada
>Release:        RELENG_5
>Organization:
wada
>Environment:
FreeBSD spinach.net2.jp 5.4-STABLE FreeBSD 5.4-STABLE #0: Mon Jul 18 17:53:57 JST 2005     keiji at spinach.net2.jp:/home/spinach/keiji/ftp/HARD/yacxm/sys/i386/compile/SPINACH  i386

>Description:
OLDCARD can't probe ed driver. pccardd recognize PCMCIA card with OLDCARD. But ed_pccard_probe use NEWCARD.
>How-To-Repeat:
The old machine with OLDCARD can't probe ed.
>Fix:
--- if_ed_pccard.c.1.59.2.3	Tue Aug 30 22:58:42 2005
+++ if_ed_pccard.c	Wed Aug 31 02:48:09 2005
@@ -216,27 +216,28 @@
 static int
 ed_pccard_probe(device_t dev)
 {
-	const struct ed_product *pp;
 	int	error;
+	int	flags = device_get_flags(dev);
 
-	if ((pp = (const struct ed_product *) pccard_product_lookup(dev, 
-	    (const struct pccard_product *) ed_pccard_products,
-	    sizeof(ed_pccard_products[0]), NULL)) == NULL)
-		return (ENXIO);
-	if (pp->flags & NE2000DVF_DL10019) {
-		error = ed_probe_Novell(dev, 0, 0);
-		if (error == 0)
-			error = ed_pccard_Linksys(dev);
-		ed_release_resources(dev);
-		if (error == 0)
-			goto end2;
-	}
-	if (pp->flags & NE2000DVF_AX88190) {
+	if (ED_FLAGS_GETTYPE(flags) == ED_FLAGS_AX88190) {
 		error = ed_pccard_ax88190(dev);
-		if (error == 0)
-			goto end2;
+		goto end2;
 	}
-	error = ed_probe_Novell(dev, 0, 0);
+
+	error = ed_probe_Novell(dev, 0, flags);
+	if (error == 0)
+		goto end;
+	ed_release_resources(dev);
+
+	error = ed_probe_WD80x3(dev, 0, flags);
+	if (error == 0)
+		goto end;
+	ed_release_resources(dev);
+	goto end2;
+
+end:
+	if (ED_FLAGS_GETTYPE(flags) & ED_FLAGS_LINKSYS)
+		ed_pccard_Linksys(dev);
 end2:
 	if (error == 0)
 		error = ed_alloc_irq(dev, 0, 0);

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list