All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Glow <sglow@embeddedintelligence.com>
To: linux-kernel@vger.kernel.org
Subject: How to generate hotplug events in drivers?
Date: Thu, 12 Aug 2004 21:52:00 -0400	[thread overview]
Message-ID: <411C1EC0.3010302@embeddedintelligence.com> (raw)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


I'm in the process of porting a device driver from the 2.4 kernel to the
2.6 kernel.  In the older version of the drivers I was using the devfs
system to create the device files.  I've decided to rip this out and
move everything to udev since this seems to be the preferred method now.

The problem I'm having with this port is that I can't get the udev
system to create a device file when I install the module.  As far as I
can tell, no hotplug events are being generated when I insmod the device
driver.  In other respects the driver seems to be loading correctly;
I'm able to request the PCI regions, enable, and start the PCI device,
and allocate a dynamic device major number.  I can also see an entry
create in the /sys/bus/pci/drivers directory.

The device in question is a PCI card of my own design.  Since my system
doesn't actually support hot plugging of PCI cards the card will be in
place from system boot.  Technically then, there is no hot plugging of a
new piece of hardware when I install the driver, the board has been
there since boot time.  Still, the device number has just been
allocated, so it's hard to see how a device file could have been created
before that time.

Should a hotplug event be generated when a new driver is installed for
an existing piece of hardware?

Is there something I need to do in my driver to explicitly generate a
hotplug event?

Please copy my e-mail address with responses.

Thanks,

Steve
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFBHB7ADMBOo/wgA5QRApErAJ0TQMkGEQ9PmyAm1w5uxdFp30PIYACgyVqB
CzQz88Oy7P2vvK5n4SgOhUs=
=xEbx
-----END PGP SIGNATURE-----

             reply	other threads:[~2004-08-13  1:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-13  1:52 Stephen Glow [this message]
2004-08-13  7:06 ` How to generate hotplug events in drivers? Greg KH
2004-08-13 17:09   ` Stephen Glow
2004-08-13 17:23     ` Greg KH

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=411C1EC0.3010302@embeddedintelligence.com \
    --to=sglow@embeddedintelligence.com \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.