Discussion:
[Orinoco-users] question
Dylan Cristiani
2006-09-28 10:53:15 UTC
Permalink
i've downloaded the orinoco-fwutils-0.2 and used get_symbol_firmware
script; i'm using symbol
wilreless networker la4137 copact flash over a mainstone like dev.
platform (pxa270 based)
with linux kernel 2.6.17 and i use the module spectrum_cs.ko that is in
kernel mainline.
the orinoco utility i used generated three files:

symbol_sp24t_prim_fw (4.584 byte)
symbol_sp24t_sec_fw (71.798 byte)
spectrum_fw.h

i putted the first 2 into the hotplug directory into target filesystem but
the module fails
with message:
spectrum_cs: Primary firmware download failed
spectrum_cs: Firmware download failed

as the image was wrong or corrupted, where i'm wrong ?
and the file spectrum_fw.h is useful ? where i have to use or put ?

thanks

dylan
Pavel Roskin
2006-10-01 06:32:11 UTC
Permalink
Hello!
Post by Dylan Cristiani
i putted the first 2 into the hotplug directory into target filesystem
but the module fails
spectrum_cs: Primary firmware download failed
spectrum_cs: Firmware download failed
as the image was wrong or corrupted, where i'm wrong ?
You are wrong in assuming that you are wrong. Sometimes other people
may be wrong too.

It's a bug in Linux 2.6.17. It's fixed in Linux 2.6.18 and 2.6.17.13.
Post by Dylan Cristiani
and the file spectrum_fw.h is useful ? where i have to use or put ?
Generally, if the documentation doesn't say that you need to put it
somewhere, then don't do it. If things don't work, then describe the
problem, and the documentation will be fixed as needed.

In this case, the driver wasn't working because of a bug in the code.

spectrum_fw.h was used by older versions of the driver to link the
firmware into the driver. This functionality has been removed from the
driver.
--
Regards,
Pavel Roskin
Dylan Cristiani
2006-10-02 07:36:26 UTC
Permalink
Post by Pavel Roskin
Hello!
Post by Dylan Cristiani
i putted the first 2 into the hotplug directory into target filesystem
but the module fails
spectrum_cs: Primary firmware download failed
spectrum_cs: Firmware download failed
as the image was wrong or corrupted, where i'm wrong ?
You are wrong in assuming that you are wrong. Sometimes other people
may be wrong too.
It's a bug in Linux 2.6.17. It's fixed in Linux 2.6.18 and 2.6.17.13.
Post by Dylan Cristiani
and the file spectrum_fw.h is useful ? where i have to use or put ?
Generally, if the documentation doesn't say that you need to put it
somewhere, then don't do it. If things don't work, then describe the
problem, and the documentation will be fixed as needed.
In this case, the driver wasn't working because of a bug in the code.
spectrum_fw.h was used by older versions of the driver to link the
firmware into the driver. This functionality has been removed from the
driver.
--
Regards,
Pavel Roskin
Tks a million Pavel, i'm usual to first doubt regarding my stuff (i'm not
so
linux expert yet), then in others.
Just more question: i've a bit amount of custom patches to fit main linux
kernel into my custom board, so can you be so kind to tell me which files
are
affected by the bug (i.e there is a specific patch) so i could patch my
2.6.17
kernel manually?

tks again

dylan
Pavel Roskin
2006-10-03 08:19:28 UTC
Permalink
Hello, Dylan!
Post by Dylan Cristiani
Tks a million Pavel, i'm usual to first doubt regarding my stuff (i'm
not so
linux expert yet), then in others.
Just more question: i've a bit amount of custom patches to fit main linux
kernel into my custom board, so can you be so kind to tell me which
files are
affected by the bug (i.e there is a specific patch) so i could patch
my 2.6.17
kernel manually?
I think it would be much better to apply the whole patch. After all,
it's kept to the minimum so that only critical fixed are included. I
would be surprised it if interferes with any board specific patches.
And if it does, perhaps you should check your patches.

