From: Jason Vas Dias <jason.vas.dias@gmail.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: why does udev-167 break /lib64/udev/firmware ?
Date: Thu, 14 Apr 2011 19:29:24 +0000 [thread overview]
Message-ID: <201104142029.25205.jason.vas.dias@gmail.com> (raw)
In-Reply-To: <201104141753.22335.jason.vas.dias@gmail.com>
corrections - a couple of typos in previous mails:
> I use both elf_x86_64 binaries, which link to /usr/lib64, and elf_i386 binaries,
> which link to /lib64
^- should be '32'
Final scriptlet:
#!/bin/bash
logger "FIRMWARE: $1 $2"
if ! echo "$1" | egrep -q '^--firmware' ; then
logger "FIRMWARE: bad firmware arg: $1";
exit 1;
elif ! echo "$2" | egrep -q '^--devpath' ; then
logger "FIRMWARE: bad devpath arg: $2";
exit 1;
fi
firmware=$1
firmware=${firmware#--firmware=}
devpath=$2
devpath=${devpath#--devpath=}
if [ ! -f /sys/${devpath}/loading ] ; then
logger "FIRMWARE: no loading: /sys/${devpath}/loading";
exit 1;
fi
if [ ! -f /sys/${devpath}/data ] ; then
logger "FIRMWARE: no data: /sys/${devpath}/data";
exit 1;
fi
echo 1 > /sys/${devpath}/loading
cat /lib64/firmware/${firmware} > /sys/${devpath}/data;
# ^-- not 'cp -fp', though this works too
status=$?;
echo 0 > /sys/${devpath}/loading
logger "FIRMWARE: copied /lib64/firmware/$firmware to /sys/${devpath}/loading OK: $status"
exit $status;
#
That libusb message arose when this script was just :
/lib64/udev/firmware.bin "$1" "$2" >/tmp/FW 2>&1;
status=$?;
logger "FIRMWARE STATUS: $status - $(cat /tmp/FW) - LOADING : $(ls -l /sys/devices/pci0000:00/0000:00:06.0/0000:30:00.0/ssb0:0/firmware/ssb0:0/loading)";
rm -f /tmp/FW || : ;
The first time udev calls this with the correct udev arguments, the first line of a message containing the text "libusb main.c:" is emitted.
Then it is called once every 10 seconds or so with NO arguments for around 5 minutes because the binary executable fails .
That's OK, I've submitted a patch to remove the firmware binary and replace with the above script on all udev builds on my system -
I just thought I should let you know and potentially help others with the same issue .
Thanks & Regards,
Jason
next prev parent reply other threads:[~2011-04-14 19:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-14 16:53 why does udev-167 break /lib64/udev/firmware ? Jason Vas Dias
2011-04-14 17:13 ` Kay Sievers
2011-04-14 19:03 ` Jason Vas Dias
2011-04-14 19:29 ` Jason Vas Dias [this message]
2011-04-14 21:26 ` Kay Sievers
2011-04-14 22:56 ` Jason Vas Dias
2011-04-14 23:00 ` Kay Sievers
2011-04-24 19:53 ` Matthias Schwarzott
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201104142029.25205.jason.vas.dias@gmail.com \
--to=jason.vas.dias@gmail.com \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).