linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: MALET JL <malet.jean-luc@laposte.net>
To: linux-hotplug@vger.kernel.org
Subject: pci.rc : coldplug fix
Date: Tue, 23 Dec 2003 15:52:47 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-107219486026474@msgid-missing> (raw)

[-- Attachment #1: Type: text/plain, Size: 419 bytes --]

hello,
 this is the first time I write here :)
I  discovered hotplog recently because devfs is no longer a "standard"
the first thing I tried is coldplug and..... nothing worked..... I 
looked into the sources and find the problem in pci.rc
the pci.rc snapshot included here solve this issue and now coldplug work 
on my pc.
It has the advantage of using only /proc and awk to generate the 
pciID/vendorID
best regards

[-- Attachment #2: pci.rc --]
[-- Type: text/plain, Size: 775 bytes --]

[....]

pci_boot_events ()
{
    #
    # FIXME on 2.5, /sys/bus/pci/devices gives some of this
    # information, and more can be gotten with 'lspci'.
    # don't expect pcimodules to exist!!
    #
    LISTER=`type -p pcimodules`
    if [ "$LISTER" = "" -o ! -f /proc/bus/pci/devices -o ! -x pci.agent ]; then
	    echo $"** can't synthesize pci hotplug events"
	    return
    fi

    # make sure the pci agent will run
    export ACTION=add
    export PCI_CLASS=0
    export PCI_ID=0:0
    export PCI_SLOT=0:0.0
    export PCI_SUBSYS_ID=0:0

    # these notifications will be handled by pcimodules
    gawk -F' ' '{printf("%s:%s\n",toupper(substr($2,0,4)), toupper(substr($2,5,4)) )}' /proc/bus/pci/devices |
    while read PCI_ID; do
	/sbin/hotplug pci
    done
}

[....]

             reply	other threads:[~2003-12-23 15:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-23 15:52 MALET JL [this message]
2003-12-23 16:38 ` pci.rc : coldplug fix MALET JL

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-107219486026474@msgid-missing \
    --to=malet.jean-luc@laposte.net \
    --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).