Re: PROBLEM : Device Re-enumeration not happening after reset

Alan Stern <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Sun, 28 Oct 2007, Jithu Joseph wrote:

> Dear Alan, Oliver and others,
> 
> Thanks really for pointing out, "Reenumeration after a reset wasn't
> implemented in 2.4!  It's present only in the 2.6 kernel".
> 
> Yesterday i compared my 2.4.27 with 2.6.22  and found out that the
> re-enumerate stuff as mentioned by Oliver is missing in 2.4.27's
> usb_reset_device () function.
> 
> Are you aware of any functions in 2.4 kernel which can be used within
> a kernel level usb client driver which will trigger a re-enumeration
> of the device. Then i can issue that call after the reset call .
> [Since i am working with an embedded board - i am not in a position to
> port the kernel to a 2.6 version] . Even some calls to re-enumerate
> the entire usb tree should do -as this is my only device.

At this point my knowledge of 2.4 is _extremely_ rusty and fading fast.  
That being understood, I can't think of any function that does what you 
want.

It should be easy enough to get the equivalent result from userspace,
however.  Just unload the host controller driver module and then load
it back.

> I assume that if there is no way to trigger a renumeration from within
> the kernel level driver then i will have to make some changes to
> hub.c's usb_reset_device () , - or are there any easier or simpler
> ways to attain my objective. Replugging the device is not an option
> for me.

It's not so simple.  2.6 needed a whole bunch of changes to make
reenumeration work.  You can't do it just by modifying a single
function.

> Perhaps i can attempt something like - instead of trying to load a
> different DFU driver after the reset - i can bring  DFU logic within
> this driver, issue a reset - then set configuration etc and proceed
> with the download

That might work out.

Alan Stern


-------------------------------------------------------------------------
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.