Re: [Libusbx-devel] Linux sysfs usb descriptors file has broken configuration length handling

2013-05-18 Thread Hans de Goede
Hi, Greg, Alan, All, On 05/18/2013 06:17 PM, Greg KH wrote: > On Sat, May 18, 2013 at 12:14:08PM -0400, Alan Stern wrote: >> On Sat, 18 May 2013, Hans de Goede wrote: >>> But the sysfs descriptors file will just packs the >>> rawdescriptors one behind the other, using >>> usb_device->config[x].des

Re: [Libusbx-devel] ABI stability discussion (was [PATCH] Add support for BOS and Endpoint Companion USB 3.0 descriptors)

2013-05-18 Thread Pete Batard
Hi Johannes, On 2013.05.18 21:22, Johannes Stezenbach wrote: > I haven't got any shared library maintenance experience myself, > but from what I've read distros seem to encourage the use of > ELF symbol versioning to generate correct package version dependencies. > For Debian, dpkg-gensymbols and

Re: [Libusbx-devel] ABI stability discussion (was [PATCH] Add support for BOS and Endpoint Companion USB 3.0 descriptors)

2013-05-18 Thread Pete Batard
On 2013.05.18 11:05, Hans de Goede wrote: > There are 2 separate things being mixed here, one is the version number > for the tarbal (and reported through the libusb_get_version call), > and the other is the soname (in Linux terms), or in other words our > ABI major version. OK. > I agree that ad

Re: [Libusbx-devel] [PATCH] Add support for BOS and Endpoint Companion USB 3.0 descriptors

2013-05-18 Thread Pete Batard
On 2013.05.18 10:41, Hans de Goede wrote: > I disagree, just because we cannot have the perfect API, is not a very > valid reason to not add support for something, as long as we can do > so with a good enough API. To quote Torvalds: > "perfect is the enemy of good". Except we're not trying for per

Re: [Libusbx-devel] Towards a 1.0.16 release, hotplug test branch, please test

2013-05-18 Thread Pete Batard
Hi Kusti, On 2013.05.18 05:21, Kustaa Nyholm wrote: > Regardless, this paper talks about 'in kernel interfaces' whereas > libusb(x) falls logivally into the 'kernel to userspace interface' > category of things IMO which according to the paper is very stable > over time and will not break. And agai

Re: [Libusbx-devel] ABI stability discussion (was [PATCH] Add support for BOS and Endpoint Companion USB 3.0 descriptors)

2013-05-18 Thread Johannes Stezenbach
Hi, On Sat, May 18, 2013 at 12:05:26PM +0200, Hans de Goede wrote: > > I've been in the Linux distro "business" for a long time now, and > there is a HUGE cost to ABI breaking library releases. And almost > always the old and new version will need to be maintained in parallel > for a long time. F

Re: [Libusbx-devel] Linux sysfs usb descriptors file has broken configuration length handling

2013-05-18 Thread Greg KH
On Sat, May 18, 2013 at 12:14:08PM -0400, Alan Stern wrote: > On Sat, 18 May 2013, Hans de Goede wrote: > > But the sysfs descriptors file will just packs the > > rawdescriptors one behind the other, using > > usb_device->config[x].desc.wTotalLength, where as > > userspace only sees the length adve

Re: [Libusbx-devel] Linux sysfs usb descriptors file has broken configuration length handling

2013-05-18 Thread Alan Stern
On Sat, 18 May 2013, Hans de Goede wrote: > Hi All, > > While working on libusb's descriptor parsing code I ended up > referencing the kernels drivers/usb/core/sysfs.c and > drivers/usb/core/devio.c files. And I noticed a worrisome > discrepancy. > > The sysfs descriptors file for a usb device,

[Libusbx-devel] Linux sysfs usb descriptors file has broken configuration length handling

2013-05-18 Thread Hans de Goede
Hi All, While working on libusb's descriptor parsing code I ended up referencing the kernels drivers/usb/core/sysfs.c and drivers/usb/core/devio.c files. And I noticed a worrisome discrepancy. The sysfs descriptors file for a usb device, as well as its /dev/bus/usb/xxx/yyy device node both behave

[Libusbx-devel] Win CE backend host_endian ness handling

2013-05-18 Thread Hans de Goede
Hi, While reviewing host_endian handling in the descriptor code (for the BOS / ss-ep-comp desc support), I noticed something weird in the wince code: static int wince_get_device_descriptor( struct libusb_device *device, unsigned char *buffer, int *host_endian) { struct wince_devi

Re: [Libusbx-devel] ABI stability discussion (was [PATCH] Add support for BOS and Endpoint Companion USB 3.0 descriptors)

2013-05-18 Thread Hans de Goede
Hi, On 05/18/2013 01:31 AM, Pete Batard wrote: On 2013.05.17 14:43, Hans de Goede wrote: Now, if you tell me that, no, we shouldn't really change the major there, and that updating the minor would do, then I'm going to touch what I am really after here: Why the heck do "we" seem so hell be

Re: [Libusbx-devel] [PATCH] Add support for BOS and Endpoint Companion USB 3.0 descriptors

2013-05-18 Thread Hans de Goede
Hi, On 05/18/2013 01:31 AM, Pete Batard wrote: > On 2013.05.17 14:43, Hans de Goede wrote: >> If we were to design this from scratch I would completely agree. But >> we're not and we have >> to maintain ABI and API compatibility, so I've to strongly NACK this >> part of your patch: >> >> @@ -53