From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: [HACK] Give hiddev a device link in sysfs
Date: Mon, 22 Dec 2003 20:42:11 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-107212598505313@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-107153465903030@msgid-missing>
On Mon, Dec 15, 2003 at 07:32:35PM -0500, Adam Kropelin wrote:
> I have a bunch of USB interface UPSes which are managed via the hiddev
> interface. Recently I've been working on setting up a dedicated server
> to manage them all. I'd like to use udev to manage the device nodes so
> that I can have consistent naming no matter what USB port a particular
> UPS happens to be plugged into. They have unique serial numbers, so a
> udev.rules LABEL entry seemed the appropriate thing to do.
>
> It didn't work. Eventually I tracked it to a bad device link in sysfs
> (/sys/class/usb/hiddevN/device). Further investigation showed that the
> broken link is due to hiddev's being not-quite-a-usb-device and having a
> zero kobj with no parent, etc.
>
> I cooked up the hack-job patch below and it seems to be working. Clearly
> this isn't the right solution, but it's a starting point and it solves
> my immediate need.
Yeah, hiddev is wierd. It needs to dynamically allocate that interface
structure, and then a patch like this will start to make sense. Right
now bad things can happen if you unload the hiddev module when you have
a file in sysfs open for that device.
But this patch is a start. Care to finish it up?
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
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 prev parent reply other threads:[~2003-12-22 20:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-16 0:32 [HACK] Give hiddev a device link in sysfs Adam Kropelin
2003-12-22 20:42 ` Greg KH [this message]
2003-12-23 1:47 ` Adam Kropelin
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-107212598505313@msgid-missing \
--to=greg@kroah.com \
--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).