lkml.org 
[lkml]   [2004]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectHow to generate hotplug events in drivers?
-----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-----
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.058 / U:0.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site