From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: <8ccc8ba40907190814g652f88f6u817a3085b563fdf7@mail.gmail.com> <8ccc8ba40907190858w3b8911cel6b8d64cf22065e71@mail.gmail.com> <599f06db0907200012p3c3c09d1k6e9f50c38fb7a2c0@mail.gmail.com> Date: Mon, 20 Jul 2009 18:25:46 +0200 Message-ID: <8ccc8ba40907200925w7db0fe7dned35d6149054449e@mail.gmail.com> From: Francisco J Ballesteros To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [9fans] new usb stack and implicit timeouts Topicbox-Message-UUID: 28f39124-ead5-11e9-9d60-3106f5b1d025 That is what I was considering instead of alarm-threadnotify (provided that the time out code in the kernel has to be kept there, for ctl transfers). But I'd like to provide the interface as it should be (otherewise there will be surprises). On Mon, Jul 20, 2009 at 5:07 PM, Dan Cross wrote: > Pardon me if this is totally ignorant, but can't we just have a ctl > message to control a timeout, which applications may then set on their > own? > > On Mon, Jul 20, 2009 at 3:12 AM, Gorka Guardiola wrote: >> On Sun, Jul 19, 2009 at 5:58 PM, Francisco J Ballesteros wrote: >>> On Sun, Jul 19, 2009 at 5:46 PM, wrote: >>>> http://www.beyondlogic.org/usbnutshell/usb6.htm#SetupPacket >>>> >>> >>> IIRC, I think the host controller is responsible for timing out >>> requests sent to the device (I refer to setup packets), but my uchi >>> does not. In any case, I don't think anyone wants to remove timeouts >>> from ctl requests. >>> >>> >> >> I am unsure I would remove timeouts even from bulk endpoints. >> It is true that some devices (the usb/serial for example) need to >> read for an undefined time waiting for data, but I don't think that is >> an issue as long >> as the timeouts are long enough, doing polling is quite easy. There is >> polling in the >> lower levels anyway. >> >> On the other hand, I think smart card readers go for >> lunch on a read and may never come >> back if there is no timeout. Of course alarm() can be used, but >> a timeout makes it simpler. I prefer having to poll on some >> cases than having to use signals on others. >> >> -- >> - curiosity sKilled the cat >> >> > >