Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Sep 2007 10:34:21 +0900
From:      Weongyo Jeong <weongyo.jeong@gmail.com>
To:        Ted Lindgreen <ted@tednet.nl>
Cc:        freebsd-current@freebsd.org
Subject:   Re: New if_zyd driver
Message-ID:  <20070906013421.GC2809@freebsd.weongyo.org>
In-Reply-To: <200708301414.l7UEEMSi004166@omval.tednet.nl>
References:  <200708301414.l7UEEMSi004166@omval.tednet.nl>

next in thread | previous in thread | raw e-mail | index | archive | help

--cvVnyQ+4j833TQvp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Thu, Aug 30, 2007 at 04:14:22PM +0200, Ted Lindgreen wrote:
> Hi,
> 
> I'd like to report success with new zyd driver, and to thank the
> author for his work.
> 
> I had tried the diff that was published previously. With ifconfig,
> the device associated with the access-point, but no traffic was
> possible. With the files now included in CVS, the device works!
> 
> However, the stick needs to be inserted after booting up. Then I can
> also remove the stick without ill effects (for logmessages see below).
> 
> When the stick is present during boot, the log shows:
>  Aug 30 15:25:17 lapje kernel: zyd0: <ZyDAS USB2.0 WLAN, class 255/255, rev 2.00/48.10, addr 2> on uhub4
>  Aug 30 15:25:17 lapje kernel: zyd0: setting config no failed
> and there are 2 problems:
> 1. "ifconfig -a" shows no zyd0 device.
> 2. when the stick is removed, the laptop panics (page fault)

This panic is caused by a zyd driver bug and would be fixed by a patch
that just prevents a panic.  The patch is attached with this email.

After testing why the stick can't be initialized during booting up, I
can see that this condition only appears when I reboot my FreeBSD, not
power on.  It was loaded successfully whenever I power on.   I think
this problem is caused by the problem of the usb stick hardware reset
and take some time to fix though I am looking at the code.

Thank you for your feedback!

Best Regards,
Weongyo Jeong

--cvVnyQ+4j833TQvp
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="zyd_patch_2ted_20070905.diff"

Index: if_zyd.c
===================================================================
RCS file: /data/zyd/zyd/if_zyd.c,v
retrieving revision 1.24
diff -u -r1.24 if_zyd.c
--- if_zyd.c	5 Sep 2007 02:20:11 -0000	1.24
+++ if_zyd.c	5 Sep 2007 02:21:37 -0000
@@ -307,7 +307,10 @@
 
 	STAILQ_INIT(&sc->sc_rqh);
 
-	zyd_attachhook(sc);
+	if (zyd_attachhook(sc) != 0) {
+		if_free(ifp);
+		return ENXIO;
+	}
 
 	return 0;
 }

--cvVnyQ+4j833TQvp--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070906013421.GC2809>