# [SOLVED] zd1211rw firmware loading problem (at boot time)

## jorges

Hi,

I have a usb wireless card and kernel 2.6.18-gentoo-r4 with the zd1211rw enabled in the kernel. The problem I have is that the firmware isn't loaded if the device is left connected when booting. I have to insert it after the kernel initialization for the wlan to come up correctly. I post relevant sections of dmesg:

```
eter enabled

ACPI: Using PIC for interrupt routing

ACPI: PCI Root Bridge [PCI0] (0000:00)

PCI: Probing PCI hardware (bus 00)

ACPI: Assume root bridge [\_SB_.PCI0] bus is 0

Boot video device is 0000:01:00.0

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]

ACPI: PCI Interrupt Link [LNKA] (IRQs 1 3 4 5 6 7 10 *11 12 14 15)

ACPI: PCI Interrupt Link [LNKB] (IRQs 1 3 4 5 6 7 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [LNKC] (IRQs 1 3 4 *5 6 7 10 11 12 14 15)

ACPI: PCI Interrupt Link [LNKD] (IRQs 1 3 4 5 6 7 10 11 *12 14 15)

Linux Plug and Play Support v0.97 (c) Adam Belay

pnp: PnP ACPI init

pnp: PnP ACPI: found 14 devices

SCSI subsystem initialized

usbcore: registered new driver usbfs

usbcore: registered new driver hub

PCI: Using ACPI for IRQ routing

PCI: If a device doesn't work, try "pci=routeirq".  If it helps, post a report

PCI: Bridge: 0000:00:01.0

  IO window: disabled.

  MEM window: d4000000-dbffffff

  PREFETCH window: dc000000-e3ffffff

PCI: Setting latency timer of device 0000:00:01.0 to 64

NET: Registered protocol family 2

IP route cache hash table entries: 4096 (order: 2, 16384 bytes)

TCP established hash table entries: 16384 (order: 4, 65536 bytes)

TCP bind hash table entries: 8192 (order: 3, 32768 bytes)

TCP: Hash tables configured (established 16384 bind 8192)

TCP reno registered

Machine check exception polling timer started.

Installing knfsd (copyright (C) 1996 okir@monad.swb.de).

Initializing Cryptographic API

io scheduler noop registered

io scheduler cfq registered (default)

lp: driver loaded but no devices found

Real Time Clock Driver v1.12ac

Non-volatile memory driver v1.2

Linux agpgart interface v0.101 (c) Dave Jones

agpgart: Detected VIA KT266/KY266x/KT333 chipset

agpgart: AGP aperture is 64M @ 0xd0000000

vesafb: NVidia Corporation, NV20 Board, Chip Rev A3 (OEM: NVidia)

vesafb: VBE version: 3.0

vesafb: protected mode interface info at c000:b7d0

vesafb: pmi: set display start = c00cb815, set palette = c00cb89a

vesafb: pmi: ports = 3b4 3b5 3ba 3c0 3c1 3c4 3c5 3c6 3c7 3c8 3c9 3cc 3ce 3cf 3d0 3d1 3d2 3d3 3d4 3d5 3da 

vesafb: VBIOS/hardware supports DDC2 transfers

      Display is GTF capable

vesafb: monitor limits: vf = 160 Hz, hf = 96 kHz, clk = 270 MHz

vesafb: scrolling: ywrap using protected mode interface, yres_virtual=3000

Console: switching to colour frame buffer device 160x64

fbsplash: console 0 using theme 'livecd-2006.1'

fbsplash: switched splash state to 'on' on console 0

vesafb: framebuffer at 0xdc000000, mapped to 0xe0880000, using 7500k, total 65536k

fb0: VESA VGA frame buffer device

ACPI: CPU0 (power states: C1[C1] C2[C2])

ACPI: Processor [CPU0] (supports 2 throttling states)

Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled

serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A

00:08: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

00:09: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A

parport: PnPBIOS parport detected.

parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE]

lp0: using parport0 (interrupt-driven).

PNP: PS/2 Controller [PNP0303:PS2K] at 0x60,0x64 irq 1

PNP: PS/2 controller doesn't have AUX irq; using default 12

serio: i8042 AUX port at 0x60,0x64 irq 12

serio: i8042 KBD port at 0x60,0x64 irq 1

mice: PS/2 mouse device common for all mice

input: PC Speaker as /class/input/input0

input: AT Translated Set 2 keyboard as /class/input/input1

Floppy drive(s): fd0 is 1.44M

FDC 0 is a post-1991 82077

RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize

loop: loaded (max 8 devices)

8139too Fast Ethernet driver 0.9.27

ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 12

PCI: setting IRQ 12 as level-triggered

ACPI: PCI Interrupt 0000:00:0b.0[A] -> Link [LNKD] -> GSI 12 (level, low) -> IRQ 12

eth0: RealTek RTL8139 at 0xe0802000, 00:10:b5:66:52:05, IRQ 12

eth0:  Identified 8139 chip type 'RTL-8139B'

usb_init()

usbcore: registered new driver zd1211rw

zd1211rw initialized

Linux video capture interface: v2.00

saa7130/34: v4l2 driver version 0.2.14 loaded

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

VP_IDE: IDE controller at PCI slot 0000:00:11.1

ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 11

PCI: setting IRQ 11 as level-triggered

ACPI: PCI Interrupt 0000:00:11.1[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11

PCI: VIA IRQ fixup for 0000:00:11.1, from 255 to 11

VP_IDE: chipset revision 6

VP_IDE: not 100% native mode: will probe irqs later

VP_IDE: VIA vt8233 (rev 00) IDE UDMA100 controller on pci0000:00:11.1

    ide0: BM-DMA at 0xdc00-0xdc07, BIOS settings: hda:DMA, hdb:pio

    ide1: BM-DMA at 0xdc08-0xdc0f, BIOS settings: hdc:DMA, hdd:DMA

Probing IDE interface ide0...

hda: WDC WD800JB-00CRA1, ATA DISK drive

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

Probing IDE interface ide1...

hdc: LITE-ON LTR-16101B, ATAPI CD/DVD-ROM drive

hdd: SAMSUNG CD-ROM SC-152C, ATAPI CD/DVD-ROM drive

ide1 at 0x170-0x177,0x376 on irq 15

hda: max request size: 128KiB

hda: 156301488 sectors (80026 MB) w/8192KiB Cache, CHS=65535/16/63, UDMA(100)

hda: cache flushes not supported

 hda: hda1 hda2 hda3 hda4 < hda5 hda6 hda7 hda8 hda9 hda10 >

hdc: ATAPI 40X CD-ROM CD-R/RW drive, 2048kB Cache, DMA

Uniform CD-ROM driver Revision: 3.20

hdd: ATAPI 52X CD-ROM drive, 128kB Cache, DMA

ACPI: PCI Interrupt 0000:00:0a.2[C] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11

ehci_hcd 0000:00:0a.2: EHCI Host Controller

ehci_hcd 0000:00:0a.2: new USB bus registered, assigned bus number 1

ehci_hcd 0000:00:0a.2: irq 11, io mem 0xe5001000

ehci_hcd 0000:00:0a.2: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004

usb usb1: configuration #1 chosen from 1 choice

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 4 ports detected

USB Universal Host Controller Interface driver v3.0

ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 5

PCI: setting IRQ 5 as level-triggered

ACPI: PCI Interrupt 0000:00:0a.0[A] -> Link [LNKC] -> GSI 5 (level, low) -> IRQ 5

uhci_hcd 0000:00:0a.0: UHCI Host Controller

uhci_hcd 0000:00:0a.0: new USB bus registered, assigned bus number 2

uhci_hcd 0000:00:0a.0: irq 5, io base 0x0000d000

usb usb2: configuration #1 chosen from 1 choice

hub 2-0:1.0: USB hub found

hub 2-0:1.0: 2 ports detected

ACPI: PCI Interrupt 0000:00:0a.1[B] -> Link [LNKD] -> GSI 12 (level, low) -> IRQ 12

uhci_hcd 0000:00:0a.1: UHCI Host Controller

uhci_hcd 0000:00:0a.1: new USB bus registered, assigned bus number 3

uhci_hcd 0000:00:0a.1: irq 12, io base 0x0000d400

usb usb3: configuration #1 chosen from 1 choice

hub 3-0:1.0: USB hub found

hub 3-0:1.0: 2 ports detected

ACPI: PCI Interrupt 0000:00:11.2[D] -> Link [LNKD] -> GSI 12 (level, low) -> IRQ 12

uhci_hcd 0000:00:11.2: UHCI Host Controller

uhci_hcd 0000:00:11.2: new USB bus registered, assigned bus number 4

uhci_hcd 0000:00:11.2: irq 12, io base 0x0000e000

usb usb4: configuration #1 chosen from 1 choice

hub 4-0:1.0: USB hub found

hub 4-0:1.0: 2 ports detected

usb 1-1: new high speed USB device using ehci_hcd and address 2

ACPI: PCI Interrupt 0000:00:11.3[D] -> Link [LNKD] -> GSI 12 (level, low) -> IRQ 12

uhci_hcd 0000:00:11.3: UHCI Host Controller

uhci_hcd 0000:00:11.3: new USB bus registered, assigned bus number 5

uhci_hcd 0000:00:11.3: irq 12, io base 0x0000e400

usb usb5: configuration #1 chosen from 1 choice

hub 5-0:1.0: USB hub found

hub 5-0:1.0: 2 ports detected

usb 1-1: configuration #1 chosen from 1 choice

usb 1-1: print_id() 0ace:1211 v4330 high

zd1211rw 1-1:1.0: zd_netdev_alloc() netdev->flags 0x1002

zd1211rw 1-1:1.0: zd_netdev_alloc() netdev->features 0x00000000

usb 1-1: request_fw_file() fw name zd1211/zd1211_ub

ACPI: PCI Interrupt 0000:00:11.4[D] -> Link [LNKD] -> GSI 12 (level, low) -> IRQ 12

uhci_hcd 0000:00:11.4: UHCI Host Controller

uhci_hcd 0000:00:11.4: new USB bus registered, assigned bus number 6

uhci_hcd 0000:00:11.4: irq 12, io base 0x0000e800

usb usb6: configuration #1 chosen from 1 choice

hub 6-0:1.0: USB hub found

hub 6-0:1.0: 2 ports detected

usb 1-1: Could not load firmware file zd1211/zd1211_ub. Error number -2

zd1211rw 1-1:1.0: couldn't load firmware. Error number -2

usb 1-1: reset high speed USB device using ehci_hcd and address 2

zd1211rw: probe of 1-1:1.0 failed with error -2

usb 4-1: new full speed USB device using uhci_hcd and address 2

usb 4-1: configuration #1 chosen from 1 choice

usb 4-2: new full speed USB device using uhci_hcd and address 3

usb 4-2: configuration #1 chosen from 1 choice

hub 4-2:1.0: USB hub found

hub 4-2:1.0: 4 ports detected

drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 2 if 0 alt 0 proto 2 vid 0x03F0 pid 0x3404

usb 4-2.4: new low speed USB device using uhci_hcd and address 4

usb 4-2.4: configuration #1 chosen from 1 choice

usbcore: registered new driver usblp

drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver

Initializing USB Mass Storage driver...

usbcore: registered new driver usb-storage

USB Mass Storage support registered.

input: HID 062a:0000 as /class/input/input2

input: USB HID v1.10 Mouse [HID 062a:0000] on usb-0000:00:11.2-2.4

usbcore: registered new driver usbhid

drivers/usb/input/hid-core.c: v2.6:USB HID core driver

i2c /dev entries driver

it87: Found IT8705F chip at 0x290, revision 2

it87-isa 9191-0290: Detected broken BIOS defaults, disabling PWM interface

Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50 2006 UTC).

via82xx: Assuming DXS channels with 48k fixed sample rate.

         Please try dxs_support=5 option

         and report if it works on your machine.

         For more details, read ALSA-Configuration.txt.

ACPI: PCI Interrupt 0000:00:11.5[C] -> Link [LNKC] -> GSI 5 (level, low) -> IRQ 5

PCI: Setting latency timer of device 0000:00:11.5 to 64

ALSA device list:

  #0: VIA 8233 with ICE1232 at 0xec00, irq 5

ip_conntrack version 2.4 (4095 buckets, 32760 max) - 172 bytes per conntrack

ip_tables: (C) 2000-2006 Netfilter Core Team

TCP bic registered

NET: Registered protocol family 1

NET: Registered protocol family 17

ieee80211: 802.11 data/management/control stack, git-1.1.13

ieee80211: Copyright (C) 2004-2005 Intel Corporation <jketreno@linux.intel.com>

ieee80211_crypt: registered algorithm 'NULL'

ieee80211_crypt: registered algorithm 'WEP'

ieee80211_crypt: registered algorithm 'CCMP'

ieee80211_crypt: registered algorithm 'TKIP'

Using IPI Shortcut mode

ACPI: (supports S0 S1 S4 S5)

Time: tsc clocksource has been installed.

Time: acpi_pm clocksource has been installed.

kjournald starting.  Commit interval 5 seconds

EXT3-fs: mounted filesystem with ordered data mode.

VFS: Mounted root (ext3 filesystem) readonly.

Freeing unused kernel memory: 168k freed

usb 1-1: USB disconnect, address 2

nvidia: module license 'NVIDIA' taints kernel.

ACPI: PCI Interrupt 0000:01:00.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11

NVRM: loading NVIDIA Linux x86 Kernel Module  1.0-7184  Tue Aug  1 18:38:58 PDT 2006

EXT3 FS on hda8, internal journal

ReiserFS: hda2: found reiserfs format "3.6" with standard journal

ReiserFS: hda2: using ordered data mode

ReiserFS: hda2: journal params: device hda2, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30

ReiserFS: hda2: checking transaction log (hda2)

ReiserFS: hda2: Using r5 hash to sort names

ReiserFS: hda3: found reiserfs format "3.6" with standard journal

usb 1-1: new high speed USB device using ehci_hcd and address 3

usb 1-1: configuration #1 chosen from 1 choice

usb 1-1: print_id() 0ace:1211 v4330 high

zd1211rw 1-1:1.0: zd_netdev_alloc() netdev->flags 0x1002

zd1211rw 1-1:1.0: zd_netdev_alloc() netdev->features 0x00000000

usb 1-1: request_fw_file() fw name zd1211/zd1211_ub

usb 1-1: upload_firmware() firmware device id 0x4330 is equal to the actual device id

usb 1-1: request_fw_file() fw name zd1211/zd1211_uphr

usb 1-1: upload_code() transfer size 4096

usb 1-1: upload_code() transfer size 1024

usb 1-1: upload_code() firmware confirm return value 0x01

zd1211rw 1-1:1.0: zd_usb_enable_int() 

zd1211rw 1-1:1.0: zd_usb_enable_int() submit urb de2ed9a0

zd1211rw 1-1:1.0: zd_chip_init_hw() 

zd1211rw 1-1:1.0: dump_cr() CR_AFTER_PNP 0x00000000

zd1211rw 1-1:1.0: dump_cr() CR_GPI_EN 0x00000000

zd1211rw 1-1:1.0: dump_cr() CR_INTERRUPT 0x00000000

zd1211rw 1-1:1.0: zd_usb_init_hw() fw_base_offset: 0xf7d4

zd1211rw 1-1:1.0: read_pod() E2P_POD 0x0000011d

zd1211rw 1-1:1.0: read_pod() RF RF2959_RF 0xd PA type 0x0 patch CCK 1 patch CR157 0 patch 6M 0

zd1211rw 1-1:1.0: hw_init() 

zd1211rw 1-1:1.0: zd1211_hw_reset_phy() 

zd1211rw 1-1:1.0: zd_chip_lock_phy_regs() CR_REG1: 0x00 -> 0x00

zd1211rw 1-1:1.0: zd_chip_unlock_phy_regs() CR_REG1: 0x00 -> 0x80

zd1211rw 1-1:1.0: zd1211_hw_init_hmac() 

zd1211rw 1-1:1.0: get_aw_pt_bi() aw 0 pt 0 bi 0

zd1211rw 1-1:1.0: set_aw_pt_bi() aw 0 pt 99 bi 100

zd1211rw 1-1:1.0: zd_chip_lock_phy_regs() CR_REG1: 0xa0 -> 0x20

zd1211rw 1-1:1.0: zd_usb_rfwrite() value 0x0000007 bits 24

zd1211rw 1-1:1.0: zd_usb_rfwrite() value 0x007dd43 bits 24

zd1211rw 1-1:1.0: zd_usb_rfwrite() value 0x0080959 bits 24

zd1211rw 1-1:1.0: zd_usb_rfwrite() value 0x00e6666 bits 24

zd1211rw 1-1:1.0: zd_usb_rfwrite() value 0x0116a57 bits 24

zd1211rw 1-1:1.0: zd_usb_rfwrite() value 0x017dd43 bits 24

zd1211rw 1-1:1.0: zd_usb_rfwrite() value 0x01819f9 bits 24

zd1211rw 1-1:1.0: zd_usb_rfwrite() value 0x01e6666 bits 24

zd1211rw 1-1:1.0: zd_usb_rfwrite() value 0x0214554 bits 24

zd1211rw 1-1:1.0: zd_usb_rfwrite() value 0x025e7fa bits 24

zd1211rw 1-1:1.0: zd_usb_rfwrite() value 0x027fffa bits 24

zd1211rw 1-1:1.0: zd_usb_rfwrite() value 0x0294128 bits 24

zd1211rw 1-1:1.0: zd_usb_rfwrite() value 0x02c0000 bits 24

zd1211rw 1-1:1.0: zd_usb_rfwrite() value 0x0300000 bits 24

zd1211rw 1-1:1.0: zd_usb_rfwrite() value 0x0340000 bits 24

zd1211rw 1-1:1.0: zd_usb_rfwrite() value 0x0381e0f bits 24

zd1211rw 1-1:1.0: zd_usb_rfwrite() value 0x06c180f bits 24

zd1211rw 1-1:1.0: zd_chip_unlock_phy_regs() CR_REG1: 0x20 -> 0xa0

zd1211rw 1-1:1.0: firmware version 4605

zd1211rw 1-1:1.0: dump_fw_registers() FW_FIRMWARE_VER 0x4605

zd1211rw 1-1:1.0: dump_fw_registers() FW_USB_SPEED 0x0001

zd1211rw 1-1:1.0: dump_fw_registers() FW_FIX_TX_RATE 0x0000

zd1211rw 1-1:1.0: dump_fw_registers() FW_LINK_STATUS 0x0000

zd1211rw 1-1:1.0: dump_cr() CR_AFTER_PNP 0x00000001

zd1211rw 1-1:1.0: dump_cr() CR_GPI_EN 0x00000000

zd1211rw 1-1:1.0: dump_cr() CR_INTERRUPT 0x00000000

zd1211rw 1-1:1.0: zd1211 chip 0ace:1211 v4330 high 00-c0-a8 RF2959_RF pa0 g--

zd1211rw 1-1:1.0: zd_write_mac_addr() mac addr 00:c0:a8:a8:7d:43

zd1211rw 1-1:1.0: zd_read_regdomain() regdomain: 0x10

zd1211rw 1-1:1.0: regdomain 0x10

zd1211rw 1-1:1.0: zd_usb_disable_int() urb de2ed9a0 killed

zd1211rw 1-1:1.0: probe() successful

zd1211rw 1-1:1.0: eth1

ReiserFS: hda3: using ordered data mode

ReiserFS: hda3: journal params: device hda3, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30

ReiserFS: hda3: checking transaction log (hda3)

ReiserFS: hda3: Using r5 hash to sort names

ReiserFS: hda5: found reiserfs format "3.6" with standard journal

ReiserFS: hda5: using ordered data mode

ReiserFS: hda5: journal params: device hda5, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30

ReiserFS: hda5: checking transaction log (hda5)

ReiserFS: hda5: Using r5 hash to sort names

ISO 9660 Extensions: Microsoft Joliet Level 3

ISO 9660 Extensions: RRIP_1991A

Adding 1004020k swap on /dev/hda6.  Priority:-1 extents:1 across:1004020k

```

