From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] libsysfs update for refresh + namedev.c changes
Date: Sat, 03 Jan 2004 21:51:39 +0000 [thread overview]
Message-ID: <20040103215139.GD11061@kroah.com> (raw)
In-Reply-To: <20040102054453.GA25764@in.ibm.com>
On Sat, Jan 03, 2004 at 08:53:59PM +0100, Kay Sievers wrote:
> On Fri, Jan 02, 2004 at 09:36:00PM -0800, Greg KH wrote:
> > On Fri, Jan 02, 2004 at 10:44:53AM +0500, Ananth N Mavinakayanahalli wrote:
> > > Please find inlined a (_BIG_) patch against udev-012 which contains
> > > updates to libsysfs (pre-release) for refresh and also changes to
> > > namedev.c to take advantage of it.
> > >
> > > Tested with a usb-storage device with a LABEL rule for both normal
> > > and klibc builds.
> >
> > Hm, nope, this still doesn't work with my usb flash disk. The partition
> > is recognized properly, but the main block device isn't. I'll take a
> > look at it on Monday to see if I can see where your changes aren't
> > working.
>
> This is working here, I've put 16 partitions on a CompactFlash in my USB flash reader
> and all the devices are there, including the main devices for the three empty slots.
> Greg, what device you are using? I want to reproduce it, but it is not slow enough :)
I have a very cheap usb pen drive device with 1 partition on it. My
rule is:
LABEL, BUS="scsi", SYSFS_model="Pen Drive 12X ", NAME="pen_drive%n"
The thing is the partition gets the rule applied to it, but the main
block device doesn't.
> But there is still a problem:
> Jan 3 20:20:00 pim udev[30927]: namedev_name_device: sysfs_device->path='/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.4/1-1.4:1.0/host53/53:0:0:0'
> Jan 3 20:20:00 pim udev[30927]: namedev_name_device: sysfs_device->bus_id='53:0:0:0'
> Jan 3 20:20:00 pim udev[30927]: namedev_name_device: sysfs_device->bus='unknown'
>
> sysfs_get_classdev_device() called from get_sysfs_device() in the wait loop in namedev.c
> is to fast. It returns the sysfs_device but the "device" link is not ready at this time
> and sysfs_get_classdev_device() sets sysfs_device->bus to 'unknown'.
>
> We need to wait for the "device" link until we can get the bus value out of it.
I think this is probably the problem that I'm seeing.
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
prev parent reply other threads:[~2004-01-03 21:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-02 5:03 [PATCH] libsysfs update for refresh + namedev.c changes Ananth N Mavinakayanahalli
2004-01-03 5:36 ` Greg KH
2004-01-03 19:53 ` Kay Sievers
2004-01-03 21:51 ` Greg KH [this message]
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=20040103215139.GD11061@kroah.com \
--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).