Skip to contentSkip to conversation

USB gadget problem with close of a gadgetfs device

DISCUSSION Erin Teran 1 participant 1 message Feb 13, 2009

lore
Share & tools
lore

Erin Teran

author
#0 lore raw

Hello,

I couldnt find an answer to my question in the archive or the kernel documentation.
I'm new to Linux and the LKML so please point me in the right direction if the question is misplaced here.

I have a problem while using driver/usb/gadget/gadgetfs
Sometimes I cant reopen the device propperly. I get an -EBUSY.
Using atom_read(&fd->f_count) and printk() in inode.c dev_open I found out that the count is 1 when the failure occurs. I checked several times if all fd I opened where closed, and they are.

Therefore I'm kinda lost here:
Q: Is f_count only increased after the dev_open returned success?
Q: Does poll() - which I use in my app - duplicate a fd and increase f_count?
Q: Is there a known issue with poll() and the pthread lib?
Q: What happens when I terminate a thread - pthread_cancel() - which is currently in a poll() call?

Thank you,
Erin

=
Listen & Play Mp3 Songs Completely Free
Listen & Play Online Mp3 Song Completely Free MUSIC ARTICLES AND MORE.
http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=f51d2a53b77b9b8d7c5fcbd5e19676ba

Signature · 1 line
Powered by Outblaze