Re: [PATCH 2/5] usbdevfs: Add a USBDEVFS_GET_CAPABILITIES ioctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

Hans de Goede wrote:
> usbdevfs capabilities

How does userspace discover that the kernel supports the ioctl?

Try it, and fall back to version based decisions on error?


> problems:
..
> 2) Given the tendency of enterprise distros to backport stuff it is
> not reliable

Likewise it's important that discovery of capabilities is reliable.
In particular it's no good to require a certain kernel version in
order to take advantage of capabilities in userspace.


> USBDEVFS_CAP_BULK_CONTINUATION,  available since 2.6.32, except for XHCI

Unconditionally reporting this capability as supported seems wrong
when it has been identified that xHCI may not actually support it.

I.e. this cap would be conditional on the type port or possibly the
hcd is what actually needs to expose these capabilities.


> USBDEVFS_CAP_NO_PACKET_SIZE_LIM, available since 3.3

Yay. Unfortunately can't ditch the old libusb code, but the common
case will be so much simpler thanks to this! \o/


> @@ -204,4 +209,6 @@ struct usbdevfs_ioctl32 {
>  #define USBDEVFS_CONNECT           _IO('U', 23)
>  #define USBDEVFS_CLAIM_PORT        _IOR('U', 24, unsigned int)
>  #define USBDEVFS_RELEASE_PORT      _IOR('U', 25, unsigned int)
> +#define USBDEVFS_GET_CAPABILITIES  _IOR('U', 26, __u32)

Is the ioctl already allocated in the Documentation/ text file?


//Peter
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux