(Please CC: these messages to the USB development list in addition to sending directly to me.)
On Wed, 14 Jan 2004, Stavros Markou wrote: > Alan Stern wrote: > > >On Tue, 13 Jan 2004, Stavros Markou wrote: > > > > > > > >>I am using that patch but now I am facing problems during disconnect > >>because inside usb_disable_device after device_del I get a crash. > >> > >> > > > >That sounds like something new. Can you post the details of what happens > >when the crash occurs? > > > > > > > This happens only with eeprom devices that need reset in order to get > the new descriptors. I am currently working with two types of WLAN > devices (eeprom and dataflash). I 've observed that the devices that > don't need reset (dataflash) load and unload without problem. Devices > that need reset (eeprom) load succesfully, but inside usb_disable_device > (which is called by usb_disconnect) I get a NULL pointer reference in > device_del so all urbs remain pending and the system is in panic. I think you're running up against one of a number of imperfections related to the current usb_reset_device() code. This particular problem arises because usb_disconnect() assumes that all the interfaces will have been registered before any disconnect occurs. Do you know why usb_disconnect() is getting called at all? Is it happening inside your call to usb_reset_device()? Or is it happening sometime later? Can you post the stack trace from your system panic? I could believe that usb_disconnect is getting called by mistake. There is a flaw in usb_reset_device(); it sends a port reset command to the hub upstream of your device, but it then does not prevent the hub driver from responding to connect-changed or enable-changed status messages on that port. Either one could cause usb_disconnect() to be called prematurely. The fact is, parts of the hub driver and in particular the usb_reset_device() routine need to be rewritten. This process has already begun, but I'm waiting for the current changes to be accepted into the kernel before sending in any more. Alan Stern ------------------------------------------------------- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel