From: Olaf Hering <olh@suse.de>
To: linux-hotplug@vger.kernel.org
Subject: pci coldplug
Date: Wed, 05 Nov 2003 21:43:47 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-106806874232064@msgid-missing> (raw)
Hello,
what is the purpose of pci_boot_events() in pci.rc? I mean, how can that
ever work in the current cvs? I did it that way and it appears to work
ok for a 2.4 kernel (probably also for 2.6):
pci_boot_events ()
{
if [ ! -x /sbin/lspci -o ! -f /proc/bus/pci/devices -o ! -x pci.agent ]; then
echo $"** can't synthesize pci hotplug events"
return
fi
# these notifications will be handled by pcimodules
/sbin/lspci -nm | sed 's/"//g' | while read pci_data ; do
set - $pci_data
: pci_slot=$1
: pci_class=$3
: pci_vendor=$4
: pci_device=$5
: pci_revision=$6
: pci_svendor=$7
: pci_sdevice=$8
# make sure the pci agent will run
ACTIONd
PCI_CLASS=$3
PCI_ID=$4:$5
PCI_SLOT=$1
if [ "$pci_svendor" = "" ] ; then
PCI_SUBSYS_ID=0:0
else
PCI_SUBSYS_ID=$7:$8
fi
export ACTION PCI_CLASS PCI_ID PCI_SLOT PCI_SUBSYS_ID
echo ACTION=$ACTION PCI_CLASS=$PCI_CLASS PCI_ID=$PCI_ID PCI_SLOT=$PCI_SLOT PCI_SUBSYS_ID=$PCI_SUBSYS_ID /sbin/hotplug-beta pci
env -i - ACTION=$ACTION PCI_CLASS=$PCI_CLASS PCI_ID=$PCI_ID PCI_SLOT=$PCI_SLOT PCI_SUBSYS_ID=$PCI_SUBSYS_ID /sbin/hotplug-beta pci
done
}
I ran into one problem with ohci1394 and I cant find an answer:
an OHCI controller has PCI class 0x0c00. The modules.pcimap entry is
generated via this define in ohci1394.c:
#define PCI_CLASS_FIREWIRE_OHCI ((PCI_CLASS_SERIAL_FIREWIRE << 8) | 0x10)
Why is there a '| 0x10'? How can this line of code in pci.agent ever
match?
if [ $class_temp -eq $class ]; then
$class comes from the modules.pcimap, pci_class from the hotplug event.
I have looked for the kernel event env variable $PCI_CLASS.
This is a %04X in run_sbin_hotplug() in drivers/pci/pci.c, the comment in
%pci.agent states it is a %06X (which would make sense, but where is the
lowbyte filled?)
Maybe I got that all wrong, I cant see how the current code is supposed
to load drivers at boot time. 2.4 does somehow work with the pcimodules
binary which is shipped by some distros, but this doesnt work at all for
2.6.
What is supposed to happen in pci.rc?
--
USB is for mice, FireWire is for men!
sUse lINUX ag, nÜRNBERG
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next reply other threads:[~2003-11-05 21:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-05 21:43 Olaf Hering [this message]
2003-11-05 23:19 ` pci coldplug Olaf Hering
2003-11-11 20:23 ` Olaf Hering
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=marc-linux-hotplug-106806874232064@msgid-missing \
--to=olh@suse.de \
--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).