Re: USB device driver question: timeout() and usbd_do_request()

2004-05-03 Thread Bernd Walter
On Sun, May 02, 2004 at 10:38:42AM -0400, Rita Lin wrote: Hello, I'm writing a USB driver for a device that does not have any interrupt. It only has Bulk-in and Bulk-out. A periodic polling status from default pipe is required to have a smooth data transfer. I used timeout() routine to

Re: USB device driver question: timeout() and usbd_do_request()

2004-05-03 Thread Rita Lin
But I don't understand the whole issue you have. Just schedule a request and wait for the device to ack. The Host controller does the polling for you as long as the request is queued and the timeout value supplied with the request did not time out. That has nothing to do with FreeBSD - it's

Re: USB device driver question: timeout() and usbd_do_request()

2004-05-03 Thread Bernd Walter
On Mon, May 03, 2004 at 04:37:22PM -0400, Rita Lin wrote: But I don't understand the whole issue you have. Just schedule a request and wait for the device to ack. The Host controller does the polling for you as long as the request is queued and the timeout value supplied with the request

Re: USB device driver question: timeout() and usbd_do_request()

2004-05-03 Thread Rita Lin
Igh - that sounds like a very bad device design then. There would have been lots a ways to do in a clean way without additional pipes - such as transfering 0 sized packets to trigger a status inquiry or by adding status bytes in each packet. For what purpose do you need to poll the status in

Re: USB device driver question: timeout() and usbd_do_request()

2004-05-03 Thread Rita Lin
That is what I call a bad design. You waste resources because the device designer did not take the features he had available. Okay, I guess so. There are also other minor things that I don't understand why the device is implemented the way it is. Since I don't make it, and I don't work for the

Re: USB device driver question: timeout() and usbd_do_request()

2004-05-03 Thread Bernd Walter
On Mon, May 03, 2004 at 06:48:14PM -0400, Rita Lin wrote: That is what I call a bad design. You waste resources because the device designer did not take the features he had available. Okay, I guess so. There are also other minor things that I don't understand why the device is implemented

Re: USB device driver question: timeout() and usbd_do_request()

2004-05-03 Thread Bernd Walter
On Mon, May 03, 2004 at 05:36:47PM -0400, Rita Lin wrote: Igh - that sounds like a very bad device design then. There would have been lots a ways to do in a clean way without additional pipes - such as transfering 0 sized packets to trigger a status inquiry or by adding status bytes in

USB device driver question: timeout() and usbd_do_request()

2004-05-02 Thread Rita Lin
Hello, I'm writing a USB driver for a device that does not have any interrupt. It only has Bulk-in and Bulk-out. A periodic polling status from default pipe is required to have a smooth data transfer. I used timeout() routine to call usbd_do_request() for polling. I thought maybe timeout() is