Hi Jussi,

Thank you for your help :)

I applied the patch to compat-wireless-2011-04-22 and can confirm that everything is working perfectly.

see dmesg (zd1211rw debug on):

[ 6171.801385] zd1211rw usb_init()
[ 6171.801595] usb 3-2: print_id() 07b8:6001 v4330 full
[ 6171.958038] usb 3-2: reset full speed USB device using ohci_hcd and address 2
[ 6172.137333] zd1211rw 3-2:1.0: zd_chip_read_mac_addr_fw() 
[ 6172.147236] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[ 6172.149568] zd1211rw 3-2:1.0: probe() successful
[ 6172.149578] zd1211rw 3-2:1.0: phy1
[ 6172.150844] usbcore: registered new interface driver zd1211rw
[ 6172.150979] zd1211rw initialized
[ 6172.448820] zd1211rw 3-2:1.0: zd_usb_init_hw() 
[ 6172.448833] usb 3-2: request_fw_file() fw name zd1211/zd1211_ub
[ 6172.455339] usb 3-2: upload_firmware() firmware device id 0x4330 is equal to the actual device id
[ 6172.455350] usb 3-2: request_fw_file() fw name zd1211/zd1211_uphr
[ 6172.465214] usb 3-2: upload_code() transfer size 4096
[ 6172.477253] usb 3-2: upload_code() transfer size 1024
[ 6172.485238] usb 3-2: upload_code() firmware confirm return value 0x01
[ 6172.488255] zd1211rw 3-2:1.0: zd_usb_enable_int() 
[ 6172.488270] zd1211rw 3-2:1.0: zd_usb_enable_int() submit urb c6eae000
[ 6172.488289] zd1211rw 3-2:1.0: zd_chip_init_hw() 
[ 6172.492247] zd1211rw 3-2:1.0: dump_cr() CR_AFTER_PNP 0x00000000
[ 6172.495246] zd1211rw 3-2:1.0: dump_cr() CR_GPI_EN 0x00000000
[ 6172.498246] zd1211rw 3-2:1.0: dump_cr() CR_INTERRUPT 0x00000000
[ 6172.504237] zd1211rw 3-2:1.0: read_fw_regs_offset() fw_regs_base: 0xf7d4
[ 6172.519235] zd1211rw 3-2:1.0: read_pod() E2P_POD 0x00000104
[ 6172.519248] zd1211rw 3-2:1.0: read_pod() RF AL2230_RF 0x4 PA type 0x0 patch CCK 1 patch CR157 0 patch 6M 0 new PHY 0 link LED2 tx led 1
[ 6172.519257] zd1211rw 3-2:1.0: hw_init() 
[ 6172.519262] zd1211rw 3-2:1.0: zd1211_hw_reset_phy() 
[ 6172.537228] zd1211rw 3-2:1.0: zd1211_hw_init_hmac() 
[ 6172.558230] zd1211rw 3-2:1.0: zd_usb_rfwrite() value 0x003f790 bits 24
[ 6172.564228] zd1211rw 3-2:1.0: zd_usb_rfwrite() value 0x0033331 bits 24
[ 6172.570227] zd1211rw 3-2:1.0: zd_usb_rfwrite() value 0x000000d bits 24
[ 6172.576226] zd1211rw 3-2:1.0: zd_usb_rfwrite() value 0x00b3331 bits 24
[ 6172.582225] zd1211rw 3-2:1.0: zd_usb_rfwrite() value 0x003b812 bits 24
[ 6172.588224] zd1211rw 3-2:1.0: zd_usb_rfwrite() value 0x000fff3 bits 24
[ 6172.594225] zd1211rw 3-2:1.0: zd_usb_rfwrite() value 0x00005a4 bits 24
[ 6172.600224] zd1211rw 3-2:1.0: zd_usb_rfwrite() value 0x0000da4 bits 24
[ 6172.606222] zd1211rw 3-2:1.0: zd_usb_rfwrite() value 0x00f4dc5 bits 24
[ 6172.612221] zd1211rw 3-2:1.0: zd_usb_rfwrite() value 0x00805b6 bits 24
[ 6172.618221] zd1211rw 3-2:1.0: zd_usb_rfwrite() value 0x0011687 bits 24
[ 6172.624220] zd1211rw 3-2:1.0: zd_usb_rfwrite() value 0x0000688 bits 24
[ 6172.630219] zd1211rw 3-2:1.0: zd_usb_rfwrite() value 0x00403b9 bits 24
[ 6172.636218] zd1211rw 3-2:1.0: zd_usb_rfwrite() value 0x000dbba bits 24
[ 6172.642217] zd1211rw 3-2:1.0: zd_usb_rfwrite() value 0x000099b bits 24
[ 6172.648216] zd1211rw 3-2:1.0: zd_usb_rfwrite() value 0x00bdffc bits 24
[ 6172.654214] zd1211rw 3-2:1.0: zd_usb_rfwrite() value 0x000000d bits 24
[ 6172.660214] zd1211rw 3-2:1.0: zd_usb_rfwrite() value 0x000500f bits 24
[ 6172.669210] zd1211rw 3-2:1.0: zd_usb_rfwrite() value 0x000d00f bits 24
[ 6172.675212] zd1211rw 3-2:1.0: zd_usb_rfwrite() value 0x0004c0f bits 24
[ 6172.681211] zd1211rw 3-2:1.0: zd_usb_rfwrite() value 0x000540f bits 24
[ 6172.687210] zd1211rw 3-2:1.0: zd_usb_rfwrite() value 0x000700f bits 24
[ 6172.693209] zd1211rw 3-2:1.0: zd_usb_rfwrite() value 0x000500f bits 24
[ 6172.709206] zd1211rw 3-2:1.0: firmware version 4605
[ 6172.712218] zd1211rw 3-2:1.0: dump_fw_registers() FW_FIRMWARE_VER 0x4605
[ 6172.712229] zd1211rw 3-2:1.0: dump_fw_registers() FW_USB_SPEED 0x0000
[ 6172.712235] zd1211rw 3-2:1.0: dump_fw_registers() FW_FIX_TX_RATE 0x0000
[ 6172.712241] zd1211rw 3-2:1.0: dump_fw_registers() FW_LINK_STATUS 0x0000
[ 6172.715216] zd1211rw 3-2:1.0: dump_cr() CR_AFTER_PNP 0x00000001
[ 6172.718217] zd1211rw 3-2:1.0: dump_cr() CR_GPI_EN 0x00000000
[ 6172.721216] zd1211rw 3-2:1.0: dump_cr() CR_INTERRUPT 0x00000000
[ 6172.781206] zd1211rw 3-2:1.0: zd1211 chip 07b8:6001 v4330 full 00-12-0e AL2230_RF pa0 g----
[ 6172.784211] zd1211rw 3-2:1.0: zd_read_regdomain() regdomain: 0x30
[ 6172.786234] cfg80211: Calling CRDA for country: DE
[ 6172.788190] usb 3-2: int_urb_complete() urb c6eae000 error -2
[ 6172.788228] zd1211rw 3-2:1.0: zd_usb_disable_int() urb c6eae000 killed
[ 6172.788242] zd1211rw 3-2:1.0: zd_usb_enable_int() 
[ 6172.788253] zd1211rw 3-2:1.0: zd_usb_enable_int() submit urb c6eae000
[ 6172.813870] cfg80211: Current regulatory domain intersected:
[ 6172.814069] cfg80211:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 6172.814347] cfg80211:     (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ 6172.814589] cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ 6172.814827] cfg80211:     (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ 6172.817213] zd1211rw 3-2:1.0: __zd_usb_enable_rx() 
[ 6172.817300] zd1211rw 3-2:1.0: zd_tx_watchdog_enable() 
[ 6172.820213] zd1211rw 3-2:1.0: housekeeping_enable() 
[ 6172.820234] zd1211rw 3-2:1.0: beacon_enable() 
[ 6172.820251] zd1211rw 3-2:1.0: zd_write_mac_addr_common() mac addr 00:12:0e:xx:xx:xx
[ 6172.824195] zd1211rw 3-2:1.0: zd_op_bss_info_changed() changes: e
[ 6172.824206] zd1211rw 3-2:1.0: zd_chip_set_rts_cts_rate_locked() preamble=0
[ 6172.826226] zd1211rw 3-2:1.0: zd_op_bss_info_changed() changes: 4000
[ 6172.830190] zd1211rw 3-2:1.0: zd_rf_set_channel() channel: 1
[ 6172.830202] zd1211rw 3-2:1.0: zd_usb_rfwrite() value 0x003f790 bits 24
[ 6172.834189] zd1211rw 3-2:1.0: zd_usb_rfwrite() value 0x0033331 bits 24
[ 6172.838188] zd1211rw 3-2:1.0: zd_usb_rfwrite() value 0x000000d bits 24
[ 6172.848192] zd1211rw 3-2:1.0: patch_cck_gain() patching value 20
[ 6172.856310] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 6172.856859] zd1211rw 3-2:1.0: zd_op_prepare_multicast() mc addr 33:33:00:00:00:01
[ 6172.856871] zd1211rw 3-2:1.0: zd_op_prepare_multicast() mc addr 01:00:5e:00:00:01


