Re: USB gadget problem with close of a gadgetfs device

From: Erin Teran
Date: Fri Feb 13 2009 - 03:57:24 EST


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


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