Subject: Re: zyd(4)
To: None <chuq@chuq.com>
From: KIYOHARA Takashi <kiyohara@kk.iij4u.or.jp>
List: current-users
Date: 06/11/2007 00:47:45
Hi! chuq,


From: Chuck Silvers <chuq@chuq.com>
Date: Sat, 9 Jun 2007 15:43:42 -0700

> I tried this (the version you checked in) but didn't have much luck:
> 
> # ifconfig zyd0 up
> zyd0: HMAC ZD1211, FW 46.05, RF AL2230, PA 0, address 00:02:72:4e:fe:29
> zyd0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
> zyd0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
> zyd0: xfer too short (length=28)
> zyd0: frame too short (length=11)
> zyd0: xfer too short (length=8)
> zyd0: xfer too short (length=8)

  snip

> zyd0: xfer too short (length=8)
> zyd0: xfer too short (length=8)
> zyd0: xfer too short (length=8)
> zyd0: xfer too short (length=8)
> # ifconfig zyd0 down
> usbd_free_xfer: timout_handle pendingpanic: free 2: inuse 0, probable double free
> Stopped in pid 6.1 (usbtask-dr) at      netbsd:cpu_Debugger+0x4:        popl    
> %
> ebp
> db{1}> t
> cpu_Debugger(c0a10f9f,cdd32ae8,cdd32adc,c04a5353,c0a91934) at netbsd:cpu_Debugger+0x4
> panic(c0a43340,c1c65800,0,0,c0a0afe5) at netbsd:panic+0x155
> free(c1c65400,c0a86360,cdd32b6c,c012ad30,c1c65400) at netbsd:free+0x2b6
> node_free(c1c65400,19e69e5,cdd32b7c,c04a5e85,c0a91934) at netbsd:node_free+0x56
> _ieee80211_free_node(879,19e69e5,cdd32bac,c04a55b7,c0b3e2b8) at netbsd:_ieee80211_free_node+0x108
> ieee80211_free_allnodes_locked(7,0,0,c04f5bc1,0) at netbsd:ieee80211_free_allnodes_locked+0x61
> ieee80211_node_table_reset(c1c5c8e4,c0b3d0e0,c19d10fc,0,0) at netbsd:ieee80211_node_table_reset+0x3c
> ieee80211_reset_bss(c1c5c248,c1c7d400,a0,8,cd4211a0) at netbsd:ieee80211_reset_bss+0x19
> ieee80211_newstate(c1c5c248,0,ffffffff,0,c0a0af19) at netbsd:ieee80211_newstate+0x1f5
> zyd_task(c1c5c000,0,c0a0af19,0,0) at netbsd:zyd_task+0x11c
> usb_task_thread(c0b16694,0,c01002d2,fbff,c01002d2) at netbsd:usb_task_thread+0x69

Ooops.  X-<
I will try to fix this problem.  Do you have information in another?
For instance, are you occurred again at panic?  I cannot it.  ;-<


> on amd64, I just get:
> 
> zyd0: could not load firmware (error=5)

hmm...
To tell the truth, note PC of my amd64 was happen.  Because status of
EHCI asserted EHCI_QTD_HALTED.
Can you correct it as follows?


Index: if_zyd.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/if_zyd.c,v
retrieving revision 1.1
diff -u -r1.1 if_zyd.c
--- if_zyd.c    9 Jun 2007 11:20:55 -0000       1.1
+++ if_zyd.c    10 Jun 2007 15:21:16 -0000
@@ -2561,7 +2561,11 @@
 
        addr = ZYD_FIRMWARE_START_ADDR;
        while (size > 0) {
+#if 0
                const int mlen = min(size, 4096);
+#else
+               const int mlen = min(size, 64);
+#endif
 
                DPRINTF(("loading firmware block: len=%d, addr=0x%x\n", mlen,
                    addr));


After,
  1. Insert zyd device		<-- 1 and 2 not reorder.
  2. reboot
  3. ifconfig(8) up
--
kiyohara