ZyDAS 802.11b WiFi freezes kernel 2.6.22-9 in Gutsy Tribe 3

Bug #130998 reported by Marcus Granado
24
Affects Status Importance Assigned to Milestone
linux-source-2.6.22 (Ubuntu)
Won't Fix
Medium
Unassigned
Nominated for Gutsy by pype

Bug Description

I have a usb wireless device Bus 001 Device 002: ID 0ace:1201 ZyDAS 802.11b WiFi in my laptop A which always worked flawlessly in Feisty 7.04 (and earlier versions as well) as an access point using its AP firmware 'zd1201-ap.fw'.

However, in Gutsy Tribe 3, with all updates until today, it freezes the kernel 2.6.22-9 in laptop A whenever I boot up my wireless laptop B: laptop B contains another wireless card, and from the moment laptop B's wireless card initializes, laptop A just freezes. If I replace laptop A's 2.6.22-9 kernel for feisty's 2.6.20-16, it doesn't freeze anymore.

Maybe 'freeze' is not the best description: even though all networking and i/o (keyboard,mouse,display) freeze, the capslock and scrlock leds on the keyboard start blinking, thou probably this is just a consequence of a runaway kernel crash. I must turn off laptop B and restart laptop A to get it back up properly.

Revision history for this message
Edward Steel (eddsteel) wrote :

Can confirm similar problem acting as wireless client (using zd1201.fw) with an MSI UB11B dongle, same driver.

With zd1201 driver on linux 2.6.22-9 it freezes. With feisty installation of 2.6.20-16 the same dongle on the same machine(s) works fine. If I tail the logs, it gets as far as sending a DHCP request before the freeze. This has been observed firstly on a desktop machine acting as a headless server (SSHed over the wired connection to try to setup the previously working wireless link), running gutsy tribe 4, then with a laptop (gen1 macbook) running GGt4 from the live CD.

I would suspect the kernel, though I see that between the working and broken configurations there is a difference in the versions for NetworkManager, avahi-daemon and the kernel, all of which are doing something around the time of the freeze.

The ID of the usb device is "ID 0db0:6823". Any further information required, let me know.

Revision history for this message
Trevor Schauls (trevorschauls) wrote :

I can also conferm. The zd1201 driver causes a kerrnel panic in Ubuntu Gutsy, but not in Ubuntu Feisty. Have tested on 3 machines. I am not at home right now, so I can't post the kernal output. The driver I use is listed below.
Also please prepackage this driver in Gutsy as soon as the bugs are worked out!

Revision history for this message
Djainette (djainette) wrote :

A screenshot of this kernel panic using a MSI UB11B on a Gutsy Beta (2.6.22-12-generic)
https://bugs.launchpad.net/ubuntu/+bug/126859

Revision history for this message
Marco Rodrigues (gothicx) wrote :

You still have the same problem on Gutsy Beta ?

Changed in linux-source-2.6.22:
assignee: nobody → ubuntu-kernel-network
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Djainette (djainette) wrote :

Yes, the screenshot is from a Gutsy Beta

Revision history for this message
Marcus Granado (mrc-gran) wrote :

@marco: Yes, exactly the same problem I described in the first post is present on Gutsy Beta, even with all updates as of today. If you think a specific log/trace might be helpful, just drop me a msg.

Revision history for this message
Djainette (djainette) wrote :

Still panicking with today's upgrade to 2.6.22-13-generic

Revision history for this message
asdfasdf daf (hkppking) wrote :

The same kernel panic problem stills exist in Gutsy RC.

Revision history for this message
Djainette (djainette) wrote :

Can't test 2.6.22-14-generic because of this bug :
https://bugs.launchpad.net/ubuntu/+bug/147198

Revision history for this message
asdfasdf daf (hkppking) wrote :

Tried on 7.10 Stable (which kernel is 2.6.22-14-generic) released today, kernel stills panics & freezes.

Revision history for this message
abc (abcdef-deactivatedaccount) wrote :

