Stavros Markou wrote:In the case of EEPROM device, device boots with 1 interface which has 0 endpoints.
Disconnect is called when I unplug the wlan card. In the case of a dataflash device when device_del is called dev->parent is not NULL
but in the case of eeprom device dev->parent is NULL. My opinion is that
Hmm, it might be interesting to compare dump_stack() output at those two call sites.
Also: could you briefly summarize how those two different device types handle their firmware update? For example, one type of Atmel WLAN card uses a DFU stage, followed by some additional commands with a usb_reset_device() in there.
So, once the device boots driver downloads firmware via a DFU stage to the device.
After firmware is downloaded, driver issues reset to the device (bus reset)
and the device starts running the new firmware which has also 1 interface but with 2 endpoints.
The card works as a network device from that point on. When disconnecting this kind of device leaves the
system hanging.
So the case is that before reset and after reset the device presents to the OS the same device descriptor
but different configurations. In both configurations there is only 1 interface. However before reset
there are no other endpoints other than control endpoint as after reset there are 2 bulk endpoints.
This is the device which cannot work with the kernel version of bus reset function.
In the case of FLASH device, device boots with fw already in the NVM, so no reset is needed by the driver.
This device presents the same device descriptor as EEPROM device and configuration with 1 interface and 2 endpoints.
The card works as a network device. No DFU needed at boot. When disconnecting this kind of device the device
is disconnected without any problem.
First of all, I want to thank you and Alan for your help. Second for the drivers I am developing and In order to be independent from a kernel 's usb_reset_device (since it doesn't work for the moment and the users of the driver don't want to mess with the kernel too much) I 've put a small portion ofBefore long, everything up to the reset should work from probe() routine. But 2.6.0 won't.
kernel usb code inside a file called kernel_usb_reset.c that I attach it to this mail. Inside this file I 've made some changes to usb_physical_reset_device (__usb_reset_device) and I 've included some functions in order to complete succesfully the reset of the device. Inside the kernel, usb_physical_reset_device stops when it puts down the usb0_address_sem and leaves the system hanging. All seems to be fine after my reset_device the card as network device is fully functional . When I try to hot_unplug the device, and I believe usb_disconnect function is called then, I get a NULL pointer reference that leaves the system
with pending urbs etc.
the use of (ex usb_physical_reset_device) by the one type of device and not the other has nothing to do with the fact that when I unplug those devices I get two distinct results.
Stavros, what patches are you running with? __usb_reset_device name suggests there are some.
The only patch I use for the moment is the patch Alan send me for the port number . Is there a patch for usb_disconnect as well ?
Can you send me this patch ?
I posted a disconnect patch a while back, which included that re-name, and later submitted a tweaked/fixed version in four different segments. If you're using either of those, I hope it's the latter!
- Dave
------------------------------------------------------- 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
Stavros Markou.
------------------------------------------------------- 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