Any ideas of how can I fix this. It's a pain in the ass having to remove the usb device and putting it back in again (and do so at a precise moment, between kernel and net initialization) to have the net and dependent services going.

 EDIT: The combination of kernel gentoo-sources-2.6.20, udev-104-r9 and driver compiled in kernel as a module fixed it for meLast edited by jorges on Sat Feb 10, 2007 6:03 pm; edited 1 time in total

----------

## jorges

Anyone at all using the zd1211rw in 2.6.18 kernel (x86)?

----------

## cabbagewalker

Hello jorges

I'm using gentoo's 2.6.19-r2 sources and my Zydas loads O/k at boot using zd1211rw driver.

The only problem I have at the moment is that the speed is set to 11Mbs instead of 54Mbs but doinfg a

```
 iwconfig eth1 rate 54M 
```

sorts that out.

 There were a lot of Zd2111rw updates between 2.6.18 and 2.6.19 and it may be worth while updating.

----------

## jorges

 *cabbagewalker wrote:*   

> Hello jorges
> 
> I'm using gentoo's 2.6.19-r2 sources and my Zydas loads O/k at boot using zd1211rw driver.
> 
> The only problem I have at the moment is that the speed is set to 11Mbs instead of 54Mbs but doinfg a
> ...

 

OK, I'll give kernel 2.6.19 a go and see what happens. Thanks.

jorges

----------

## jorges

 *cabbagewalker wrote:*   

> Hello jorges
> 
> I'm using gentoo's 2.6.19-r2 sources and my Zydas loads O/k at boot using zd1211rw driver.
> 
> The only problem I have at the moment is that the speed is set to 11Mbs instead of 54Mbs but doinfg a
> ...

 

I just booted into 2.6.19-gentoo-r2 and I get the same error as before, i.e. somehow it can't load the firmware. I checked and the file that it can't load is sitting in /lib/firmware/zd1211/zd1211_ub (emerged zd1211-firmware). 

If it worked with you, maybe I have some config problem, but where to look? Did you do something special to get it working? Any kernel options (besides choosing zd1211 driver)?

----------

## cabbagewalker

Hello 

I don't use coldplug and I use udev v103  if that matters.

My RF unit is different from yours

```
zd1211rw 1-1:1.0: zd1211 chip 0ace:1211 v4330 high 00-c0-a8 RF2959_RF pa0 g--

```

and mine is 

```
zd1211rw 1-4:1.0: zd1211b chip 0ace:1215 v4810 high 00-02-72 AL2230_RF pa0 g--N

```

Here's a list of the files in my /lib/firmware/zd1211

-rw-r--r-- 1 root root  733 Dec 31 00:37 README

-rw-r--r-- 1 root root 4018 Jan  5 12:15 zd1211_ub

-rw-r--r-- 1 root root 5120 Dec 31 00:37 zd1211_uph

-rw-r--r-- 1 root root 5120 Dec 31 00:37 zd1211_uphm

-rw-r--r-- 1 root root 5120 Jan  5 12:15 zd1211_uphr

-rw-r--r-- 1 root root 3584 Jan  5 12:15 zd1211_ur

-rw-r--r-- 1 root root 4018 Jan  5 12:15 zd1211b_ub

-rw-r--r-- 1 root root 5120 Dec 31 00:37 zd1211b_uph

-rw-r--r-- 1 root root 5120 Dec 31 00:37 zd1211b_uphm

-rw-r--r-- 1 root root 5120 Jan  5 12:15 zd1211b_uphr

-rw-r--r-- 1 root root 3584 Jan  5 12:15 zd1211b_ur

See if that helps

----------

## bredde

Hi, i've got the same problem that the firmware is not loaded on startup, but i also have got a little offtopic question: Are you able to get WPA or WEP work with the zydas chip and the rw-drivers?

----------

## cabbagewalker

 *Quote:*   

>  Did you do something special to get it working? Any kernel options (besides choosing zd1211 driver)?

 

Nothing I can think of apart from enabling the EEE80211 & IEE80211_SOFTMAC settings, but you need that to get the zd1211rw oprion anyway.

 *Quote:*   

