Re: USB gadget problem with close of a gadgetfs device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Closing the device file should always cause dev_release() to be called.
> If it doesn't then there must still be an open reference to the file.
> 
> Alan Stern

Hi Alan,

thank you very much for your answer.

Is it possible that this reference to the file is caused by the poll() call in the
ep0_thread?

I need to simulate a "device disconnect" to the USB Host, for that I currently do the following steps:

1) stop_io() - stop the data endpoints ep1_in, ep1_out with close()
2) stop the ep0_thread
3) close the ep0 endpoint with close()
4) wait one second
5) restart ep0_thread

Normally this method works, but under some circumstances, it doesn't (dev_release is missing)

What is the appropriate method to close all references to the ep-file descriptors?
Is there a way to debug/see what reference causes the not-releasing the device?

I'm sorry for these questions, but anyway I hope you can help me out.

Thanks in advance,
Erin


=


-- 
Powered by Outblaze
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux