Re: [PATCH] USB: add USB test and measurement class driver - round 2

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Marcel Janssen <korgull@...>
Cc: <stefan_kopp@...>, <stern@...>, <oliver@...>, <linux-usb@...>, <me@...>, <linux-kernel@...>, Marcel Janssen <marcel.janssen@...>
Date: Friday, August 29, 2008 - 4:01 pm

On Fri, Aug 29, 2008 at 06:41:15PM +0200, Marcel Janssen wrote:

How is this overhead in userspace, just do something like the following:
char big_buffer[16000]; /* bigger than any possible request */
size = read(file_desc, &big_buffer[0], sizeof(big_buffer));

and size is the amount of data you actually read from the device, i.e.
one request.

> I think the USBTMC spec is quite clear on how it should be implemented on

Then that's a userspace bug, don't do that in your program that reads
from these types of devices :)

> Stefan's driver works exactly the way I would expect from a users point of

But it's not compliant with the "standard" way of using a file
descriptor in unix, and might break some POSIX requirements as well (I'm
not a good POSIX follower, so I don't know for sure...)

As this is trivial to handle in userspace, and requires no additional
wierd code in the kernel driver, I don't see this as something we should
change the driver for.

thanks,

greg k-h
--

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] USB: add USB test and measurement class driver -..., Greg KH, (Fri Aug 29, 4:01 pm)