Re: code review request: simple usb stream interface (susi)

Oliver Neukum <[email protected]>
Newsgroups gmane.linux.usb.devel
Organization Novell
Message-ID <[email protected]>
Am Donnerstag, 8. Februar 2007 14:40 schrieb Edwin Olson:

> Attached is a fairly simple new driver ("susi" for "simple usb stream 
> interface") that provides an ordered/reliable stream interface, 
> compatible with usb-serial, except that it dispenses with the tty layer 
> and it doesn't care about CDC interfaces. In time, I would like to have

I'll look at it in a few minutes, but first, what do you want to do that
libusb can't do?

> * Why does usb-serial set MAX_TRANFER to (PAGE_SIZE - 512)? What's the 
> 512 for?

A measure to make sure that a malicious user cannot use up unlimited
amounts of kernel memory. 512 is the maximum packet size of ehci.
Thus we make sure the number of packets on the page is an integer.

> * Is there a method for querying the value of a semaphore? (see poll())

down_trylock() which also downs the semaphore if it can without blocking

> * Is there a way of dequeuing from a kfifo directly into userspace, 
> without an intermediate buffer?

Don't know.

> * Is my locking correct?

I'll tell you later.

> * I've left existing copyrights intact and added an additional line. Is 
> that the right thing to do?

Yes.

> * After an abrupt device disconnect with writes pending, my machine 
> seems to "lock up" for about 30 seconds before the writes are aborted. 
> How can I address this?

I'll look at that. 

	Regards
		Oliver

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.