Re: USB gadget problem with close of a gadgetfs device

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

 



<postme1@...> writes:

> I'm working on an embedded system with a PHYTEC IMX31 board and run a patched
kernel based on 2.6.22.6.
> 
> I use the OTG USB interface to connect as client.
> This works fine using usb.c and the gadgetfs which is loaded as 
> module above the arcotg_udc driver
> 
> During operation I need to disconnect from the host and connect 
> again afterwards.
> I try to do the disconnect by closing all file descriptors associated 
> with the connection (ep_in, ep_out
> and ep0) and the close is always successful.
> In most cases this works fine. 
> Sometimes, however, I can not reopen the ep0 file descriptor
> /dev/gadgetfs/arc_udc again.
> Instead of opening the device I get a -EBUSY.
> 
> So I added some printk output to the inode.c and arcotg_udc.c and 
> recompiled the modules to see what happens.
> It seems that in the error case the release function is not called
> even through the file descriptors for ep0,
> ep_in and ep_out where closed.


Hi,

I also experience the same Problem, when I try to disconnect the demo
application usb.c from gadgetfs.

Normally I would assume that the usb device driver is released when I close all
three endpoints. But the printk() show that in some cases (possible gadgetfs is
busy?) the closing of the file descriptors does not lead to a dev_release() call.

The error looks identical to the error, postme1 posted in the message above.

Maybe the most experienced gadgetfs developers (David Brownell, Alan Stern, ...)
are able to help us?

Please, I'm completely stuck on this one...

Many Thanks,
Erin 

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