See the note below, which I can hope will explain enough
of the details for someone to fix it.

There are enough other things on my queue that I'd really
like someone else to fix this ... :)

- Dave


----- Original Message ----- 
From: "David Brownell" <[EMAIL PROTECTED]>
To: "Robert McQueen" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, March 19, 2002 1:22 PM
Subject: Re: [Linux-usb-users] repeated similar OHCI crashes


> > > Hmm, I just thought of this ... perhaps this is a design bug in usbfs,
> > > in that it shouldn't do implicit claiming.  Disconnect processing will
> > > get rid of interface claims, but if usermode doesn't know the device
> > > is going away (and usbfs doesn't remember it's shutting down),
> > > interfaces could get automagically re-claimed ... AFTER the kernel
> > > thinks the driver has already shut down!  I'm not sure that's something
> > > usermode drivers could even defend against.
> 
> I took a quick look at drivers/usb/devio.c and it sure looks to me
> like that scenario explains everything you're seeing.
> 
> When khubd (or rmmod etc) disconnects usbfs from a device,
> it does exactly _nothing_ to either (a) terminate any outstanding
> requests, or (b) prevent further requests from getting issued.
> Yet disconnect() is required to do _both_ of those.
> 
> 
> > > ...
> > > 
> > > I can very easily imagine buggy disconnect() code breaking device
> > > refcounting guarantees.  In fact I think I remember finding and fixing
> > > more than a few of that kind of bug ... :)   For example, I suspect if the
> > > disconnect() routine returned with URBs still pending, you'd see this
> > > kind of crash (and likely other kinds later, if you missed this one).
> > > OR if, as I just imagined above, if usbfs let processes reconnect
> > > and issue new requests after khubd invoked disconnect()...
> > 
> > I must admit that I didn't quite follow all that. Nevertheless, 
> > hopefully you can work out what's going on, because I don't have a
> > snowball's chance in hell of doing so. =)
> 
> I think that's the bug:  buggy disconnect() code for usbfs.
> Not sure who'll fix that -- I'll forward a note to linux-usb-devel
> to see if anyone there wants to volunteer.
> 
> Once that's fixed there might be some other problem turning up,
> like what exactly was disconnecting your device, but one could
> hope those wouldn't involve more crashes.
> 
> - Dave
> 
> 
> 


_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to