ugen(4) and poll(2)

Previous thread: HAMMER update 24-Apr-2008 by Matthew Dillon on Thursday, April 24, 2008 - 5:57 pm. (1 message)

Next thread: HAMMER update 26-Apr-2008 by Matthew Dillon on Saturday, April 26, 2008 - 3:40 pm. (2 messages)
To: <kernel@...>
Date: Thursday, April 24, 2008 - 6:38 pm

I'm in trouble to get some usb(4) devices working here. Devices are
attached as ugen(4) and are driven by userspace (libusb) drivers/daemons.

As far as I can see what happens is that daemon opens ugen(4) device
correctly and starts to poll(2) interrupt endpoint of the device (devices
have single interface). The trouble is that poll(2) seems to ignore
timeout. It doesn't return until there is data available in the
descriptor. Ie I can make poll(2) to return with poking device, but till
then it blocks.

Before I dig deep into areas I'm not familiar with ... Any ideas why and
where it might happen? Anyone seen something like this?

--
Hasso Tepper

To: <kernel@...>
Date: Thursday, April 24, 2008 - 7:51 pm

In which waitchan is the process? If it is in "poll" and you're really
passing a proper timeout value, then everything should work as advertised.
Does a ktrace show only the poll and no return? Sometimes processes
tend to re-call poll over and over again (maybe due to an interrupting
signal).

cheers
simon

--
Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon /"\
Work - Mac +++ space for low €€€ NOW!1 +++ Campaign \ /
Party Enjoy Relax | http://dragonflybsd.org Against HTML \
Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \

To: <kernel@...>
Date: Friday, April 25, 2008 - 2:32 am

Indeed ... Well, back to debug ugen(4), there is something very fishy
going on.

--
Hasso Tepper

Previous thread: HAMMER update 24-Apr-2008 by Matthew Dillon on Thursday, April 24, 2008 - 5:57 pm. (1 message)

Next thread: HAMMER update 26-Apr-2008 by Matthew Dillon on Saturday, April 26, 2008 - 3:40 pm. (2 messages)