[linux-usb-devel] Re: Comments/questions about the Gadget API

2003-08-14 Thread David Brownell
Alan Stern wrote: David: A few things have come while planning my gadget driver. The gadgetfs API still looks a bit preliminary. Judging by the source, there doesn't even appear to be any way to halt an endpoint! Anyway, I decided not to use it; the performance penalties would make it a bad mod

Re: [linux-usb-devel] Re: Comments/questions about the Gadget API

2003-08-14 Thread Greg KH
On Wed, Aug 06, 2003 at 10:48:22PM +0200, Oliver Neukum wrote: > Am Mittwoch, 6. August 2003 22:09 schrieb David Brownell: > > Alan Stern wrote: > > > David: > > > > > > A few things have come while planning my gadget driver. > > > > > > The gadgetfs API still looks a bit preliminary. Judging by

Re: [linux-usb-devel] Re: Comments/questions about the Gadget API

2003-08-14 Thread Oliver Neukum
Am Mittwoch, 6. August 2003 22:09 schrieb David Brownell: > Alan Stern wrote: > > David: > > > > A few things have come while planning my gadget driver. > > > > The gadgetfs API still looks a bit preliminary. Judging by the source, > > there doesn't even appear to be any way to halt an endpoint!

Re: [linux-usb-devel] Re: Comments/questions about the Gadget API

2003-08-14 Thread Oliver Neukum
Am Donnerstag, 7. August 2003 21:37 schrieb David Brownell: > Oliver Neukum wrote: > Halt endpoints by doing a "wrong direction" I/O ... read from an IN endpoint > (instead of writing to the host), or write to an OUT endpoint (instead of > reading what it wrote). ... > > > > That depe

Re: [linux-usb-devel] Re: Comments/questions about the Gadget API

2003-08-14 Thread David Brownell
Oliver Neukum wrote: Think of it instead as portability. The main barrier to being able to use this should be knowing USB -- not whether your chosen programming environment supports POSIX-specific APIs. Remember that _today_ you can write fully realistic user mode gadget drivers in C, C++, Python

Re: [linux-usb-devel] Re: Comments/questions about the Gadget API

2003-08-14 Thread Oliver Neukum
> > > Halt endpoints by doing a "wrong direction" I/O ... read from an IN endpoint > > > (instead of writing to the host), or write to an OUT endpoint (instead of > > > reading what it wrote). This idiom avoids use of ioctls, and makes use > > > of a code path that would otherwise just return an

Re: [linux-usb-devel] Re: Comments/questions about the Gadget API

2003-08-14 Thread David Brownell
Alan Stern wrote: Again, seems like NAK is the answer. And the way to make the gadget stop NAKing is to provide some data for it to deliver to the host: submit a request to that IN endpoint, with its data buffer. If a STALL is the right response, then halt the endpoint. Otherwise the only non-

Re: [linux-usb-devel] Re: Comments/questions about the Gadget API

2003-08-08 Thread David Brownell
Oliver Neukum wrote: Halt endpoints by doing a "wrong direction" I/O ... read from an IN endpoint (instead of writing to the host), or write to an OUT endpoint (instead of reading what it wrote). ... That depends on whether you want to design a clean API, or you are driven by avoiding ioctl, which

Re: [linux-usb-devel] Re: Comments/questions about the Gadget API

2003-08-07 Thread David Brownell
Greg KH wrote: On Wed, Aug 06, 2003 at 10:48:22PM +0200, Oliver Neukum wrote: Am Mittwoch, 6. August 2003 22:09 schrieb David Brownell: Halt endpoints by doing a "wrong direction" I/O ... read from an IN endpoint (instead of writing to the host), or write to an OUT endpoint (instead of reading wha

[linux-usb-devel] Re: Comments/questions about the Gadget API

2003-08-06 Thread Alan Stern
I'm not sure if it's worth discussing this any farther, since the controller hardware probably won't support it, but ... On Wed, 6 Aug 2003, David Brownell wrote: > Alan Stern wrote: > > > A related issue has to do with setting the HALT feature when the host > > tries to read/write too much. T