public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] usb: uapi: add usb 3.0 authentication declarations
@ 2026-03-17  9:22 Oliver Neukum
  2026-03-17  9:22 ` [PATCH 2/2] USB: uapi: add BULK_MAX_PACKET_UPDATE Oliver Neukum
  2026-03-18 15:10 ` [PATCH 1/2] usb: uapi: add usb 3.0 authentication declarations Greg KH
  0 siblings, 2 replies; 6+ messages in thread
From: Oliver Neukum @ 2026-03-17  9:22 UTC (permalink / raw)
  To: gregkh, linux-usb; +Cc: Oliver Neukum

This adds the USB authentication extensions to the
uapi chapter 9 declarations, so that user space tools
correctly operate on the descriptor and commands.
This is necessary for sniffing and debugging in gadget
mode to correctly work, even though the kernel
does not use these requests in host mode.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
 include/uapi/linux/usb/ch9.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h
index 8003243a4937..6f02dc39430a 100644
--- a/include/uapi/linux/usb/ch9.h
+++ b/include/uapi/linux/usb/ch9.h
@@ -102,6 +102,8 @@
 #define USB_REQ_LOOPBACK_DATA_WRITE	0x15
 #define USB_REQ_LOOPBACK_DATA_READ	0x16
 #define USB_REQ_SET_INTERFACE_DS	0x17
+#define USB_REQ_AUTH_IN			0x18
+#define REQ_REQ_AUTH_OUT		0x19
 
 /* specific requests for USB Power Delivery */
 #define USB_REQ_GET_PARTNER_PDO		20
@@ -1147,6 +1149,17 @@ struct usb_ptm_cap_descriptor {
 
 /*-------------------------------------------------------------------------*/
 
+struct usb_authentication_capability_descriptor {
+	__u8  bLength;
+	__u8  bDescriptorType; /* set to USB_DT_DEVICE_CAPABILITY */
+	__u8  bmAttributes;
+
+	__u8  bcdProtocolVersion;
+	__u8  bcdCapability;
+} __attribute__((packed));
+
+/*-------------------------------------------------------------------------*/
+
 /* USB_DT_WIRELESS_ENDPOINT_COMP:  companion descriptor associated with
  * each endpoint descriptor for a wireless device
  */
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] USB: uapi: add BULK_MAX_PACKET_UPDATE
  2026-03-17  9:22 [PATCH 1/2] usb: uapi: add usb 3.0 authentication declarations Oliver Neukum
@ 2026-03-17  9:22 ` Oliver Neukum
  2026-03-18 15:10   ` Greg KH
  2026-03-18 15:10 ` [PATCH 1/2] usb: uapi: add usb 3.0 authentication declarations Greg KH
  1 sibling, 1 reply; 6+ messages in thread
From: Oliver Neukum @ 2026-03-17  9:22 UTC (permalink / raw)
  To: gregkh, linux-usb; +Cc: Oliver Neukum

The spec for Embedded USB2 Version 2.0 adds a new feature
request. This needs to be added to uapi for monitoring.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
 include/uapi/linux/usb/ch9.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h
index 6f02dc39430a..bf1bae138844 100644
--- a/include/uapi/linux/usb/ch9.h
+++ b/include/uapi/linux/usb/ch9.h
@@ -133,6 +133,8 @@
 #define USB_DEVICE_A_ALT_HNP_SUPPORT	5	/* (otg) other RH port does */
 #define USB_DEVICE_DEBUG_MODE		6	/* (special devices only) */
 
+#define BULK_MAX_PACKET_UPDATE		8	/* (eUSB2v2) bump maxpacket to 1024 */
+
 /*
  * Test Mode Selectors
  * See USB 2.0 spec Table 9-7
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] usb: uapi: add usb 3.0 authentication declarations
  2026-03-17  9:22 [PATCH 1/2] usb: uapi: add usb 3.0 authentication declarations Oliver Neukum
  2026-03-17  9:22 ` [PATCH 2/2] USB: uapi: add BULK_MAX_PACKET_UPDATE Oliver Neukum
@ 2026-03-18 15:10 ` Greg KH
  1 sibling, 0 replies; 6+ messages in thread
From: Greg KH @ 2026-03-18 15:10 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-usb

On Tue, Mar 17, 2026 at 10:22:28AM +0100, Oliver Neukum wrote:
> This adds the USB authentication extensions to the
> uapi chapter 9 declarations, so that user space tools
> correctly operate on the descriptor and commands.
> This is necessary for sniffing and debugging in gadget
> mode to correctly work, even though the kernel
> does not use these requests in host mode.
> 
> Signed-off-by: Oliver Neukum <oneukum@suse.com>
> ---
>  include/uapi/linux/usb/ch9.h | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h
> index 8003243a4937..6f02dc39430a 100644
> --- a/include/uapi/linux/usb/ch9.h
> +++ b/include/uapi/linux/usb/ch9.h
> @@ -102,6 +102,8 @@
>  #define USB_REQ_LOOPBACK_DATA_WRITE	0x15
>  #define USB_REQ_LOOPBACK_DATA_READ	0x16
>  #define USB_REQ_SET_INTERFACE_DS	0x17
> +#define USB_REQ_AUTH_IN			0x18
> +#define REQ_REQ_AUTH_OUT		0x19

This should be USB_REQ_AUTH_OUT, right?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] USB: uapi: add BULK_MAX_PACKET_UPDATE
  2026-03-17  9:22 ` [PATCH 2/2] USB: uapi: add BULK_MAX_PACKET_UPDATE Oliver Neukum
@ 2026-03-18 15:10   ` Greg KH
  2026-03-19 13:06     ` Oliver Neukum
  0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2026-03-18 15:10 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-usb

On Tue, Mar 17, 2026 at 10:22:29AM +0100, Oliver Neukum wrote:
> The spec for Embedded USB2 Version 2.0 adds a new feature
> request. This needs to be added to uapi for monitoring.
> 
> Signed-off-by: Oliver Neukum <oneukum@suse.com>
> ---
>  include/uapi/linux/usb/ch9.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h
> index 6f02dc39430a..bf1bae138844 100644
> --- a/include/uapi/linux/usb/ch9.h
> +++ b/include/uapi/linux/usb/ch9.h
> @@ -133,6 +133,8 @@
>  #define USB_DEVICE_A_ALT_HNP_SUPPORT	5	/* (otg) other RH port does */
>  #define USB_DEVICE_DEBUG_MODE		6	/* (special devices only) */
>  
> +#define BULK_MAX_PACKET_UPDATE		8	/* (eUSB2v2) bump maxpacket to 1024 */

Should have USB_ as a prefix.

And what is 7?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] USB: uapi: add BULK_MAX_PACKET_UPDATE
  2026-03-18 15:10   ` Greg KH
@ 2026-03-19 13:06     ` Oliver Neukum
  2026-03-19 13:19       ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Oliver Neukum @ 2026-03-19 13:06 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-usb

On 18.03.26 16:10, Greg KH wrote:

  
> Should have USB_ as a prefix.

Roger 
> And what is 7?

I have no idea. These things have becomes messy. As
you can see some values have been used twice and
sometimes we use USB_DEVICE as a prefix and sometimes USB_DEV
although both are for devices.

I can try a full cleanup, if you prefer that.

	Regards
		Oliver


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] USB: uapi: add BULK_MAX_PACKET_UPDATE
  2026-03-19 13:06     ` Oliver Neukum
@ 2026-03-19 13:19       ` Greg KH
  0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2026-03-19 13:19 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-usb

On Thu, Mar 19, 2026 at 02:06:02PM +0100, Oliver Neukum wrote:
> On 18.03.26 16:10, Greg KH wrote:
> 
> > Should have USB_ as a prefix.
> 
> Roger
> > And what is 7?
> 
> I have no idea. These things have becomes messy. As
> you can see some values have been used twice and
> sometimes we use USB_DEVICE as a prefix and sometimes USB_DEV
> although both are for devices.
> 
> I can try a full cleanup, if you prefer that.

We really can not change things we have exported to userspace here, so
we have to live with what we have, sorry.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-03-19 13:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-17  9:22 [PATCH 1/2] usb: uapi: add usb 3.0 authentication declarations Oliver Neukum
2026-03-17  9:22 ` [PATCH 2/2] USB: uapi: add BULK_MAX_PACKET_UPDATE Oliver Neukum
2026-03-18 15:10   ` Greg KH
2026-03-19 13:06     ` Oliver Neukum
2026-03-19 13:19       ` Greg KH
2026-03-18 15:10 ` [PATCH 1/2] usb: uapi: add usb 3.0 authentication declarations Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox