aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2019-08-22 19:53:52 +0200
committerGitHub <noreply@github.com>2019-08-22 19:53:52 +0200
commitca6f3cfa782bb9aa9e1cb1247a2a4632608ab368 (patch)
treef3bdb8f2e032820a269de2e2a99eb31e19a58f3b /sys/linux
parentd003d6d021fcd38dfc3b578f1f179a76654bb709 (diff)
sys/linux: fix bNumEndpoints in a USB interface (#1360)
bNumEndpoints is defined as len[endpoints]. This initially assumed that endpoints is an array, which is not the case for descriptions for particular USB classes. Improve it by defining a new template for interfaces and passing in a value range for bNumEndpoints for these cases.
Diffstat (limited to 'sys/linux')
-rw-r--r--sys/linux/gen/386.go46
-rw-r--r--sys/linux/gen/amd64.go46
-rw-r--r--sys/linux/gen/arm.go46
-rw-r--r--sys/linux/gen/arm64.go46
-rw-r--r--sys/linux/gen/ppc64le.go46
-rw-r--r--sys/linux/vusb.txt15
6 files changed, 123 insertions, 122 deletions
diff --git a/sys/linux/gen/386.go b/sys/linux/gen/386.go
index 15ff6bfb3..6a86604d4 100644
--- a/sys/linux/gen/386.go
+++ b/sys/linux/gen/386.go
@@ -25871,21 +25871,21 @@ var structDescs_386 = []*KeyedStruct{
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_hub_change_flags", FldName: "wHubChange", TypeSize: 2}}, Vals: []uint64{1, 2}, BitMask: true},
}}},
{Key: StructKey{Name: "usb_interface_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor", IsVarlen: true}, Fields: []Type{
- &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]"}, FldName: "inner"},
+ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, len[endpoints, int8], const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]"}, FldName: "inner"},
}}},
{Key: StructKey{Name: "usb_interface_descriptor_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_cdc_ethernet", IsVarlen: true}, Fields: []Type{
- &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, FldName: "inner"},
+ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, in8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, FldName: "inner"},
}}},
{Key: StructKey{Name: "usb_interface_descriptor_cdc_ncm"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_cdc_ncm", IsVarlen: true}, Fields: []Type{
- &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]"}, FldName: "inner"},
+ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], int8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]"}, FldName: "inner"},
}}},
{Key: StructKey{Name: "usb_interface_descriptor_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_hid", IsVarlen: true}, Fields: []Type{
- &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]"}, FldName: "inner"},
+ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]"}, FldName: "inner"},
}}},
{Key: StructKey{Name: "usb_interface_descriptor_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_printer", IsVarlen: true}, Fields: []Type{
- &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, FldName: "inner"},
+ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, FldName: "inner"},
}}},
- {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]", IsVarlen: true}, Fields: []Type{
+ {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], int8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], int8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]", IsVarlen: true}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
@@ -25898,20 +25898,7 @@ var structDescs_386 = []*KeyedStruct{
&StructType{Key: StructKey{Name: "usb_cdc_header_ncm"}, FldName: "extra"},
&StructType{Key: StructKey{Name: "usb_endpoint_descriptors_cdc_ethernet"}, FldName: "endpoints"},
}}},
- {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]", IsVarlen: true}, Fields: []Type{
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
- &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bAlternateSetting", TypeSize: 1}}},
- &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumEndpoints", TypeSize: 1}}, Path: []string{"endpoints"}},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceClass", TypeSize: 1}}},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceSubClass", TypeSize: 1}}},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceProtocol", TypeSize: 1}}},
- &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iInterface", TypeSize: 1}}},
- &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "extra", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_interface_extra_descriptor"}}, Kind: 1, RangeEnd: 2},
- &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "endpoints", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor"}}, Kind: 1, RangeEnd: 16},
- }}},
- {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]", IsVarlen: true}, Fields: []Type{
+ {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, in8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, in8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]", IsVarlen: true}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
@@ -25924,7 +25911,7 @@ var structDescs_386 = []*KeyedStruct{
&StructType{Key: StructKey{Name: "usb_cdc_header_ethernet"}, FldName: "extra"},
&StructType{Key: StructKey{Name: "usb_endpoint_descriptors_cdc_ethernet"}, FldName: "endpoints"},
}}},
- {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]", IsVarlen: true}, Fields: []Type{
+ {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]", IsVarlen: true}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
@@ -25937,7 +25924,7 @@ var structDescs_386 = []*KeyedStruct{
&StructType{Key: StructKey{Name: "usb_hid_descriptor_hid"}, FldName: "extra"},
&StructType{Key: StructKey{Name: "usb_endpoint_descriptors_hid"}, FldName: "endpoints"},
}}},
- {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]", IsVarlen: true}, Fields: []Type{
+ {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]", IsVarlen: true}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
@@ -25950,6 +25937,19 @@ var structDescs_386 = []*KeyedStruct{
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "extra"}, Kind: 1},
&StructType{Key: StructKey{Name: "usb_endpoint_descriptors_printer"}, FldName: "endpoints"},
}}},
+ {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, len[endpoints, int8], const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, len[endpoints, int8], const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]", IsVarlen: true}, Fields: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bAlternateSetting", TypeSize: 1}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumEndpoints", TypeSize: 1}}, Path: []string{"endpoints"}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceClass", TypeSize: 1}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceSubClass", TypeSize: 1}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceProtocol", TypeSize: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iInterface", TypeSize: 1}}},
+ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "extra", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_interface_extra_descriptor"}}, Kind: 1, RangeEnd: 2},
+ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "endpoints", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor"}}, Kind: 1, RangeEnd: 16},
+ }}},
{Key: StructKey{Name: "usb_interface_extra_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_extra_descriptor", IsVarlen: true}, Fields: []Type{
&StructType{Key: StructKey{Name: "usb_generic_descriptor"}, FldName: "generic"},
&StructType{Key: StructKey{Name: "usb_hid_descriptor_hid"}, FldName: "hid_hid"},
@@ -52513,4 +52513,4 @@ var consts_386 = []ConstValue{
{Name: "bpf_insn_load_imm_dw", Value: 24},
}
-const revision_386 = "2674710f03983d53bfce0c3f384547610c9c0b71"
+const revision_386 = "81eea431ad9f04a17554500dc5a53d546f4158f3"
diff --git a/sys/linux/gen/amd64.go b/sys/linux/gen/amd64.go
index dfa18e795..e24399ca4 100644
--- a/sys/linux/gen/amd64.go
+++ b/sys/linux/gen/amd64.go
@@ -26242,21 +26242,21 @@ var structDescs_amd64 = []*KeyedStruct{
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_hub_change_flags", FldName: "wHubChange", TypeSize: 2}}, Vals: []uint64{1, 2}, BitMask: true},
}}},
{Key: StructKey{Name: "usb_interface_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor", IsVarlen: true}, Fields: []Type{
- &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]"}, FldName: "inner"},
+ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, len[endpoints, int8], const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]"}, FldName: "inner"},
}}},
{Key: StructKey{Name: "usb_interface_descriptor_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_cdc_ethernet", IsVarlen: true}, Fields: []Type{
- &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, FldName: "inner"},
+ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, in8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, FldName: "inner"},
}}},
{Key: StructKey{Name: "usb_interface_descriptor_cdc_ncm"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_cdc_ncm", IsVarlen: true}, Fields: []Type{
- &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]"}, FldName: "inner"},
+ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], int8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]"}, FldName: "inner"},
}}},
{Key: StructKey{Name: "usb_interface_descriptor_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_hid", IsVarlen: true}, Fields: []Type{
- &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]"}, FldName: "inner"},
+ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]"}, FldName: "inner"},
}}},
{Key: StructKey{Name: "usb_interface_descriptor_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_printer", IsVarlen: true}, Fields: []Type{
- &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, FldName: "inner"},
+ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, FldName: "inner"},
}}},
- {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]", IsVarlen: true}, Fields: []Type{
+ {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], int8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], int8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]", IsVarlen: true}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
@@ -26269,20 +26269,7 @@ var structDescs_amd64 = []*KeyedStruct{
&StructType{Key: StructKey{Name: "usb_cdc_header_ncm"}, FldName: "extra"},
&StructType{Key: StructKey{Name: "usb_endpoint_descriptors_cdc_ethernet"}, FldName: "endpoints"},
}}},
- {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]", IsVarlen: true}, Fields: []Type{
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
- &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bAlternateSetting", TypeSize: 1}}},
- &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumEndpoints", TypeSize: 1}}, Path: []string{"endpoints"}},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceClass", TypeSize: 1}}},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceSubClass", TypeSize: 1}}},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceProtocol", TypeSize: 1}}},
- &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iInterface", TypeSize: 1}}},
- &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "extra", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_interface_extra_descriptor"}}, Kind: 1, RangeEnd: 2},
- &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "endpoints", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor"}}, Kind: 1, RangeEnd: 16},
- }}},
- {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]", IsVarlen: true}, Fields: []Type{
+ {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, in8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, in8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]", IsVarlen: true}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
@@ -26295,7 +26282,7 @@ var structDescs_amd64 = []*KeyedStruct{
&StructType{Key: StructKey{Name: "usb_cdc_header_ethernet"}, FldName: "extra"},
&StructType{Key: StructKey{Name: "usb_endpoint_descriptors_cdc_ethernet"}, FldName: "endpoints"},
}}},
- {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]", IsVarlen: true}, Fields: []Type{
+ {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]", IsVarlen: true}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
@@ -26308,7 +26295,7 @@ var structDescs_amd64 = []*KeyedStruct{
&StructType{Key: StructKey{Name: "usb_hid_descriptor_hid"}, FldName: "extra"},
&StructType{Key: StructKey{Name: "usb_endpoint_descriptors_hid"}, FldName: "endpoints"},
}}},
- {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]", IsVarlen: true}, Fields: []Type{
+ {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]", IsVarlen: true}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
@@ -26321,6 +26308,19 @@ var structDescs_amd64 = []*KeyedStruct{
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "extra"}, Kind: 1},
&StructType{Key: StructKey{Name: "usb_endpoint_descriptors_printer"}, FldName: "endpoints"},
}}},
+ {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, len[endpoints, int8], const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, len[endpoints, int8], const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]", IsVarlen: true}, Fields: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bAlternateSetting", TypeSize: 1}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumEndpoints", TypeSize: 1}}, Path: []string{"endpoints"}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceClass", TypeSize: 1}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceSubClass", TypeSize: 1}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceProtocol", TypeSize: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iInterface", TypeSize: 1}}},
+ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "extra", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_interface_extra_descriptor"}}, Kind: 1, RangeEnd: 2},
+ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "endpoints", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor"}}, Kind: 1, RangeEnd: 16},
+ }}},
{Key: StructKey{Name: "usb_interface_extra_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_extra_descriptor", IsVarlen: true}, Fields: []Type{
&StructType{Key: StructKey{Name: "usb_generic_descriptor"}, FldName: "generic"},
&StructType{Key: StructKey{Name: "usb_hid_descriptor_hid"}, FldName: "hid_hid"},
@@ -53050,4 +53050,4 @@ var consts_amd64 = []ConstValue{
{Name: "bpf_insn_load_imm_dw", Value: 24},
}
-const revision_amd64 = "ab460a9ed70cb8e18613d4040a8a8c2978fd7fa7"
+const revision_amd64 = "eadfc46613ba8815e848ff6a3ecd26c74a5a5d9d"
diff --git a/sys/linux/gen/arm.go b/sys/linux/gen/arm.go
index f92e95780..b3ce3bbef 100644
--- a/sys/linux/gen/arm.go
+++ b/sys/linux/gen/arm.go
@@ -25693,21 +25693,21 @@ var structDescs_arm = []*KeyedStruct{
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_hub_change_flags", FldName: "wHubChange", TypeSize: 2}}, Vals: []uint64{1, 2}, BitMask: true},
}}},
{Key: StructKey{Name: "usb_interface_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor", IsVarlen: true}, Fields: []Type{
- &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]"}, FldName: "inner"},
+ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, len[endpoints, int8], const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]"}, FldName: "inner"},
}}},
{Key: StructKey{Name: "usb_interface_descriptor_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_cdc_ethernet", IsVarlen: true}, Fields: []Type{
- &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, FldName: "inner"},
+ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, in8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, FldName: "inner"},
}}},
{Key: StructKey{Name: "usb_interface_descriptor_cdc_ncm"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_cdc_ncm", IsVarlen: true}, Fields: []Type{
- &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]"}, FldName: "inner"},
+ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], int8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]"}, FldName: "inner"},
}}},
{Key: StructKey{Name: "usb_interface_descriptor_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_hid", IsVarlen: true}, Fields: []Type{
- &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]"}, FldName: "inner"},
+ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]"}, FldName: "inner"},
}}},
{Key: StructKey{Name: "usb_interface_descriptor_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_printer", IsVarlen: true}, Fields: []Type{
- &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, FldName: "inner"},
+ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, FldName: "inner"},
}}},
- {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]", IsVarlen: true}, Fields: []Type{
+ {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], int8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], int8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]", IsVarlen: true}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
@@ -25720,20 +25720,7 @@ var structDescs_arm = []*KeyedStruct{
&StructType{Key: StructKey{Name: "usb_cdc_header_ncm"}, FldName: "extra"},
&StructType{Key: StructKey{Name: "usb_endpoint_descriptors_cdc_ethernet"}, FldName: "endpoints"},
}}},
- {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]", IsVarlen: true}, Fields: []Type{
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
- &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bAlternateSetting", TypeSize: 1}}},
- &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumEndpoints", TypeSize: 1}}, Path: []string{"endpoints"}},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceClass", TypeSize: 1}}},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceSubClass", TypeSize: 1}}},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceProtocol", TypeSize: 1}}},
- &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iInterface", TypeSize: 1}}},
- &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "extra", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_interface_extra_descriptor"}}, Kind: 1, RangeEnd: 2},
- &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "endpoints", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor"}}, Kind: 1, RangeEnd: 16},
- }}},
- {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]", IsVarlen: true}, Fields: []Type{
+ {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, in8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, in8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]", IsVarlen: true}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
@@ -25746,7 +25733,7 @@ var structDescs_arm = []*KeyedStruct{
&StructType{Key: StructKey{Name: "usb_cdc_header_ethernet"}, FldName: "extra"},
&StructType{Key: StructKey{Name: "usb_endpoint_descriptors_cdc_ethernet"}, FldName: "endpoints"},
}}},
- {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]", IsVarlen: true}, Fields: []Type{
+ {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]", IsVarlen: true}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
@@ -25759,7 +25746,7 @@ var structDescs_arm = []*KeyedStruct{
&StructType{Key: StructKey{Name: "usb_hid_descriptor_hid"}, FldName: "extra"},
&StructType{Key: StructKey{Name: "usb_endpoint_descriptors_hid"}, FldName: "endpoints"},
}}},
- {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]", IsVarlen: true}, Fields: []Type{
+ {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]", IsVarlen: true}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
@@ -25772,6 +25759,19 @@ var structDescs_arm = []*KeyedStruct{
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "extra"}, Kind: 1},
&StructType{Key: StructKey{Name: "usb_endpoint_descriptors_printer"}, FldName: "endpoints"},
}}},
+ {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, len[endpoints, int8], const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, len[endpoints, int8], const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]", IsVarlen: true}, Fields: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bAlternateSetting", TypeSize: 1}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumEndpoints", TypeSize: 1}}, Path: []string{"endpoints"}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceClass", TypeSize: 1}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceSubClass", TypeSize: 1}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceProtocol", TypeSize: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iInterface", TypeSize: 1}}},
+ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "extra", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_interface_extra_descriptor"}}, Kind: 1, RangeEnd: 2},
+ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "endpoints", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor"}}, Kind: 1, RangeEnd: 16},
+ }}},
{Key: StructKey{Name: "usb_interface_extra_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_extra_descriptor", IsVarlen: true}, Fields: []Type{
&StructType{Key: StructKey{Name: "usb_generic_descriptor"}, FldName: "generic"},
&StructType{Key: StructKey{Name: "usb_hid_descriptor_hid"}, FldName: "hid_hid"},
@@ -52090,4 +52090,4 @@ var consts_arm = []ConstValue{
{Name: "bpf_insn_load_imm_dw", Value: 24},
}
-const revision_arm = "0dda4f05b8ba8d6e91baca411d16d5ae0fc06fde"
+const revision_arm = "faf2e799ef3b79e05c5270d765311edf176e3c46"
diff --git a/sys/linux/gen/arm64.go b/sys/linux/gen/arm64.go
index 4dcd8a2c4..19e9c90b5 100644
--- a/sys/linux/gen/arm64.go
+++ b/sys/linux/gen/arm64.go
@@ -26059,21 +26059,21 @@ var structDescs_arm64 = []*KeyedStruct{
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_hub_change_flags", FldName: "wHubChange", TypeSize: 2}}, Vals: []uint64{1, 2}, BitMask: true},
}}},
{Key: StructKey{Name: "usb_interface_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor", IsVarlen: true}, Fields: []Type{
- &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]"}, FldName: "inner"},
+ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, len[endpoints, int8], const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]"}, FldName: "inner"},
}}},
{Key: StructKey{Name: "usb_interface_descriptor_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_cdc_ethernet", IsVarlen: true}, Fields: []Type{
- &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, FldName: "inner"},
+ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, in8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, FldName: "inner"},
}}},
{Key: StructKey{Name: "usb_interface_descriptor_cdc_ncm"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_cdc_ncm", IsVarlen: true}, Fields: []Type{
- &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]"}, FldName: "inner"},
+ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], int8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]"}, FldName: "inner"},
}}},
{Key: StructKey{Name: "usb_interface_descriptor_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_hid", IsVarlen: true}, Fields: []Type{
- &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]"}, FldName: "inner"},
+ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]"}, FldName: "inner"},
}}},
{Key: StructKey{Name: "usb_interface_descriptor_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_printer", IsVarlen: true}, Fields: []Type{
- &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, FldName: "inner"},
+ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, FldName: "inner"},
}}},
- {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]", IsVarlen: true}, Fields: []Type{
+ {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], int8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], int8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]", IsVarlen: true}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
@@ -26086,20 +26086,7 @@ var structDescs_arm64 = []*KeyedStruct{
&StructType{Key: StructKey{Name: "usb_cdc_header_ncm"}, FldName: "extra"},
&StructType{Key: StructKey{Name: "usb_endpoint_descriptors_cdc_ethernet"}, FldName: "endpoints"},
}}},
- {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]", IsVarlen: true}, Fields: []Type{
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
- &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bAlternateSetting", TypeSize: 1}}},
- &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumEndpoints", TypeSize: 1}}, Path: []string{"endpoints"}},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceClass", TypeSize: 1}}},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceSubClass", TypeSize: 1}}},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceProtocol", TypeSize: 1}}},
- &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iInterface", TypeSize: 1}}},
- &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "extra", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_interface_extra_descriptor"}}, Kind: 1, RangeEnd: 2},
- &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "endpoints", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor"}}, Kind: 1, RangeEnd: 16},
- }}},
- {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]", IsVarlen: true}, Fields: []Type{
+ {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, in8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, in8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]", IsVarlen: true}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
@@ -26112,7 +26099,7 @@ var structDescs_arm64 = []*KeyedStruct{
&StructType{Key: StructKey{Name: "usb_cdc_header_ethernet"}, FldName: "extra"},
&StructType{Key: StructKey{Name: "usb_endpoint_descriptors_cdc_ethernet"}, FldName: "endpoints"},
}}},
- {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]", IsVarlen: true}, Fields: []Type{
+ {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]", IsVarlen: true}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
@@ -26125,7 +26112,7 @@ var structDescs_arm64 = []*KeyedStruct{
&StructType{Key: StructKey{Name: "usb_hid_descriptor_hid"}, FldName: "extra"},
&StructType{Key: StructKey{Name: "usb_endpoint_descriptors_hid"}, FldName: "endpoints"},
}}},
- {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]", IsVarlen: true}, Fields: []Type{
+ {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]", IsVarlen: true}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
@@ -26138,6 +26125,19 @@ var structDescs_arm64 = []*KeyedStruct{
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "extra"}, Kind: 1},
&StructType{Key: StructKey{Name: "usb_endpoint_descriptors_printer"}, FldName: "endpoints"},
}}},
+ {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, len[endpoints, int8], const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, len[endpoints, int8], const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]", IsVarlen: true}, Fields: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bAlternateSetting", TypeSize: 1}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumEndpoints", TypeSize: 1}}, Path: []string{"endpoints"}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceClass", TypeSize: 1}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceSubClass", TypeSize: 1}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceProtocol", TypeSize: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iInterface", TypeSize: 1}}},
+ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "extra", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_interface_extra_descriptor"}}, Kind: 1, RangeEnd: 2},
+ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "endpoints", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor"}}, Kind: 1, RangeEnd: 16},
+ }}},
{Key: StructKey{Name: "usb_interface_extra_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_extra_descriptor", IsVarlen: true}, Fields: []Type{
&StructType{Key: StructKey{Name: "usb_generic_descriptor"}, FldName: "generic"},
&StructType{Key: StructKey{Name: "usb_hid_descriptor_hid"}, FldName: "hid_hid"},
@@ -52402,4 +52402,4 @@ var consts_arm64 = []ConstValue{
{Name: "bpf_insn_load_imm_dw", Value: 24},
}
-const revision_arm64 = "6089eb29343fc969b9fcf2da3952a6ae2528ea1f"
+const revision_arm64 = "6299b948875b24172e29730974c1b44a6c3c9896"
diff --git a/sys/linux/gen/ppc64le.go b/sys/linux/gen/ppc64le.go
index ea2ce0512..adab9bb6d 100644
--- a/sys/linux/gen/ppc64le.go
+++ b/sys/linux/gen/ppc64le.go
@@ -25929,21 +25929,21 @@ var structDescs_ppc64le = []*KeyedStruct{
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "usb_hub_change_flags", FldName: "wHubChange", TypeSize: 2}}, Vals: []uint64{1, 2}, BitMask: true},
}}},
{Key: StructKey{Name: "usb_interface_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor", IsVarlen: true}, Fields: []Type{
- &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]"}, FldName: "inner"},
+ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, len[endpoints, int8], const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]"}, FldName: "inner"},
}}},
{Key: StructKey{Name: "usb_interface_descriptor_cdc_ethernet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_cdc_ethernet", IsVarlen: true}, Fields: []Type{
- &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, FldName: "inner"},
+ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, in8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, FldName: "inner"},
}}},
{Key: StructKey{Name: "usb_interface_descriptor_cdc_ncm"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_cdc_ncm", IsVarlen: true}, Fields: []Type{
- &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]"}, FldName: "inner"},
+ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], int8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]"}, FldName: "inner"},
}}},
{Key: StructKey{Name: "usb_interface_descriptor_hid"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_hid", IsVarlen: true}, Fields: []Type{
- &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]"}, FldName: "inner"},
+ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]"}, FldName: "inner"},
}}},
{Key: StructKey{Name: "usb_interface_descriptor_printer"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_printer", IsVarlen: true}, Fields: []Type{
- &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, FldName: "inner"},
+ &StructType{Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, FldName: "inner"},
}}},
- {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]", IsVarlen: true}, Fields: []Type{
+ {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], int8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], int8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]", IsVarlen: true}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
@@ -25956,20 +25956,7 @@ var structDescs_ppc64le = []*KeyedStruct{
&StructType{Key: StructKey{Name: "usb_cdc_header_ncm"}, FldName: "extra"},
&StructType{Key: StructKey{Name: "usb_endpoint_descriptors_cdc_ethernet"}, FldName: "endpoints"},
}}},
- {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]", IsVarlen: true}, Fields: []Type{
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
- &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bAlternateSetting", TypeSize: 1}}},
- &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumEndpoints", TypeSize: 1}}, Path: []string{"endpoints"}},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceClass", TypeSize: 1}}},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceSubClass", TypeSize: 1}}},
- &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceProtocol", TypeSize: 1}}},
- &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iInterface", TypeSize: 1}}},
- &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "extra", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_interface_extra_descriptor"}}, Kind: 1, RangeEnd: 2},
- &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "endpoints", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor"}}, Kind: 1, RangeEnd: 16},
- }}},
- {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]", IsVarlen: true}, Fields: []Type{
+ {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, in8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, in8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]", IsVarlen: true}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
@@ -25982,7 +25969,7 @@ var structDescs_ppc64le = []*KeyedStruct{
&StructType{Key: StructKey{Name: "usb_cdc_header_ethernet"}, FldName: "extra"},
&StructType{Key: StructKey{Name: "usb_endpoint_descriptors_cdc_ethernet"}, FldName: "endpoints"},
}}},
- {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]", IsVarlen: true}, Fields: []Type{
+ {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]", IsVarlen: true}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
@@ -25995,7 +25982,7 @@ var structDescs_ppc64le = []*KeyedStruct{
&StructType{Key: StructKey{Name: "usb_hid_descriptor_hid"}, FldName: "extra"},
&StructType{Key: StructKey{Name: "usb_endpoint_descriptors_hid"}, FldName: "endpoints"},
}}},
- {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]", IsVarlen: true}, Fields: []Type{
+ {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]", IsVarlen: true}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
@@ -26008,6 +25995,19 @@ var structDescs_ppc64le = []*KeyedStruct{
&BufferType{TypeCommon: TypeCommon{TypeName: "void", FldName: "extra"}, Kind: 1},
&StructType{Key: StructKey{Name: "usb_endpoint_descriptors_printer"}, FldName: "endpoints"},
}}},
+ {Key: StructKey{Name: "usb_interface_descriptor_t[const[0, int8], int8, len[endpoints, int8], const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_descriptor_t[const[0, int8], int8, len[endpoints, int8], const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]", IsVarlen: true}, Fields: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bLength", TypeSize: 1}}, Val: 9},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bDescriptorType", TypeSize: 1}}, Val: 4},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceNumber", TypeSize: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "bAlternateSetting", TypeSize: 1}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "bNumEndpoints", TypeSize: 1}}, Path: []string{"endpoints"}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceClass", TypeSize: 1}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceSubClass", TypeSize: 1}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "bInterfaceProtocol", TypeSize: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "iInterface", TypeSize: 1}}},
+ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "extra", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "usb_interface_extra_descriptor"}}, Kind: 1, RangeEnd: 2},
+ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "endpoints", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "usb_endpoint_descriptor"}}, Kind: 1, RangeEnd: 16},
+ }}},
{Key: StructKey{Name: "usb_interface_extra_descriptor"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "usb_interface_extra_descriptor", IsVarlen: true}, Fields: []Type{
&StructType{Key: StructKey{Name: "usb_generic_descriptor"}, FldName: "generic"},
&StructType{Key: StructKey{Name: "usb_hid_descriptor_hid"}, FldName: "hid_hid"},
@@ -52367,4 +52367,4 @@ var consts_ppc64le = []ConstValue{
{Name: "bpf_insn_load_imm_dw", Value: 24},
}
-const revision_ppc64le = "952802d798e1a60ee50b8d1c351dc02183b0cef1"
+const revision_ppc64le = "0abb1312354a328ee0b32c04c8d51ae2d7091478"
diff --git a/sys/linux/vusb.txt b/sys/linux/vusb.txt
index 7b03b8e5f..dde1db777 100644
--- a/sys/linux/vusb.txt
+++ b/sys/linux/vusb.txt
@@ -93,14 +93,13 @@ type usb_config_descriptor_t[NUM, ATTRS, IFS] {
interfaces IFS
} [packed]
-type usb_interface_descriptor_t[IFNUM, ALTNUM, CLASS, SUBCLASS, PROTOCOL, EXTRA, EPS] {
+type usb_interface_descriptor_t[IFNUM, ALTNUM, EPSNUM, CLASS, SUBCLASS, PROTOCOL, EXTRA, EPS] {
bLength const[USB_DT_INTERFACE_SIZE, int8]
bDescriptorType const[USB_DT_INTERFACE, int8]
bInterfaceNumber IFNUM
bAlternateSetting ALTNUM
bNumEndpoints len[endpoints, int8]
-# TODO: endpoints is not necessarily an array.
bInterfaceClass CLASS
bInterfaceSubClass SUBCLASS
bInterfaceProtocol PROTOCOL
@@ -110,6 +109,8 @@ type usb_interface_descriptor_t[IFNUM, ALTNUM, CLASS, SUBCLASS, PROTOCOL, EXTRA,
endpoints EPS
} [packed]
+type usb_interface_descriptor_eps_array_t[IFNUM, ALTNUM, CLASS, SUBCLASS, PROTOCOL, EXTRA, EPS] usb_interface_descriptor_t[IFNUM, ALTNUM, len[endpoints, int8], CLASS, SUBCLASS, PROTOCOL, EXTRA, EPS]
+
# TODO: Some endpoints have USB_DT_ENDPOINT_SIZE.
type usb_endpoint_descriptor_t[ADDR, ATTRS, EXTRA] {
bLength const[USB_DT_ENDPOINT_AUDIO_SIZE, int8]
@@ -149,7 +150,7 @@ usb_config_attributes = USB_CONFIG_ATT_ONE, USB_CONFIG_ATT_SELFPOWER, USB_CONFIG
# bInterfaceNumber, bInterfaceClass, bInterfaceSubClass and bInterfaceProtocol
# are patched by Go code, see sys/linux/init_vusb.go.
usb_interface_descriptor {
- inner usb_interface_descriptor_t[const[0, int8], int8, const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]
+ inner usb_interface_descriptor_eps_array_t[const[0, int8], int8, const[0, int8], const[0, int8], const[0, int8], array[usb_interface_extra_descriptor, 0:2], array[usb_endpoint_descriptor, 0:16]]
} [packed]
usb_endpoint_descriptor {
@@ -518,7 +519,7 @@ usb_config_descriptor_hid {
} [packed]
usb_interface_descriptor_hid {
- inner usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]
+ inner usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_HID, int8], const[USB_INTERFACE_SUBCLASS_BOOT, int8], flags[usb_hid_protocols, int8], usb_hid_descriptor_hid, usb_endpoint_descriptors_hid]
} [packed]
usb_hid_protocols = 0, USB_INTERFACE_PROTOCOL_KEYBOARD, USB_INTERFACE_PROTOCOL_MOUSE
@@ -652,7 +653,7 @@ usb_config_descriptor_printer {
} [packed]
usb_interface_descriptor_printer {
- inner usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]
+ inner usb_interface_descriptor_t[const[0, int8], int8, int8[1:2], const[USB_CLASS_PRINTER, int8], const[1, int8], int8[USBLP_FIRST_PROTOCOL:USBLP_LAST_PROTOCOL], void, usb_endpoint_descriptors_printer]
} [packed]
usb_endpoint_descriptors_printer {
@@ -725,7 +726,7 @@ usb_config_descriptor_cdc_ethernet {
# Per specification CDC Ethernet devices have two interfaces (control and data), but we're merging
# them into one, as Linux supports this, and syzkaller doesn't support multiple interfaces yet.
usb_interface_descriptor_cdc_ethernet {
- inner usb_interface_descriptor_t[const[0, int8], int8, const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]
+ inner usb_interface_descriptor_t[const[0, int8], int8, in8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_ETHERNET, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ethernet, usb_endpoint_descriptors_cdc_ethernet]
} [packed]
usb_endpoint_descriptors_cdc_ethernet {
@@ -968,7 +969,7 @@ usb_config_descriptor_cdc_ncm {
} [packed]
usb_interface_descriptor_cdc_ncm {
- inner usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]
+ inner usb_interface_descriptor_t[const[0, int8], const[CDC_NCM_COMM_ALTSETTING_NCM, int8], int8[2:3], const[USB_CLASS_COMM, int8], const[USB_CDC_SUBCLASS_NCM, int8], const[USB_CDC_PROTO_NONE, int8], usb_cdc_header_ncm, usb_endpoint_descriptors_cdc_ethernet]
} [packed]
# https://elixir.bootlin.com/linux/v5.2.7/source/drivers/usb/core/message.c#L2137