> Are you able to get WPA or WEP work with the zydas chip and the rw-drivers?

 

You can use WEP, I haven't tried WPA.

----------

## PiRmD

Hi jorges,

I experienced the exact same problem than yours with my zd1211rw driver. I solve it by using the ifplugd support of the new baselayout (well it's not really a solution I think, but it works quite well) :

1- emerge ifplug (or netplug)

2- modify /etc/conf.d/rc and add something like 

```
RC_PLUG_SERVICES="net.eth1 !net.*"
```

3- remove any net* with rc-update

Additionaly it will detect if you plug a network cable on your network cable and switch to it

Then reboot and it should work.

HTH

----------

## blwrd

Same problem here too. And I haven't tried the ifplugd/netplug yet. 

But instead I tried to investigate what exactly happens on the boot. 

I set the udev logging level to debug, and it seems that the zd1211rw module gets loaded before the udev stuff process all the events (and loads the firmware). 

I'm wondering if it is the "Automatic kernel module loading" (CONFIG_KMOD) that loads the zd1211rw before it should be? I'm also wondering how safe it would be to disable CONFIG_KMOD, and let the udev load the zd1211rw. Maybe I'll try that one next...

EDIT: 

Disabling CONFIG_KMOD did not help. So it seems that udev tries to load the module before loading the firmware stuff.. (?)

----------

## blwrd

I continued on looking on what exactly loads the zd1211rw, and why it fails to load firmware on boot. There's no apparent reason, but it looks that the problem might be that the udev starts too slowly(?). 

On the sysinit stage, the /sbin/rc script starts first udev (/lib/rcscripts/addons/udev-start.sh), after which it starts the critical services, such like checkroot and modules. Now the workaround that I found was to remove uhci-hcd and ehci-hcd from the /etc/modules.autoload.d/kernel-2.6 and also set the RC_COLDPLUG to "no" in /etc/conf.d/rc. 

This was to prevent the ehci and uhci to be loaded before udev starts. As it seemed that the zd1211rw was loaded automatically with these modules. 

Now the final tweak was to load the required modules with the preup function in the /etc/conf.d/net.eth1. This was late enough, so that the udev was properly started at this point.

```

preup() {

  modprobe ehci-hcd

  modprobe uhci-hcd

  modprobe zd1211rw

  sleep 5

}

postup() {

  iwconfig eth1 rate 54M

}

```

... one thing I could try, is to just add some sleep in the end of udev-start.sh, so that the udev starts properly before the modules are loaded. If that works also, then it just takes too long for udev to start. But now that I've got this working even though with terrible kludge, let's see how long it takes that I have the motivation to try that ....

----------

## jorges

 *blwrd wrote:*   

> I continued on looking on what exactly loads the zd1211rw, and why it fails to load firmware on boot. There's no apparent reason, but it looks that the problem might be that the udev starts too slowly(?). 
> 
> On the sysinit stage, the /sbin/rc script starts first udev (/lib/rcscripts/addons/udev-start.sh), after which it starts the critical services, such like checkroot and modules. Now the workaround that I found was to remove uhci-hcd and ehci-hcd from the /etc/modules.autoload.d/kernel-2.6 and also set the RC_COLDPLUG to "no" in /etc/conf.d/rc. 
> 
> This was to prevent the ehci and uhci to be loaded before udev starts. As it seemed that the zd1211rw was loaded automatically with these modules. 
> ...

 

Thanks for sharing this info. I had given up on this, but I'll try this workaround whenever I get some time.

----------

## czadczad

Hello guys,

I use 2.6.19.2 vanilla-kernel and got the same problem.

I decided to find sth interesting in dmesg using blwrd's idea:

 *Quote:*   

> modprobe ehci-hcd 
> 
>   modprobe uhci-hcd 
> 
>   modprobe zd1211rw

 

Before I did this formula manually, I had recompiled my kernel to have all these modules  as [M] then loaded them using modprobe - obvious.

Then I looked into dmesg again and found: 

```
ohci_hcd 0000:00:03.2: OHCI Host Controller

ohci_hcd 0000:00:03.2: new USB bus registered, assigned bus number 3

ohci_hcd 0000:00:03.2: irq 5, io mem 0xdfff9000

usb usb3: configuration #1 chosen from 1 choice

hub 3-0:1.0: USB hub found

hub 3-0:1.0: 2 ports detected

usb 2-1: new full speed USB device using ohci_hcd and address 2

usb 2-1: configuration #1 chosen from 1 choice

USB Universal Host Controller Interface driver v3.0

ACPI: PCI Interrupt Link [LNKH] enabled at IRQ 11

PCI: setting IRQ 11 as level-triggered

ACPI: PCI Interrupt 0000:00:03.3[D] -> Link [LNKH] -> GSI 11 (level, low) -> IRQ 11

ehci_hcd 0000:00:03.3: EHCI Host Controller

ehci_hcd 0000:00:03.3: new USB bus registered, assigned bus number 4

PCI: cache line size of 128 is not supported by device 0000:00:03.3

ehci_hcd 0000:00:03.3: irq 11, io mem 0xdfffa000

ehci_hcd 0000:00:03.3: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004

usb 2-1: USB disconnect, address 2

usb usb4: configuration #1 chosen from 1 choice

hub 4-0:1.0: USB hub found

hub 4-0:1.0: 6 ports detected

usb 4-2: new high speed USB device using ehci_hcd and address d1211rw 4-2:1.0: couldn't load firmware. Error number -22

usb 4-2: configuration #1 chosen from 1 choice

usb 4-2: Could not load firmware file zd1211/zd1211_ub. Error number -2

zd1211rw 4-2:1.0: couldn't load firmware. Error number -2

usb 4-2: reset high speed USB device using ehci_hcd and address 2

zd1211rw: probe of 4-2:1.0 failed with error -2

usbcore: registered new interface driver zd1211rw
```

So not only zd1211rw is wrong, but also ehci_hdc!  :Evil or Very Mad: 

Maybe this is  main reason of the problem.

However I have no idea, how to deal with it.

I hope that 2.6.19.3 will not have this stupid bug.

Under 2.6.18-gentoo-r2 everything was fine.

Really strange.

----------

## gtroland

I had exactly the same problem with the driver compiled into the kernel (2.6.19-r5, gentoo-sources).  Noting the suggestions here that it might be a timing issue, I tried recompiling the driver as a module.  That alleviated the problem.

One thing I'm a little confused about is that I don't have to load the module at all.  Apparently the module loads as soon as the /etc/conf.d/net script references the device.

BTW, it works fine with WEP.  My wife's ancient iBook crawls with WPA enabled on our home network, so I haven't bothered testing that.  Good performance overall and seems to associate with our router noticeably faster than the older zd1211 driver.

----------

## garfungiloops

I have the same problem, and I've posted a bug-report few days ago:

https://bugs.gentoo.org/show_bug.cgi?id=165505

----------

## garfungiloops

 *PiRmD wrote:*   

> Hi jorges,
> 
> I experienced the exact same problem than yours with my zd1211rw driver. I solve it by using the ifplugd support of the new baselayout (well it's not really a solution I think, but it works quite well) :
> 
> 1- emerge ifplug (or netplug)
> ...

 

Doesn't works for me ...  :Sad: 

----------

## garfungiloops

PiRmD,

Sorry, 

Works fine when zd1211rw compiled as the module  :Smile: 

----------

## dsd

the problem is that network drivers are loaded before the root filesystem is mounted -- so it's no surprise that the driver can't find the firmware at that point. if you build it as a module, the root filesystem is available at driver loading time for obvious reasons.

unfortunately there is no simple solution to this (other than the module workaround). networking is started before the root partition is mounted as some people boot off NFS roots, changing the load order would kill that functionality. and the driver is unable to read the MAC address of the hardware without the firmware uploaded, so we can't defer firmware loading until later.

----------

## blwrd

Works now, at least most of the time, after upgrading the udev to 104-r9.

And I noticed also that the bug that was reported (https://bugs.gentoo.org/show_bug.cgi?id=165505), was also fixed with explanation to upgrade the udev to the newest stable version (the 104-r9).

Now the the only problem that I have left is that every once in a while, the initialization finds FF:FF:FF:FF:FF:FF as a access point, reloading the modules usually helps on that. 

blwrd

----------

## jorges

Works for me too, kernel gentoo-sources-2.6.20, udev-104-r9 and driver compiled as module. Now I don't know who fixed what. Well I am glad I have better performance now. 

BTW, I get in my environment (two wireless clients connected to wireless adsl router)  ~1.1 Mbytes/s (~9 Mbits/s) upload rate (Just a VERY rough measurement, transferred a movie over sftp and checked the displayed rate). Is that what I should expect from this device? Also, if I set the zd1211 rate to 54 Mbits, performance goes down dramatically to less than 300 Kbytes/s. I got the above mentioned results at 36 Mbits. The other client (besides the one using the zd1211) is a laptop from which I get ~3Mbytes at work (I couldn't tell how many clients were connected at the time, as the wireless covers a whole institute at university with an unknown (to me) number of clients), so I presume the limiting factor would be the zd1211 or the router itself. What are your numbers? Any hints on improving my figures? I know for everyday use the speed I get is more than enough, but from time to time I have to transfer a movie, an iso image, etc. and it's a pain to wait 10, 20 minutes or more.

Last, should add SOLVED to the topic, does it work for all of us now?

Thanks very much to all who shared their experiences and knowledge, and to those making the stuff work.

jorges

----------

## dsd

zd1211rw is suspected to perform significantly worse than the vendor/community driver. this is OK for most people (i.e. internet/email is fine) but is probably noticable when transferring large files over a local network.

that said, nobody has actually quantified this with any numbers in a long while.

----------

## garfungiloops

That's seems to be true what 'dsd' said,

For me it performs quite slow, 150-250kbit/s, with 54M router, while the same device on the same PC, under WinXP with the original (ZyDas) driver gives about 1200kbit/s  :Sad: 

The test was to transfer 700MB file from laptop to PC using samba.

Also I have noticed that the zd1211rw gives no information about TX, RX rate when calling ifconfig (iwconfig)

----------