But if you insist on patching only the files affected by this bug, it's
not so hard to find out. After all, only two files from
drivers/net/wireless are affected, and one of then is obviously for
Broadcom. The other is drivers/net/wireless/spectrum_cs.c
--
Regards,
Pavel Roskin
Dylan Cristiani
2006-10-03 08:40:16 UTC
Permalink
Post by Pavel Roskin
Hello, Dylan!
Post by Dylan Cristiani
Tks a million Pavel, i'm usual to first doubt regarding my stuff (i'm
not so
linux expert yet), then in others.
Just more question: i've a bit amount of custom patches to fit main
linux
kernel into my custom board, so can you be so kind to tell me which
files are
affected by the bug (i.e there is a specific patch) so i could patch
my 2.6.17
kernel manually?
I think it would be much better to apply the whole patch. After all,
it's kept to the minimum so that only critical fixed are included. I
would be surprised it if interferes with any board specific patches.
And if it does, perhaps you should check your patches.
But if you insist on patching only the files affected by this bug, it's
not so hard to find out. After all, only two files from
drivers/net/wireless are affected, and one of then is obviously for
Broadcom. The other is drivers/net/wireless/spectrum_cs.c
--
Regards,
Pavel Roskin
Hi Pavel, i succeded to patch only the wireless drivers (hermes.c,.h
orinoco.c,.h
and spectrum_cs.c) now it seems that it works because when i insmod the
modules hermes.ko orinoco.ko and spectrum_cs.ko i get no error messages
and
the led into the wifi card starts to blink.
Now i've the problem that it seems that the file /etc/pcmcia/wireless.opts
isn't processed at all, so when i 'iwconfig eth0' i cant se parameters i
putted
in this file (for instance the essid number); probably i dont know the
various
steps taken loading the wireless modules and which config file are
affected or
how to tell the configuration file to manage: maybe the module doesn't
parse the
file wireless.opts or it is looking for another similar file that i don't
know;
can you help me ?

tks
dylan
Pavel Roskin
2006-10-03 08:59:10 UTC
Permalink
Hi Pavel, i succeded to patch only the wireless drivers (hermes.c,.h orinoco.c,.h
and spectrum_cs.c) now it seems that it works because when i insmod the
modules hermes.ko orinoco.ko and spectrum_cs.ko i get no error messages and
the led into the wifi card starts to blink.
Now i've the problem that it seems that the file /etc/pcmcia/wireless.opts
isn't processed at all, so when i 'iwconfig eth0' i cant se parameters i putted
in this file (for instance the essid number); probably i dont know the various
steps taken loading the wireless modules and which config file are affected or
how to tell the configuration file to manage: maybe the module doesn't parse the
file wireless.opts or it is looking for another similar file that i don't know;
can you help me ?
wireless.opts has been obsolete since Linux 2.6.13. It was parsed by
cardmgr. Kernel modules generally don't parse any text files.
--
Regards,
Pavel Roskin
Dylan Cristiani
2006-10-03 09:35:40 UTC
Permalink
Post by Pavel Roskin
Post by Dylan Cristiani
Hi Pavel, i succeded to patch only the wireless drivers (hermes.c,.h
orinoco.c,.h
Post by Pavel Roskin
Post by Dylan Cristiani
and spectrum_cs.c) now it seems that it works because when i insmod the
modules hermes.ko orinoco.ko and spectrum_cs.ko i get no error messages
and
Post by Pavel Roskin
Post by Dylan Cristiani
the led into the wifi card starts to blink.
Now i've the problem that it seems that the file
/etc/pcmcia/wireless.opts
Post by Pavel Roskin
Post by Dylan Cristiani
isn't processed at all, so when i 'iwconfig eth0' i cant se parameters
i putted
Post by Pavel Roskin
Post by Dylan Cristiani
in this file (for instance the essid number); probably i dont know the
various
Post by Pavel Roskin
Post by Dylan Cristiani
steps taken loading the wireless modules and which config file are
affected or
Post by Pavel Roskin
Post by Dylan Cristiani
how to tell the configuration file to manage: maybe the module doesn't
parse the
Post by Pavel Roskin
Post by Dylan Cristiani
file wireless.opts or it is looking for another similar file that i
don't know;
Post by Pavel Roskin
Post by Dylan Cristiani
can you help me ?
wireless.opts has been obsolete since Linux 2.6.13. It was parsed by
cardmgr. Kernel modules generally don't parse any text files.
--
Regards,
Pavel Roskin
I didn't know that, so how can i tell cardmgr the parameters of my network
(essid
and so on)? moreover, when i run cardmgr i get:

pcmcia: Detected deprecated PCMCIA ioctl usage from process: cardmgr.
pcmcia: This interface will soon be removed from the kernel; please expect
break
age unless you upgrade to new tools.
pcmcia: see
http://www.kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html for
details.
cardmgr[268]: watching 1 socket
cardmgr[268]: could not adjust resource: IO ports 0xc00-0xcff: Function
not impl
emented
cardmgr[268]: could not adjust resource: IO ports 0x800-0x8ff: Function
not impl
emented
cardmgr[268]: could not adjust resource: IO ports 0x100-0x4ff: Function
not impl
emented
cardmgr[268]: could not adjust resource: memory 0xc0000-0xfffff: Function
not im
plemented
cardmgr[268]: could not adjust resource: memory 0x60000000-0x60ffffff:
Function
not implemented
cardmgr[268]: could not adjust resource: memory 0xa0000000-0xa0ffffff:
Function
not implemented
cardmgr[268]: could not adjust resource: IO ports 0xa00-0xaff: Function
not impl
emented
[***@Linux /]#
[***@Linux /]#cardmgr[269]: unsupported card in socket 0
cardmgr[269]: product info: "Symbol", "Spectrum24 LA4100 Series WLAN PC
Card",
"1.00"
cardmgr[269]: manfid: 0x026c, 0x0001 function: 6 (network)

is this a problem ?

tks a million

