Re: [RFC] USB: cdc-wdm: implement IOCTL_WDM_MAX_COMMAND

2013-03-12 Thread Oliver Neukum
On Monday 11 March 2013 14:10:49 Greg KH wrote: On Mon, Mar 11, 2013 at 10:00:21PM +0100, Bjørn Mork wrote: Userspace applications need to know the maximum supported message size. Can't they get that from sysfs from the USB field that defines this? 1. We do not have a common sysfs

Re: [RFC] USB: cdc-wdm: implement IOCTL_WDM_MAX_COMMAND

2013-03-12 Thread Greg KH
On Mon, Mar 11, 2013 at 11:28:38PM +0100, Bjørn Mork wrote: Greg KH gre...@linuxfoundation.org writes: Currently, when a userspace application sees a /dev/cdc-wdmX device, it will have to - check which USB interface it belongs to, - parse the DMM descriptor if it is CDC WDM, - parse

[RFC] USB: cdc-wdm: implement IOCTL_WDM_MAX_COMMAND

2013-03-11 Thread Bjørn Mork
Userspace applications need to know the maximum supported message size. Using a character device as interface to USB control messages hides the fact that these messages have a strict size limit. The userspace application must in most cases still be aware of this limit. It must allocate

Re: [RFC] USB: cdc-wdm: implement IOCTL_WDM_MAX_COMMAND

2013-03-11 Thread Greg KH
On Mon, Mar 11, 2013 at 10:00:21PM +0100, Bjørn Mork wrote: Userspace applications need to know the maximum supported message size. Can't they get that from sysfs from the USB field that defines this? Adding a new ioctl is usually not a good idea, who is going to change the userspace tools to

Re: [RFC] USB: cdc-wdm: implement IOCTL_WDM_MAX_COMMAND

2013-03-11 Thread Bjørn Mork
Greg KH gre...@linuxfoundation.org writes: On Mon, Mar 11, 2013 at 10:00:21PM +0100, Bjørn Mork wrote: Userspace applications need to know the maximum supported message size. Can't they get that from sysfs from the USB field that defines this? Not at the moment since we don't export it.

Re: [RFC] USB: cdc-wdm: implement IOCTL_WDM_MAX_COMMAND

2013-03-11 Thread Greg KH
On Mon, Mar 11, 2013 at 10:28:21PM +0100, Bjørn Mork wrote: Greg KH gre...@linuxfoundation.org writes: On Mon, Mar 11, 2013 at 10:00:21PM +0100, Bjørn Mork wrote: Userspace applications need to know the maximum supported message size. Can't they get that from sysfs from the USB field