From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Fri, 25 Aug 2006 14:02:10 +0000 Subject: RE: issues getting I/O device to work with udev.... Message-Id: <1156514530.3597.174.camel@pim.off.vrfy.org> List-Id: References: <20060823222620.GA1164@seberino.org> In-Reply-To: <20060823222620.GA1164@seberino.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Fri, 2006-08-25 at 15:47 +0200, Jan Zwiegers wrote: > > -----Original Message----- > > From: linux-hotplug-devel-bounces@lists.sourceforge.net [mailto:linux- > > hotplug-devel-bounces@lists.sourceforge.net] On Behalf Of Kay Sievers > > Sent: 25 August 2006 03:00 PM > > To: jan@eagle.co.za > > Cc: 'John Thomas'; linux-hotplug-devel@lists.sourceforge.net; 'Ray > > Schumacher'; md@Linux.IT > > Subject: RE: issues getting I/O device to work with udev.... > > > > On Fri, 2006-08-25 at 13:38 +0200, Jan Zwiegers wrote: > > > > > fact that the device gets created under /dev/edredaq/device0-99. > > This > > > > rules > > > > > worked just fine on previous systems, but suddenly it started to > > fail on > > > > > newer distros. > > > > > > > Can you guys maybe point me to a solution? > > > > > > > > Hmm, what exactly is the problem? What suddenly started to fail? > > > > Can you paste the output of 'udevmonitor' when you load the kernel > > > > module? Or the output when connect the USB device, if you only have it > > > > built-in. > > > > > The node /dev/edredaq/device0 never get created, or it does not show up > > in > > > the file system (maybe it's permission / security related). > > Unfortunately I > > > have left work already and cannot do the 'udevmonitor' for you. > > > > Oh, that all sounds very much like you don't use the right driver core > > functions and you create the "dev" file yourself in sysfs. You must use > > the right functions in the kernel and pass the correct dev_t to the > > device registration. That will automatically create the "dev" file and > > add the needed data to the uevent environment, to let udev create the > > node. > > > > But again, to verify this, we need the output of "udevmonitor --env", > > while you plug in a device or re-trigger the event by writing "add" to > > the "uevent" file in the sysfs device directory. > > > I just create a simple device class by making use of: > > 'class_device_register' & > 'class_device_createfile' > to create /sys/class/edredaq/device0 & > /sys/class/edredaq/device0/edredaq_nodename See how class_device_create() works and fills in dev_t, you need to convert to that function or do the same with the dev_t value. You also need to set the 'device' pointer like that function does, to make userspace happy. Kay ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 _______________________________________________ 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