Bug 211673

Summary: could not load firmware file zd1211/zd1211_ub
Product: [Fedora] Fedora Reporter: ericm24x7
Component: kernelAssignee: Bill Nottingham <notting>
Status: CLOSED DUPLICATE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: davej, linville, perja, rvokal, wtogami
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-03-07 20:43:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description ericm24x7 2006-10-20 18:54:27 UTC
Description of problem:
zd1211rw firmware module could not be loaded. However, if I download and install
the latest firmware snapshot from the primary developer of zd1211rw everything
works OK. 

http://zd1211.ath.cx/wiki/DriverRewrite

Version-Release number of selected component (if applicable):
kernel-xen.x86_64 2.6.18-1.2798.fc6xen

How reproducible:
persistent

Steps to Reproduce:
1. install a USB wireless stick (Zydas zd1211 chipset)
2. reboot system
3. run dmesg to make sure zd1211 module is loaded successfully
  
Actual results:

ieee80211_crypt: unregistered algorithm 'NULL'
ieee80211_crypt: registered algorithm 'NULL'
ieee80211: 802.11 data/management/control stack, git-1.1.13
ieee80211: Copyright (C) 2004-2005 Intel Corporation <jketreno.com>
usb 3-1: Could not load firmware file zd1211/zd1211_ub. Error number -2
zd1211rw 3-1:1.0: couldn't load firmware. Error number -2
usb 3-1: reset high speed USB device using ehci_hcd and address 2
zd1211rw: probe of 3-1:1.0 failed with error -2
usbcore: registered new driver zd1211rw

Expected results:

the output of dmesg should display successful loading of zd1211rw firmware

Additional info:

Here is the latest snapshot of the zd1211rw modules/firmware written by the
primary developer:

http://www.deine-taler.de/zd1211/snapshots/

Comment 1 ericm24x7 2006-10-20 21:01:54 UTC
For the mmodule zd1211rw.ko to be functional I think the firmware files are
supposed to be loaded at the following directory:
/lib/firmware/zd1211

The firmware files are:
zd1211_ub
zd1211_uph
zd1211_uphm
zd1211_uphr
zd1211_ur


Comment 2 John W. Linville 2006-11-27 12:42:57 UTC
That firmware can't be distributed with Fedora.  You will just have to 
download it.  I'm sorry.

Comment 3 Per Thomas Jahr 2006-11-27 12:55:33 UTC
Why?

From release notes: (http://sourceforge.net/project/
shownotes.php?group_id=129083&release_id=434066)

"The files are generated from C header files distributed in the original ZyDAS 
ZD1211 driver under the GNU Public License."

Comment 4 John W. Linville 2006-11-27 13:10:00 UTC
Hmmm...OK, I thought they were ripping the firmware from binaries.  I'll look 
into it a bit closer.

Comment 6 ericm24x7 2006-11-29 01:16:21 UTC
John,
I assumed ZD1211rw driver was completely re-written under GPL too. If you have
further questions, maybe you can contact the 2 primary developers of the re-write:

Daniel Drake <dsd>
Ulrich Kunitz <kune>



Comment 7 John W. Linville 2006-11-29 18:23:10 UTC
But this isn't about the driver, it is about the firmware.

Comment 8 ericm24x7 2006-12-03 22:37:15 UTC
According to the README(1) file:

http://www.deine-taler.de/zd1211/snapshots/zd1211rw_fw_2006-12-03.tar.bz2

it seems that the vendor permits redistribution of zd1211 firmware under GPL.
Does Fedora have specific requirement(s) in order to include firmware in its
distribution?

eric
=============
README(1) 
The program create_fw_files creates the firmware files for the
ZD1211 chip, which is used in WLAN USB sticks. Copy these files to
/lib/firmware/zd1211, where it can be loaded by the rewritten
zd1211 driver. The programm is distributed under the GNU Public
License. See the file COPYING.

The files are generated from C header files distributed in the
original Linux ZD1211 driver under the GNU Public License by
ZyDAS, which allows us to distribute parts of this work separately
in source code. 

The full source of the original ZYDAS driver is available from
http://www.deine-taler.de/zd1211/

Comment 9 John W. Linville 2006-12-04 21:38:00 UTC
The GPL requires that source code must be made available, and that "source 
code for a work means the preferred form of the work for making modifications 
to it".  It is not at all obvious to me that "char arrays of hex values in a 
header file" is actually the preferred form of the work for modifications.

If you choose to view the firmware as a pure binary, then the Fedora packaging 
guidelines have a stipulation for binary firmware that requires "Explicit 
permission is given by the owner to freely distribute without restrictions 
(this permission must be included, in "writing", with the files in the 
packaging)".  One might argue that including the hex representation of the 
binary firmware in a header file licensed under the GPL would fulfill this 
requirement, but I'm not 100% sure.

How do you respond?

Comment 10 Per Thomas Jahr 2006-12-05 08:44:42 UTC
I see - tricky. 

Would it take much to get an explicit permission from the owner?

Anyway, it seems that help is on it's way (ZD1211 open firmware project): 
http://sourceforge.net/mailarchive/message.php?msg_id=37237553


Comment 12 Bill Nottingham 2006-12-20 16:46:32 UTC
So, we have an exception in Fedora for shipping firmware, so it would be OK at
first glance.

However, if they only provide binaries under the GPL, that's a contradictory
license, which means we can't ship it. :)

Let me investigate this some more.

Comment 13 Bill Nottingham 2006-12-20 17:00:46 UTC
I've downloaded the tarball. It's just an array of bytes, which is the same form
we've been shipping compiled-in qlogic firmware since the dawn of time. 

So, works for me.

Comment 14 ericm24x7 2006-12-20 19:22:28 UTC
(In reply to comment #9)
> The GPL requires that source code must be made available, and that "source 
> code for a work means the preferred form of the work for making modifications 
> to it".  It is not at all obvious to me that "char arrays of hex values in a 
> header file" is actually the preferred form of the work for modifications.

It is not unusual for firmware to be modified through hex editor. Beside it's
less disruptive than recompiling an assembly or higher language source codes due
to added variability in compiler tool(s).

Since "preferred form" was not narrowly defined by GPL, Fedora can technically
accept the firmware unless the vendor specifically prohibit re-distributions of
their software, which would then violate the GPL contract.
 
> If you choose to view the firmware as a pure binary, then the Fedora packaging 
> guidelines have a stipulation for binary firmware that requires "Explicit 
> permission is given by the owner to freely distribute without restrictions 
> (this permission must be included, in "writing", with the files in the 
> packaging)".  One might argue that including the hex representation of the 
> binary firmware in a header file licensed under the GPL would fulfill this 
> requirement, but I'm not 100% sure.

As stated in writing in the README file and accompanied source files, the parts
(firmware under hex format) has been released under GPL, which I believed,
enough to satisfy the Fedora packaging guidelines for re-distribution.

Here is my thought in favor of firmware inclusion:
* It's under user mode rather than kernel mode; thus, we can easily remove the
firmware module with less likely to affect (bring down) the linked kernel.
* The way to gain influence in having vendors to open up their source codes more
would be to gain market share of linux users. We gain market share of linux
users by making their accompanied peripheral devices to "Just Works". These
users have the potential to become powerful evangelists to further encourage
vendors to open up and released their software code under GPL. 
* At least we have workable solution while other options (reversed engineer,
total re-write, etc...) are actively being pursued.

Comment 15 Per Thomas Jahr 2007-03-06 20:16:21 UTC
This seems to still be a issue in FC7 test 2 live cd. Will it be possible to get
the firmware in for FC7?

Output from dmesg:

usb 5-1.3: new full speed USB device using uhci_hcd and address 6
usb 5-1.3: not running at top speed; connect to a high speed hub
usb 5-1.3: configuration #1 chosen from 1 choice
usb 5-1.3: reset full speed USB device using uhci_hcd and address 6
usb 5-1.3: Could not load firmware file zd1211/zd1211_ub. Error number -2
zd1211rw_d80211 5-1.3:1.0: couldn't load firmware. Error number -2
usb 5-1.3: reset full speed USB device using uhci_hcd and address 6
zd1211rw_d80211: probe of 5-1.3:1.0 failed with error -2
usbcore: registered new interface driver zd1211rw_d80211
ieee80211_crypt: registered algorithm 'NULL'
ieee80211: 802.11 data/management/control stack, git-1.1.13
ieee80211: Copyright (C) 2004-2005 Intel Corporation <jketreno.com>
usb 5-1.3: reset full speed USB device using uhci_hcd and address 6
usb 5-1.3: Could not load firmware file zd1211/zd1211_ub. Error number -2
zd1211rw 5-1.3:1.0: couldn't load firmware. Error number -2
usb 5-1.3: reset full speed USB device using uhci_hcd and address 6
zd1211rw: probe of 5-1.3:1.0 failed with error -2
usbcore: registered new interface driver zd1211rw


Comment 16 Bill Nottingham 2007-03-07 20:43:18 UTC

*** This bug has been marked as a duplicate of 221675 ***