PROBLEM : Device Re-enumeration not happening after reset

"Jithu Joseph" <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
Dear All,

I am trying to implement a firmware upgrade for my usb smart card
reader. (device firmware update procedure : I issue a switch to DFU
control message and issue a usb_reset which makes the device
re-enumerate as a DFU device with different VID/PID, after which I
proceed with the f/w download)

I am having a kernel level usb driver for my device (USB Smart card
reader). When a user level  application triggers a firm ware update :
1.  i get the control in my kernel driver.
2.  I send the switch to DFU control message to my device  (which is
ack ed by the device)
3.  i issue a reset using usb_reset_device (defined in hub.c)

The problem i am facing is that after issuing the  "usb_reset_device
(struct usb_device *dev) ", though i am able to see a reset in the
CATC( USB protocol Analyzer) , the disconnect of the current usb
client driver  is not getting called  and also the probe of the DFU
driver is not getting called (the driver has support for both the
VIDs/PIDs)

Am i missing something - should i somehow notify the subystem to
reenumerate the port or am i using the wrong call to reset

At the CATC level i am seeing a reset, and the same address is
reassigned to the device and also get descriptors are issued.(and the
device returns descriptors with the new VID/PID). The set address and
get decriptors are called from usb_reset_device . -

But why is the USB subsystem not detecting the device removal and
unloading the current driver and loading the DFU driver ?

// --- i have a similar DFU implementation for the same device using
libusb which works  - ie without any kernel level usb drivers.

There the sequence of events is

The dfu app issues usb_reset(usb_dev_handle *dev)  (libusb call)

The usb reset occurs on bus, reenumeration occours and the next higer
usb address is assigned.
 i loop for my DFU VID/PID and open the handle and proceed. I couldn't
make out which kernel api's libusb is using to trigger the
reenumeration sequence

My environment Linux 2.4.27 on AT91 boards
I hope I am posting to the right forum. If not, please re-direct me to
the appropriate one.

Thanks and Regards--
Jithu Joseph

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.