-
Hi, Looks like this is a known issue.
https://patchwork.kernel.org/patch/49056/
Does any one if this patch is part of any of the upcoming Knoppix releases? ![Sad](images/smilies/icon_sad.gif)
Thanks,
Krishnaprasad
-
![Quote](images/misc/quote_icon.png)
Originally Posted by
krishnaprasadk
Hi, Please ignore my previous post.
i do see that DEVPATH is the Path under /sys at which this device's sysfs directory can be found. i saw the documentation inside Documentation/firmware_class as well. From there i understood the way kernel is calling the firmware and how it needs to be passed from the user end. per your advise, I've created a script /sbin/hotplug as below:-
#!/bin/sh
echo 1 > /sys/$DEVPATH/loading
cat /lib/firmware/bnx2/$FIRMWARE > /sys/class/firmware/data
echo 0 > /sys/$DEVPATH/loading
Now the firmware is read while loading the module and it fails with an error message as below
firmware 0000:05:00.0: firmware_loading_store: vmap() failed
bnx2: Can't load firmware file "bnx2/bnx2-mips-06-4.6.16.fw"
bnx2: probe of 0000:05:00.0 failed with error -2
I am checking bnx2 driver code on why this failure is seen.
Thanks,
Krishnaprasad
It looks like the issue that i am seeing ( i.e. while loading the bnx2 firmware, vmap() call is failed ) is a known issue. i do see the link as below and it exactly matches the error code that i am seeing.
patchwork.kernel.org/patch/49056/
vmap is called to load the firmware data stored in /lib/firmware/bnx2/$FIRMWARE to the kernel.
Looks like Knoppix is not yet included the fix mentioned in the above link in the kernel that they use. So i compiled ( Changed firmware_class.c in drivers/base ) and created a new bzImage using Live CD but still i face the same error. The error is as below
firmware 0000:05:00.0: firmware_loading_store: vmap() failed
bnx2: Can't load firmware file "bnx2/bnx2-mips-06-4.6.16.fw"
bnx2: probe of 0000:05:00.0 failed with error -2
Any one have faced an error like this?
i am blocked my Knoppix Booting via PXE because of this issue ..
any help will be highly appreciated !
Thank you all for your time !
- Krishnaprasad
-
Senior Member
registered user
![Quote](images/misc/quote_icon.png)
Originally Posted by
krishnaprasadk
Now the firmware is read while loading the module and it fails with an error message as below
firmware 0000:05:00.0: firmware_loading_store: vmap() failed
bnx2: Can't load firmware file "bnx2/bnx2-mips-06-4.6.16.fw"
bnx2: probe of 0000:05:00.0 failed with error -2
I am checking bnx2 driver code on why this failure is seen.
Thanks,
Krishnaprasad
Try this improved script ( still not the best ) :-
Code:
#!/bin/sh
[ -z "$FIRMWARE" ] && exit
echo 1 > /sys/$DEVPATH/loading
cat /lib/firmware/$FIRMWARE > /sys/class/firmware/data
echo 0 > /sys/$DEVPATH/loading
Please, this is not ***NOT*** a kernel bug or something, this is
an ***EXPECTED*** behaviour.
Cheers.
-
Senior Member
registered user
Let me add one more note to this. Between you and a working system, it's just this shell script, how complicated it can be ?
Please don't look any further and it is not any more complicated than this.
-
![Quote](images/misc/quote_icon.png)
Originally Posted by
kl522
Try this improved script ( still not the best ) :-
Code:
#!/bin/sh
[ -z "$FIRMWARE" ] && exit
echo 1 > /sys/$DEVPATH/loading
cat /lib/firmware/$FIRMWARE > /sys/class/firmware/data
echo 0 > /sys/$DEVPATH/loading
Please, this is not ***NOT*** a kernel bug or something, this is
an ***EXPECTED*** behaviour.
Cheers.
Hello,
Sorry if i took a wrong route. I tried the above change that you advised in /sbin/hotplug script, but still bnx2 fails to load the firmware file. I am still seeing the error message:-
firmware_loading_store: vmap() failed
As far as scripting is concerned, no difficulties are there.
since i saw a kernel forum thread which shows the exact error message, i thought of following that. Also in the 6.2 DVD, kernel source is available. There also inside drivers/base, firmware_class.c doesnt have the mutex fix that the forum is suggested to use. so I believed that i am facing the same issue.
Now that the loading of bnx2 firmware still fails with this updated script, could you please advise on how to move forward?
I really appreciate the help that you are providing in this issue !
- Krishnaprasad
-
![Quote](images/misc/quote_icon.png)
Originally Posted by
kl522
Try this improved script ( still not the best ) :-
Code:
#!/bin/sh
[ -z "$FIRMWARE" ] && exit
echo 1 > /sys/$DEVPATH/loading
cat /lib/firmware/$FIRMWARE > /sys/class/firmware/data
echo 0 > /sys/$DEVPATH/loading
Please, this is not ***NOT*** a kernel bug or something, this is
an ***EXPECTED*** behaviour.
Cheers.
okay..my mistake.. instead of sending the bnx2 firmware data ( /path/$FIRMWARE ) to /sys/$DEVPATH/data, i was re-directing it to /sys/class/firmware/data.
Now i corrected that and bootup of Knoppix 6.2 from PXE is successful using NFS share... there is not even requited to check if $FIRMWARE exists or not.
Thanks for all your patience in helping me out on this.
Thank you !
Krishnaprasad
-
Senior Member
registered user
Did you notice that the script initially was
cat /lib/firmware/bnx/$FIRMWARE > /sys/class/firmware/data
and the new script was :-
cat /lib/firmware/$FIRMWARE > /sys/class/firmware/data
Did you try to debug the script by changing it to :-
#!/bin/sh
[ -z "$FIRMWARE" ] && exit
echo 1 > /sys/$DEVPATH/loading
echo "Loading firmware /lib/firmware/$FIRMWARE" >> /tmp/log
cat /lib/firmware/$FIRMWARE > /sys/class/firmware/data
echo 0 > /sys/$DEVPATH/loading
Did you check if there are indeed firmware files in your initrd.gz, which filenames are matching what are needed by the script (as appeared in /tmp/log ) ?
-
![Quote](images/misc/quote_icon.png)
Originally Posted by
kl522
Did you notice that the script initially was
cat /lib/firmware/bnx/$FIRMWARE > /sys/class/firmware/data
and the new script was :-
cat /lib/firmware/$FIRMWARE > /sys/class/firmware/data
Did you try to debug the script by changing it to :-
#!/bin/sh
[ -z "$FIRMWARE" ] && exit
echo 1 > /sys/$DEVPATH/loading
echo "Loading firmware /lib/firmware/$FIRMWARE" >> /tmp/log
cat /lib/firmware/$FIRMWARE > /sys/class/firmware/data
echo 0 > /sys/$DEVPATH/loading
Did you check if there are indeed firmware files in your initrd.gz, which filenames are matching what are needed by the script (as appeared in /tmp/log ) ?
HI, not sure if you have seen the post that i posted before your reply. re-posting the required part.
instead of sending the bnx2 firmware data ( /path/$FIRMWARE ) to /sys/$DEVPATH/data, i was re-directing it to /sys/class/firmware/data.
Here is the final script
#!/bin/sh
#[ -z "$FIRMWARE" ] && exit
echo 1 > /sys/$DEVPATH/loading
cat /lib/firmware/$FIRMWARE > /sys/$DEVPATH/data
echo 0 > /sys/$DEVPATH/loading
I must thank you for your patience in guiding me for getting into a resolution. I really appreciate and sorry for the change in path that i took by seeing the kernel patch
.. My bad analysis ![Razz](images/smilies/icon_razz.gif)
Thanks much !
- Krishnaprasad
-
Senior Member
registered user
Haven't I told you between you and a working system is just this shell script ?
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
![Fanxiang 4TB 2TB 1TB SSD 550MB/s 2.5'' SATA III Internal Solid State Drive lot picture](/store/img/g/pB0AAOSwrbRkIWhk/s-l225/Fanxiang-4TB-2TB-1TB-SSD-550MB-s-2-5-SATA-III-Inte.jpg)
Fanxiang 4TB 2TB 1TB SSD 550MB/s 2.5'' SATA III Internal Solid State Drive lot
$219.99
![Fanxiang SSD 4TB 2TB 1TB PS5 SSD M.2 NVME SSD 7300MBS PCIe 4.0 Solid State Drive picture](/store/img/g/yKsAAOSwNPJlqMdQ/s-l225/Fanxiang-SSD-4TB-2TB-1TB-PS5-SSD-M-2-NVME-SSD-7300.jpg)
Fanxiang SSD 4TB 2TB 1TB PS5 SSD M.2 NVME SSD 7300MBS PCIe 4.0 Solid State Drive
$269.99
![Fanxiang M.2 SATA SSD 2TB 1TB 512GB 256GB SSD Internal M2 Solid State Drive Lot picture](/store/img/g/vt0AAOSwAgVls0tY/s-l225/Fanxiang-M-2-SATA-SSD-2TB-1TB-512GB-256GB-SSD-Inte.jpg)
Fanxiang M.2 SATA SSD 2TB 1TB 512GB 256GB SSD Internal M2 Solid State Drive Lot
$109.99
![Fanxiang 4TB 2TB 1TB SSD 2.5'' SATA III 560MB/s Internal Solid State Drive lot picture](/store/img/g/0dMAAOSw99Zl7sby/s-l225/Fanxiang-4TB-2TB-1TB-SSD-2-5-SATA-III-560MB-s-Inte.jpg)
Fanxiang 4TB 2TB 1TB SSD 2.5'' SATA III 560MB/s Internal Solid State Drive lot
$188.09
![Patriot P210 128GB 256GB 512GB 1TB 2TB 2.5](/store/img/g/RzIAAOSwSZNlN-zB/s-l225/Patriot-P210-128GB-256GB-512GB-1TB-2TB-2-5-SATA-3-.jpg)
Patriot P210 128GB 256GB 512GB 1TB 2TB 2.5" SATA 3 6GB/s Internal SSD PC/MAC Lot
$19.99
![4TB Ssd 870evo Internal Solid State Drive Hard Disk 2.5 Inch Sata SSD For Laptop picture](/store/img/g/mmsAAOSwWEdmhkFQ/s-l225/4TB-Ssd-870evo-Internal-Solid-State-Drive-Hard-Dis.jpg)
4TB Ssd 870evo Internal Solid State Drive Hard Disk 2.5 Inch Sata SSD For Laptop
$37.99
![1080PRO 4TB SSD Solid State Hard Drive Ngff M.2 SSD Gaming Internal Hard Disk picture](/store/img/g/ADkAAOSwHoFmfNEh/s-l225/1080PRO-4TB-SSD-Solid-State-Hard-Drive-Ngff-M-2-SS.jpg)
1080PRO 4TB SSD Solid State Hard Drive Ngff M.2 SSD Gaming Internal Hard Disk
$32.99
![Western Digital 256GB M.2 PCIe NVMe SSD PC SN740 M.2 2280 SDDPNQD-256G-1006 picture](/store/img/g/sC4AAOSwvtdmGzk0/s-l225/Western-Digital-256GB-M-2-PCIe-NVMe-SSD-PC-SN740-M.jpg)
Western Digital 256GB M.2 PCIe NVMe SSD PC SN740 M.2 2280 SDDPNQD-256G-1006
$17.99
![Netac 1TB 2TB 512GB Internal SSD 2.5'' SATA III 6Gb/s Solid State Drive lot picture](/store/img/g/pJUAAOSwFaRkhuj-/s-l225/Netac-1TB-2TB-512GB-Internal-SSD-2-5-SATA-III-6Gb-.jpg)
Netac 1TB 2TB 512GB Internal SSD 2.5'' SATA III 6Gb/s Solid State Drive lot
$119.99
![Netac 2TB 1TB 512GB 240GB Internal SSD 2.5'' SATAIII 6Gb/s Solid State Drive lot picture](/store/img/g/cwcAAOSwaqtme-ms/s-l225/Netac-2TB-1TB-512GB-240GB-Internal-SSD-2-5-SATAIII.jpg)
Netac 2TB 1TB 512GB 240GB Internal SSD 2.5'' SATAIII 6Gb/s Solid State Drive lot
$118.99