From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Sat, 03 Jan 2004 21:51:39 +0000 Subject: Re: [PATCH] libsysfs update for refresh + namedev.c changes Message-Id: <20040103215139.GD11061@kroah.com> List-Id: References: <20040102054453.GA25764@in.ibm.com> In-Reply-To: <20040102054453.GA25764@in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org 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_id78&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