Force USB device detach

Anish Mistry mistry.7 at osu.edu
Wed May 7 07:16:00 PDT 2003


I'm trying to get suspend/resume working on my laptop (-CURRENT as of Monday) 
so that the USB devices work after a resume.  I've made ohci code changes to 
work as long as the device isn't being access while suspend (ie. cat 
/dev/uhid0).  If it is this seems to cause an interrupt issue and the kernel 
panics since on resume the usb bus needs to be completly reinitilized 
itself(ie. just like a fresh boot) and the usb interrupt values have change 
and it's left in an ambiguous state.
The only thing that I can think of is to force all the attached devices to 
detach on a suspend.  I've been poking around the code and can't seem to 
figure out how to do this.  Is there a function call that I need to use or 
would I need to enumerate all the attached devices and then call a detach on 
them, and how would I do that? 
This might seem like bit of a newbie question.

Thanks in advance,

-- 
Anish Mistry


More information about the freebsd-current mailing list