I filed a report on this to bugzilla.kernel.org yesterday.
A preliminary patch has been submitted, but is not yet in mainline.
See http://bugzilla.kernel.org/show_bug.cgi?id=9179

Revision history for this message
Marcus Granado (mrc-gran) wrote :

Thanks, Christian, this patch solved my original problem!
Ubuntu kernel network team, any chances to pull this patch to the current 2.6.22-14 kernel?

Revision history for this message
Djainette (djainette) wrote :

Any hope for a backport ? Or are we stuck with 2.6.22 and no wifi for 6 whole months ?

Revision history for this message
Marcus Granado (mrc-gran) wrote :

Why is this bug taking so long to fix? Network team, this problem is very simple to patch! (see heinz's link above):

http://bugzilla.kernel.org/attachment.cgi?id=13190&action=view
From 0b329a4fcff552bbd329c9c90896446170f9f7cb Mon Sep 17 00:00:00 2001
From: John W. Linville <email address hidden>
Date: Wed, 17 Oct 2007 17:07:12 -0400
Subject: [PATCH] zd1201: avoid null ptr access of skb->dev

skb->dev is not set until eth_type_trans is called...

Signed-off-by: John W. Linville <email address hidden>
---
 drivers/net/wireless/zd1201.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c
index 935b144..d5c0c66 100644
--- a/drivers/net/wireless/zd1201.c
+++ b/drivers/net/wireless/zd1201.c
@@ -327,8 +327,8 @@ static void zd1201_usbrx(struct urb *urb)
    memcpy(skb_put(skb, 6), &data[datalen-8], 6);
    memcpy(skb_put(skb, 2), &data[datalen-24], 2);
    memcpy(skb_put(skb, len), data, len);
- skb->dev->last_rx = jiffies;
    skb->protocol = eth_type_trans(skb, zd->dev);
+ skb->dev->last_rx = jiffies;
    zd->stats.rx_packets++;
    zd->stats.rx_bytes += skb->len;
    netif_rx(skb);
@@ -384,8 +384,8 @@ static void zd1201_usbrx(struct urb *urb)
    memcpy(skb_put(skb, 2), &data[6], 2);
    memcpy(skb_put(skb, len), data+8, len);
   }
- skb->dev->last_rx = jiffies;
   skb->protocol = eth_type_trans(skb, zd->dev);
+ skb->dev->last_rx = jiffies;
   zd->stats.rx_packets++;
   zd->stats.rx_bytes += skb->len;
   netif_rx(skb);
--
1.5.2.4

Changed in linux-source-2.6.22:
assignee: ubuntu-kernel-network → timg-tpi
milestone: none → gutsy-updates
status: Confirmed → In Progress
Revision history for this message
Djainette (djainette) wrote :

I've contacted the kernel Team leader about this problem. It looks like it is taken care of.

Revision history for this message
Mario Capurso (m-capurso) wrote :

I have a different Zydas usb adapter (ORIGO) that failed in a different way:

If you connect a ZyDAS 802.11b WiFi usb, it is seen in the usb list

admin@sassuxp:~$ lsusb

Bus 002 Device 001: ID 0000:0000

Bus 001 Device 005: ID 0ace:1201 ZyDAS 802.11b WiFi

the module is loaded

admin@sassuxp:~$ lsmod

Module Size Used by

zd1201 23812 0

zd1201 23812 0

...

usbcore 138632 3 zd1201,uhci_hcd

...

but dmesg gives the following messages:

[11781.580000] usb 1-1: new full speed USB device using uhci_hcd and address 3

[11796.692000] usb 1-1: device descriptor read/64, error -110

[11811.908000] usb 1-1: device descriptor read/64, error -110

[11812.124000] usb 1-1: new full speed USB device using uhci_hcd and address 4

[11828.452000] usb 1-1: new full speed USB device using uhci_hcd and address 5

[11828.616000] usb 1-1: configuration #1 chosen from 1 choice

[11829.200000] usb 1-1: Failed to load zd1201.fw firmware file!

[11829.200000] usb 1-1: Make sure the hotplug firmware loader is installed.

[11829.200000] usb 1-1: Goto http://linux-lc100020.sourceforge.net for more info.

[11829.200000] usb 1-1: zd1201 firmware upload failed: -2

[11829.200000] zd1201: probe of 1-1:1.0 failed with error -2

[11829.200000] usbcore: registered new interface driver zd1201

I solved in this way

I went to

http://sourceforge.net/projects/linux-lc100020/

and I got the firmware as a tar.gz

http://downloads.sourceforge.net/lin...5&big_mirror=0

Next I gunzipped zd1201.fw and I copied in /lib/firmware/2.6.22-14-generic/ working as a root.

cp zd1201.fw /lib/firmware/2.6.22-14-generic/

Finally I extracted and reattached the usb wifi adapter.

and dmesg gives :

[18589.160000] usb 1-1: new full speed USB device using uhci_hcd and address 7

[18632.704000] usb 1-1: new full speed USB device using uhci_hcd and address 8

[18632.868000] usb 1-1: configuration #1 chosen from 1 choice

[18633.448000] usb 1-1: wlan0: ZD1201 USB Wireless interface

[18635.540000] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

And now it becomes visible in the network manager

Revision history for this message
Tim Gardner (timg-tpi) wrote :

Zydas support is much improved in 2.6.24. Please try the upcoming Hardy alpha 5 release.

Changed in linux-source-2.6.22:
assignee: timg-tpi → nobody
status: In Progress → Won't Fix
Revision history for this message
Djainette (djainette) wrote :

Is that the way you people deal with a simple bug with a known fix ? Let it rot for 6 months hoping the next release will fix it ? We've been stuck all this time, a kernel update has been released two days ago, you just had to swap two lines, and you let us with our kernel panics ?
Wow, incredible.

Revision history for this message
pype (pype-1999-geo) wrote :

i'd be releasing this if i only knew how to make a debian package and share it with the world.

Well, anyhow, here's a recompiled zd1201.ko module for the default gutsy kernel reusing local configuration (dual core, just in case). It still needs testing, but it seems not to crash as the default driver did.

Install in /lib/modules/2.6.22-14-generic/kernel/drivers/net/wireless/ and make sure you have fresh firmware files (available on http://linux-lc100020.sourceforge.net/, to be installed in /lib/firmware/2.6.22-14-generic/)

2.6.22-14-generic/kernel/drivers/net/> md5sum wireless/zd12*
5e109dc87a1fa80d7c67834ce0d7a11c wireless/zd1201.ko
0ed15b4dab3e4f52f978a031ae102e02 wireless/zd1201.ko.original

(i'd suggest that you *don't* replace your wireless/zd1201.ko unless with mine unless you happen to have the same md5 as wireless/zd1201.ko.original)

Revision history for this message
pype (pype-1999-geo) wrote :

confirming success of the above replacement kernel module. It works and no longer crash the system. It'll be mirorred here : http://www.run.montefiore.ulg.ac.be/~martin/resources/zd1201.ko

(just in case)

Revision history for this message
Tuxedo (heinera) wrote :

Imagine: Last time I used unix was in 1992. Now, I have an 8 year old PC that I have been using as a printer server for my little family network at home here in Oslo. It was running win98, and even with nothing more to do than spooling print jobs, it never managed to run more than a couple of days before it crashed completely. I vaguely remembered the typical 200+ days continuous uptime of my 92 unix workstation, and decided to install ubuntu on the box.

Everything went extremely smooth (jee, unix has evolved for the last 15 years), until I plugged in the Sparklan usb wifi adapter. I guess it's called kernel panic these days. I could see that this problem was deep indeed, and considered it a bit of an unfair slap to deliver to a newbee.

So, with severely outdated unix experience and two hours of googling, I find pype's post, only hours old. His fix solved the problem completely.

Thanks, pype!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.