lkml.org 
[lkml]   [2008]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: usb unbind/bind => WARNING at fs/sysfs/dir.c [Was: 2.6.25-rc8-mm1]
On Fri, Apr 04, 2008 at 11:46:59PM -0400, Alan Stern wrote:
> On Fri, 4 Apr 2008, Alan Stern wrote:
>
> > On Fri, 4 Apr 2008, Greg KH wrote:
> >
> > > On Fri, Apr 04, 2008 at 10:16:32PM +0200, Jiri Slaby wrote:
> > > > On 04/02/2008 06:32 AM, Andrew Morton wrote:
> > > >> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.25-rc8/2.6.25-rc8-mm1/
> > > >
> > > > After
> > > > $ echo -n 4-1.2 >/sys/bus/usb/drivers/usb/unbind
> > > > $ echo -n 4-1.2 >/sys/bus/usb/drivers/usb/bind
> > > >
> > > > I have this in logs:
> > > >
> > > > sysfs: duplicate filename 'usbdev4.12_ep81' can not be created
> > >
> > > Does this also show up in 2.6.25-rc8 without -mm?
> > >
> > > I thought I fixed this already, I don't see what slipped into -mm that
> > > would have caused it to come back. Time to run some more tests...
> > >
> > > Oh, also note that binding and unbinding the main "usb" driver is not
> > > encouraged, or even supported. I'm amazed it works, as this is not
> > > something that any "real" user would do as it makes no sense at all
> > > because we have no "alternative" drivers yet for the main USB device.
> >
> > It's a real bug. I don't have time to track it down now. Next week...
>
> Here's the answer. The bug was introduced when the definition of
> device_is_registered() in include/linux/device.h was changed. The old
> definition returned 0 when called inside a driver's remove method for a
> device being unregistered, whereas the new definition returns 1. I
> don't know when this change was made.

I've changed that in the -mm tree to make some PCI stuff much easier. I
didn't realize that USB was depending on when this was being set, sorry
about it.

I like your fix better, it makes the code path much simpler :)

thanks,

greg k-h


\
 
 \ /
  Last update: 2008-04-05 06:39    [W:0.045 / U:26.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site