dylan
Pavel Roskin
2006-10-03 22:31:22 UTC
Permalink
Post by Dylan Cristiani
I didn't know that, so how can i tell cardmgr the parameters of my
network (essid
You cannot. And it has never worked this way. cardmgr is unaware of
the wireless side of the driver. It's responsible for the PCMCIA part
only.

The wireless parameters are set by wireless tools. Please do your own
research before asking questions.
Post by Dylan Cristiani
cardmgr[269]: product info: "Symbol", "Spectrum24 LA4100 Series WLAN
PC Card",
"1.00"
cardmgr[269]: manfid: 0x026c, 0x0001 function: 6 (network)
is this a problem ?
Only if you need to use cardmgr. You don't have an entry matching the
card in /etc/pcmcia/config.
--
Regards,
Pavel Roskin
Dylan Cristiani
2006-10-16 13:37:55 UTC
Permalink
Post by Pavel Roskin
Post by Dylan Cristiani
I didn't know that, so how can i tell cardmgr the parameters of my
network (essid
You cannot. And it has never worked this way. cardmgr is unaware of
the wireless side of the driver. It's responsible for the PCMCIA part
only.
The wireless parameters are set by wireless tools. Please do your own
research before asking questions.
Post by Dylan Cristiani
cardmgr[269]: product info: "Symbol", "Spectrum24 LA4100 Series WLAN
PC Card",
"1.00"
cardmgr[269]: manfid: 0x026c, 0x0001 function: 6 (network)
is this a problem ?
Only if you need to use cardmgr. You don't have an entry matching the
card in /etc/pcmcia/config.
--
Regards,
Pavel Roskin
Hi Pavel, i still have troubles, because again when i try to load the
module
spectrum_cs (after loading hermes and orinoco) it says that it cannot
find the symbol_24t_prim_fw, also if this is in the /lib/firmware
directory
and in the /sbin/hotplug script i set the HOTPLUG_FW_DIR to point to
/lib/firmware; the script file is like this

#!/bin/sh
# Both $DEVPATH and $FIRMWARE are already provided in the environment.

HOTPLUG_FW_DIR=/lib/firmware

if test "$SUBSYSTEM" = "firmware" -a "$ACTION" = "add"; then
if test -f $HOTPLUG_FW_DIR/$FIRMWARE; then
echo \'$DEVPATH\' >/tmp/hotplug_debug
echo \'$FIRMWARE\' >>/tmp/hotplug_debug
ll $HOTPLUG_FW_DIR/$FIRMWARE >>/tmp/hotplug_debug
ll /sys/$DEVPATH >>/tmp/hotplug_debug
sleep 1
echo -n 1>/sys/$DEVPATH/loading
sleep 1
cat $HOTPLUG_FW_DIR/$FIRMWARE >/sys/$DEVPATH/data
echo -n 0>/sys/$DEVPATH/loading
fi
fi

to be honest i've no real need to have hotplug because the card is always
present or always absent, but i've searched through a lot of documentation
on pcmcia and wireless tools but i didn't get the point: my problem is
simple
(not so simple to me): wi-fi card over compact flash interface: the pccard

interface is compiled into kernel while wireless modules are loaded
manually
after booting; i dont' need hotplug but the way to make the wi-fi card to
work:
currently it fails downloading the firmware (it seems to me that the
driver
instead of performing $ACTION 'add' try to perform $ACTION 'remove' as i
can
read in the debug file hotplug_debug); i didnt' find out how to make the
wi-fi
system running also without hotplug; can you help me suggesting some
documentation (maybe i can specify the firmware directory directly into
spectrum_cs.c
source file?).
Hope this is not too much off topic here.
thanks

dylan
Pavel Roskin
2006-10-16 17:56:14 UTC
Permalink
Hello!
Post by Dylan Cristiani
to be honest i've no real need to have hotplug because the card is always
present or always absent, but i've searched through a lot of
documentation
on pcmcia and wireless tools but i didn't get the point: my problem is
simple
(not so simple to me): wi-fi card over compact flash interface: the pccard
interface is compiled into kernel while wireless modules are loaded
manually
after booting; i dont' need hotplug but the way to make the wi-fi card
I'll appreciate if you write this in plain text without HTML, in
separate sentences and with proper capitalization. It's very hard to
read as it's written, and my mail client cannot quote HTML properly.
Post by Dylan Cristiani
currently it fails downloading the firmware (it seems to me that the
driver
instead of performing $ACTION 'add' try to perform $ACTION 'remove' as
i can
read in the debug file hotplug_debug);
You are describing your interpretation without giving others the facts
you base your interpretation on. You posted the script with debug
commands, but not the results of those commands. And since you used the
same file for all actions, you may be looking at the last action, which
may be "remove".
Post by Dylan Cristiani
i didnt' find out how to make the wi-fi
system running also without hotplug; can you help me suggesting some
documentation (maybe i can specify the firmware directory directly
into spectrum_cs.c
source file?).
The firmware directory cannot be hardcoded into the driver. I have no
evidence that it would help, because that path is already hardcoded into
your hotplug script.

I actually tried your script, and it's working for me (Fedora Core 6
with Linux 2.6.18), except that "ll" had to be replaced with "ls -al".

If you are not too constrained by the space requirements, you may want
to use current version of udev instead of hotplug. Hotplug is no longer
maintained.
--
Regards,
Pavel Roskin
Dylan Cristiani
2006-10-17 07:33:28 UTC
Permalink
Post by Pavel Roskin
Hello!
Post by Dylan Cristiani
to be honest i've no real need to have hotplug because the card is
always
present or always absent, but i've searched through a lot of
documentation
on pcmcia and wireless tools but i didn't get the point: my problem is
simple
(not so simple to me): wi-fi card over compact flash interface: the
pccard
interface is compiled into kernel while wireless modules are loaded
manually
after booting; i dont' need hotplug but the way to make the wi-fi card
I'll appreciate if you write this in plain text without HTML, in
separate sentences and with proper capitalization. It's very hard to
read as it's written, and my mail client cannot quote HTML properly.
I'm really sorry but i've lotus notes that is very silly mail client
so i can't do quite anything, but formatting the strings manually
Post by Pavel Roskin
Post by Dylan Cristiani
currently it fails downloading the firmware (it seems to me that the
driver
instead of performing $ACTION 'add' try to perform $ACTION 'remove' as
i can
read in the debug file hotplug_debug);
You are describing your interpretation without giving others the facts
you base your interpretation on. You posted the script with debug
commands, but not the results of those commands. And since you used the
same file for all actions, you may be looking at the last action, which
may be "remove".
You are right here my current file hotplug:

#!bin/sh

HOTPLUG_FW_DIR=/lib/firmware
echo \'$HOTPLUG_FW_DIR/$FIRMWARE\'>/tmp/hotplug_debug
echo \'$DEVPATH\'>>/tmp/hotplug_debug
echo \'$FIRMWARE\'>>/tmp/hotplug_debug
echo \'$1\'>>/tmp/hotplug_debug
echo \'$ACTION\'>>/tmp/hotplug_debug

if test "$1" = "firmware" -a "$ACTION" = "add";then
ls -l $HOTPLUG_FW_DIR/$FIRMWARE>>/tmp/hotplug_debug
ls -l /sys/$DEVPATH>>/tmp/hotplug_debug
if test -f $HOTPLUG_FW_DIR/$FIRMWARE; then
sleep 1
cat value-1>/sys/$DEVPATH/loading
sleep 1
cat $HOTPLUG_FW_DIR/$FIRMWARE>/sys/$DEVPATH/data
cat value-0>/sys/$DEVPATH/loading
else
cat value--1>/sys/$DEVPATH/loading
fi
fi


here the console output when i modprobe spectrum_cs:

spectrum_cs: Cannot find firmware: symbol_sp24t_prim_fw
spectrum_cs: Firmware download failed
hermes @ c4800000: Timeout waiting for card to reset (reg=0x0000)!
eth0: failed to initialize firmware (err = -110)
spectrum_cs: register_netdev() failed


and finally here the debug file /tmp/hotplug_debug:

'/lib/firmware/symbol_sp24t_prim_fw'
'/class/firmware/0.0'
'symbol_sp24t_prim_fw'
'firmware'
'remove'
Post by Pavel Roskin
Post by Dylan Cristiani
i didnt' find out how to make the wi-fi
system running also without hotplug; can you help me suggesting some
documentation (maybe i can specify the firmware directory directly
into spectrum_cs.c
source file?).
The firmware directory cannot be hardcoded into the driver. I have no
evidence that it would help, because that path is already hardcoded into
your hotplug script.
It was just a (stupid) question fearing that the firmware directory
declared in my hotplug script wasn't processed the right way for some
reason
Post by Pavel Roskin
I actually tried your script, and it's working for me (Fedora Core 6
with Linux 2.6.18), except that "ll" had to be replaced with "ls -al".
If you are not too constrained by the space requirements, you may want
to use current version of udev instead of hotplug. Hotplug is no longer
maintained.
I'm using a dev. platform similar to mainstone II with pxa270 to buid
an embedded device so i think that i've some space saving requirements
(i've about 13MB of flash memory for the whole filesystem)
Post by Pavel Roskin
--
Regards,
Pavel Roskin
thanks
dylan
Pavel Roskin
2006-10-20 22:27:00 UTC
Permalink
Hello!
Post by Dylan Cristiani
'/lib/firmware/symbol_sp24t_prim_fw'
'/class/firmware/0.0'
'symbol_sp24t_prim_fw'
'firmware'
'remove'
You may want to add PID to the filename or insert separators in the
output and never truncate the log.

Judging from my experiment, it looks like primary firmware is requested
with "pcmcia" "add" and the secondary firmware is requested with
"firmware" "add". It's working for me because I'm using udev in
addition to your hotplug script. Your script ignores "pcmcia" events.

This looks like a real problem that can be reproduced. Requests for
primary and secondary firmware should be identical except the filename.
I don't see anything obviously wrong in the driver.
--
Regards,
Pavel Roskin
Dylan Cristiani
2006-10-23 07:36:03 UTC
Permalink
Post by Pavel Roskin
Hello!
Post by Dylan Cristiani
'/lib/firmware/symbol_sp24t_prim_fw'
'/class/firmware/0.0'
'symbol_sp24t_prim_fw'
'firmware'
'remove'
You may want to add PID to the filename or insert separators in the
output and never truncate the log.
Judging from my experiment, it looks like primary firmware is requested
with "pcmcia" "add" and the secondary firmware is requested with
"firmware" "add". It's working for me because I'm using udev in
addition to your hotplug script. Your script ignores "pcmcia" events.
This looks like a real problem that can be reproduced. Requests for
primary and secondary firmware should be identical except the filename.
I don't see anything obviously wrong in the driver.
--
Regards,
Pavel Roskin
Do you think that the 'firmware' 'remove' action is because the whole
operation failed ? Here's the untruncate the log file (the thing that
sounds strange to me is that it says that he couldn't find primary
firmware also if it's in the lib/firmware directory as stated
in the hotplug script):

[***@Linux /]#cat tmp/hotplug_debug
'/class/vc/vcsa2'
''
'vc'
'add'

'/module/hermes'
''
'module'
'add'

'/module/orinoco'
''
'module'
'add'

'/module/spectrum_cs'
''
'module'
'add'

'/bus/pcmcia/drivers/spectrum_cs'
''
'drivers'
'add'

'/class/firmware/0.0'
'symbol_sp24t_prim_fw'
'firmware'
'add'
-rw-r--r-- 1 root root 4584 Oct 9 2006 /lib/firmware/
symbol_sp24t_prim_fw
-rw-r--r-- 1 root root 0 Jan 1 00:03 data
lrwxrwxrwx 1 root root 0 Jan 1 00:03 device -> ../
../../devices/platform/pxa2xx-pcmcia/0.0
-rw-r--r-- 1 root root 4096 Jan 1 00:03 loading
--w------- 1 root root 4096 Jan 1 00:03 uevent

'/class/firmware/0.0'
'symbol_sp24t_prim_fw'
'firmware'
'remove'

and here's the output i get:

spectrum_cs: Cannot find firmware: symbol_sp24t_prim_fw
spectrum_cs: Firmware download failed
eth0: failed to initialize firmware (err = -16)
spectrum_cs: register_netdev() failed

Loading...