A very interesting bug indeed. The only difference between using the UTP extension cable or not was the device being detected as ehci (2.0) or ohci (1.1), I guess a timing lag would cause the ehci detection to fail and fallback to ohci. Very interesting how the device presents itself differently using the two different protocols (ehci & ohci), from what I can see in your patch one mode is bulk transfer and the other interrupt, kind of a weird way of doing things.

Once again thank you for your very speedy help Jussi.

Kind regards,

Rohan M.



> Date: Sun, 29 May 2011 19:39:22 +0300
> From: jussi.kivilinna@mbnet.fi
> To: rohbags@hotmail.com; zd1211-devs@lists.sourceforge.net
> Subject: Re: [zd1211-devs] firmware timeout issues (error -110)
>
> Hello!
>
> This is interesting bug. The device actually presents itself
> differently to host depending if it's running either USB 1.1 or 2.0.
> As I tested zd1211rw AP-mode only on USB 2.0, result was that zd1211rw
> expected to always see device as it seen on USB 2.0. On OHCI-host this
> triggers error in ohci_hcd when driver tries to communicate to device
> (and correct error message appears only with zd1211rw debugging
> enabled).
>
> Patch attached fixes the problem.
>
> You can get patched compat-wireless tarball from:
>
> http://koti.mbnet.fi/axh/kernel/zd1211rw/compat-wireless-2011-05-28-zd1211rw_fix.tar.bz2
>
> -Jussi
>
> Quoting Jussi Kivilinna <jussi.kivilinna@mbnet.fi>:
>
> > Hi,
> >
> > I have reproduced the bug, happens only on ohci_hci (not ehci or
> > uchi). I'll start working on fix.
> >
> > -Jussi
> >
> > Quoting "Roh ." <rohbags@hotmail.com>:
> >
> >>
> >> Hi Devs,
> >> I hope someone can shed some light on why I am seeing these errors.
> >> When using the standard zd1211rw, mac802111 & cfg80211 drivers that
> >> come with fedora 14 (2.6.35.13-91) i am able to run my zd1211-based
> >> device perfectly without a glitch over a 10m UTP usb extension. I
> >> can even run airodump-ng for days on end without a glitch (of course
> >> no packet injection or signal level feedback).
> >> However when I try to use the compat-wireless-2011-05-26 or
> >> compat-wireless-2011-04-22 drivers I receive firmware timeout
> >> errors. Please see /var/log/message output below:
> >> Using stock Fedora 14 2.6.35.13-91 drivers: (works ok)
> >> May 29 17:14:28 rf kernel: [ 7296.240037] usb 2-2: new full speed
> >> USB device using ohci_hcd and address 5May 29 17:14:28 rf kernel: [
> >> 7296.417134] usb 2-2: not running at top speed; connect to a high
> >> speed hubMay 29 17:14:28 rf kernel: [ 7296.432140] usb 2-2: New USB
> >> device found, idVendor=07b8, idProduct=6001May 29 17:14:28 rf
> >> kernel: [ 7296.432213] usb 2-2: New USB device strings: Mfr=16,
> >> Product=32, SerialNumber=0May 29 17:14:28 rf kernel: [ 7296.432322]
> >> usb 2-2: Product: USB2.0 WLANMay 29 17:14:28 rf kernel: [
> >> 7296.432379] usb 2-2: Manufacturer: wug2670May 29 17:14:29 rf
> >> kernel: [ 7296.738492] cfg80211: Calling CRDA to update world
> >> regulatory domainMay 29 17:14:29 rf kernel: [ 7296.995070] usb 2-2:
> >> reset full speed USB device using ohci_hcd and address 5May 29
> >> 17:14:29 rf kernel: [ 7297.010274] cfg80211: World regulatory domain
> >> updated:May 29 17:14:29 rf kernel: [ 7297.010346] (start_freq -
> >> end_freq @ bandwidth), (max_antenna_gain, max_eirp)May 29 17:14:29
> >> rf kernel: [ 7297.010457] (2402000 KHz - 2472000 KHz @ 40000
> >> KHz), (300 mBi, 2000 mBm)May 29 17:14:29 rf kernel: [ 7297.010519]
> >> (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)May 29
> >> 17:14:29 rf kernel: [ 7297.010583] (2474000 KHz - 2494000 KHz @
> >> 20000 KHz), (300 mBi, 2000 mBm)May 29 17:14:29 rf kernel: [
> >> 7297.010646] (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi,
> >> 2000 mBm)May 29 17:14:29 rf kernel: [ 7297.010709] (5735000 KHz
> >> - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)May 29 17:14:29 rf
> >> kernel: [ 7297.235267] zd1211rw 2-2:1.0: phy0May 29 17:14:29 rf
> >> kernel: [ 7297.235405] usbcore: registered new interface driver
> >> zd1211rwMay 29 17:14:30 rf kernel: [ 7297.977792] cfg80211: Calling
> >> CRDA for country: AUMay 29 17:14:30 rf kernel: [ 7297.999546]
> >> cfg80211: Regulatory domain changed to country: AUMay 29 17:14:30 rf
> >> kernel: [ 7297.999619] (start_freq - end_freq @ bandwidth),
> >> (max_antenna_gain, max_eirp)May 29 17:14:30 rf kernel: [
> >> 7297.999727] (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000
> >> mBm)May 29 17:14:30 rf kernel: [ 7297.999789] (5170000 KHz -
> >> 5250000 KHz @ 40000 KHz), (300 mBi, 2300 mBm)May 29 17:14:30 rf
> >> kernel: [ 7297.999852] (5250000 KHz - 5330000 KHz @ 40000 KHz),
> >> (300 mBi, 2300 mBm)May 29 17:14:30 rf kernel: [ 7297.999914]
> >> (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)May 29
> >> 17:14:31 rf kernel: [ 7298.945539] zd1211rw 2-2:1.0: firmware
> >> version 4605May 29 17:14:31 rf kernel: [ 7299.005554] zd1211rw
> >> 2-2:1.0: zd1211 chip 07b8:6001 v4330 full 00-12-0e AL2230_RF pa0
> >> g----May 29 17:14:31 rf kernel: [ 7299.010584] cfg80211: Calling
> >> CRDA for country: DEMay 29 17:14:31 rf kernel: [ 7299.026125]
> >> cfg80211: Current regulatory domain intersected:May 29 17:14:31 rf
> >> kernel: [ 7299.026198] (start_freq - end_freq @ bandwidth),
> >> (max_antenna_gain, max_eirp)May 29 17:14:31 rf kernel: [
> >> 7299.026309] (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000
> >> mBm)May 29 17:14:31 rf kernel: [ 7299.026371] (5170000 KHz -
> >> 5250000 KHz @ 40000 KHz), (N/A, 2000 mBm)May 29 17:14:31 rf kernel:
> >> [ 7299.026431] (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A,
> >> 2000 mBm)May 29 17:14:31 rf kernel: [ 7299.071672]
> >> ADDRCONF(NETDEV_UP): wlan0: link is not ready
> >> Using compat-wireless-2011-04-22 (firmware upload fails):
> >> May 29 17:09:47 rf kernel: [ 7015.122044] usb 2-2: new full speed
> >> USB device using ohci_hcd and address 4May 29 17:09:47 rf kernel: [
> >> 7015.299130] usb 2-2: not running at top speed; connect to a high
> >> speed hubMay 29 17:09:47 rf kernel: [ 7015.314138] usb 2-2: New USB
> >> device found, idVendor=07b8, idProduct=6001May 29 17:09:47 rf
> >> kernel: [ 7015.314210] usb 2-2: New USB device strings: Mfr=16,
> >> Product=32, SerialNumber=0May 29 17:09:47 rf kernel: [ 7015.314317]
> >> usb 2-2: Product: USB2.0 WLANMay 29 17:09:47 rf kernel: [
> >> 7015.314374] usb 2-2: Manufacturer: wug2670May 29 17:09:48 rf
> >> kernel: [ 7015.784541] cfg80211: Calling CRDA to update world
> >> regulatory domainMay 29 17:09:48 rf kernel: [ 7016.323803] cfg80211:
> >> World regulatory domain updated:May 29 17:09:48 rf kernel: [
> >> 7016.323875] cfg80211: (start_freq - end_freq @ bandwidth),
> >> (max_antenna_gain, max_eirp)May 29 17:09:48 rf kernel: [
> >> 7016.323988] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz),
> >> (300 mBi, 2000 mBm)May 29 17:09:48 rf kernel: [ 7016.324155]
> >> cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi,
> >> 2000 mBm)May 29 17:09:48 rf kernel: [ 7016.324269] cfg80211:
> >> (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)May 29
> >> 17:09:48 rf kernel: [ 7016.324378] cfg80211: (5170000 KHz -
> >> 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)May 29 17:09:48 rf
> >> kernel: [ 7016.324487] cfg80211: (5735000 KHz - 5835000 KHz @
> >> 40000 KHz), (300 mBi, 2000 mBm)May 29 17:09:48 rf kernel: [
> >> 7016.425051] usb 2-2: reset full speed USB device using ohci_hcd and
> >> address 4May 29 17:09:48 rf kernel: [ 7016.609866] zd1211rw 2-2:1.0:
> >> phy0May 29 17:09:48 rf kernel: [ 7016.612213] usbcore: registered
> >> new interface driver zd1211rwMay 29 17:09:49 rf kernel: [
> >> 7017.026556] udev[8907]: renamed network interface wlan%d to
> >> wlan0May 29 17:09:49 rf kernel: [ 7017.498004] cfg80211: Calling
> >> CRDA for country: AUMay 29 17:09:49 rf kernel: [ 7017.539227]
> >> cfg80211: Regulatory domain changed to country: AUMay 29 17:09:49 rf
> >> kernel: [ 7017.539299] cfg80211: (start_freq - end_freq @
> >> bandwidth), (max_antenna_gain, max_eirp)May 29 17:09:49 rf kernel: [
> >> 7017.539410] cfg80211: (2402000 KHz - 2482000 KHz @ 40000 KHz),
> >> (N/A, 2000 mBm)May 29 17:09:49 rf kernel: [ 7017.539519] cfg80211:
> >> (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2300 mBm)May 29
> >> 17:09:49 rf kernel: [ 7017.539627] cfg80211: (5250000 KHz -
> >> 5330000 KHz @ 40000 KHz), (300 mBi, 2300 mBm)May 29 17:09:49 rf
> >> kernel: [ 7017.539736] cfg80211: (5735000 KHz - 5835000 KHz @
> >> 40000 KHz), (300 mBi, 3000 mBm)May 29 17:09:50 rf kernel: [
> >> 7018.020584] ohci_hcd 0000:00:03.0: leak ed cb972100 (#04) state
> >> 2May 29 17:09:57 rf kernel: [ 7025.061672] usb 2-2: USB control
> >> request for firmware upload failed. Error number -110May 29 17:09:57
> >> rf kernel: [ 7025.061794] usb 2-2: Could not upload firmware code
> >> uph. Error number -110May 29 17:09:57 rf kernel: [ 7025.061872]
> >> zd1211rw 2-2:1.0: couldn't load firmware. Error number -110
> >>
> >>
> >> There are no other usb device plugged into this pc to cause a
> >> conflict:[root@rf ~]# lsusbBus 004 Device 001: ID 1d6b:0001 Linux
> >> Foundation 1.1 root hubBus 003 Device 001: ID 1d6b:0001 Linux
> >> Foundation 1.1 root hubBus 002 Device 005: ID 07b8:6001 D-Link Corp.
> >> 802.11bgBus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root
> >> hubBus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> >> I know I am pushing usb to its limits using a 10 meter UTP cable,
> >> but I'm still curious as to why one driver works fine, and another
> >> driver fails?
> >>
> >> Thanks for any help/tips/ideas etc.
> >> Regards,
> >> Rohan.
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
> >
> > ------------------------------------------------------------------------------
> > vRanger cuts backup time in half-while increasing security.
> > With the market-leading solution for virtual backup and recovery,
> > you get blazing-fast, flexible, and affordable data protection.
> > Download your free trial now.
> > http://p.sf.net/sfu/quest-d2dcopy1
> > _______________________________________________
> > Zd1211-devs mailing list - http://zd1211.wiki.sourceforge.net/
> > Unsubscribe: https://lists.sourceforge.net/lists/listinfo/zd1211-devs
> >
> >
>
>