3 #if BYTE_ORDER == BIG_ENDIAN
7 #define U8_BITFIELD_XOR "7"
8 #define U16_BITFIELD_XOR "15"
9 #define U32_BITFIELD_XOR "31"
10 #define U64_BITFIELD_XOR "63"
15 #define U8_BITFIELD_XOR "0"
16 #define U16_BITFIELD_XOR "0"
17 #define U32_BITFIELD_XOR "0"
18 #define U64_BITFIELD_XOR "0"
21 #if USB_HAVE_COMPAT_LINUX
27 static const char __section("bus_autoconf_format") __used usb_id_format[] = {
30 * Declare three different sections that use the same format.
31 * All sizes are in bits. Fields cannot be greater than
32 * 8 bits in size. Bitfields having a size greater than 1
33 * must fit within the byte in which the bitfield is defined.
37 "usb_device_id{256,:}"
41 * Describe all fields in the usb_device_id structure
42 * which is found in sys/dev/usb/usbdi.h.
45 #if BITS_PER_LONG == 32 || BITS_PER_LONG == 64
50 #if BITS_PER_LONG == 64
57 #error "Please update code."
60 "idVendor[0]{" U16_XOR ",8}"
61 "idVendor[1]{" U16_XOR ",8}"
62 "idProduct[0]{" U16_XOR ",8}"
63 "idProduct[1]{" U16_XOR ",8}"
64 "bcdDevice_lo[0]{" U16_XOR ",8}"
65 "bcdDevice_lo[1]{" U16_XOR ",8}"
66 "bcdDevice_hi[0]{" U16_XOR ",8}"
67 "bcdDevice_hi[1]{" U16_XOR ",8}"
70 "bDeviceSubClass{0,8}"
71 "bDeviceProtocol{0,8}"
72 "bInterfaceClass{0,8}"
73 "bInterfaceSubClass{0,8}"
74 "bInterfaceProtocol{0,8}"
76 /* NOTE: On big endian machines bitfields are bitreversed. */
78 "mf_vendor{" U8_BITFIELD_XOR ",1}"
79 "mf_product{" U8_BITFIELD_XOR ",1}"
80 "mf_dev_lo{" U8_BITFIELD_XOR ",1}"
81 "mf_dev_hi{" U8_BITFIELD_XOR ",1}"
83 "mf_dev_class{" U8_BITFIELD_XOR ",1}"
84 "mf_dev_subclass{" U8_BITFIELD_XOR ",1}"
85 "mf_dev_protocol{" U8_BITFIELD_XOR ",1}"
86 "mf_int_class{" U8_BITFIELD_XOR ",1}"
88 "mf_int_subclass{" U8_BITFIELD_XOR ",1}"
89 "mf_int_protocol{" U8_BITFIELD_XOR ",1}"
90 "unused{" U8_BITFIELD_XOR ",6}"
92 "mfl_vendor{" U16_XOR "," MFL_SIZE "}"
93 "mfl_product{" U16_XOR "," MFL_SIZE "}"
94 "mfl_dev_lo{" U16_XOR "," MFL_SIZE "}"
95 "mfl_dev_hi{" U16_XOR "," MFL_SIZE "}"
97 "mfl_dev_class{" U16_XOR "," MFL_SIZE "}"
98 "mfl_dev_subclass{" U16_XOR "," MFL_SIZE "}"
99 "mfl_dev_protocol{" U16_XOR "," MFL_SIZE "}"
100 "mfl_int_class{" U16_XOR "," MFL_SIZE "}"
102 "mfl_int_subclass{" U16_XOR "," MFL_SIZE "}"
103 "mfl_int_protocol{" U16_XOR "," MFL_SIZE "}"
104 "unused{" U16_XOR "," MFL_SIZE "}"
105 "unused{" U16_XOR "," MFL_SIZE "}"
107 "unused{" U16_XOR "," MFL_SIZE "}"
108 "unused{" U16_XOR "," MFL_SIZE "}"
109 "unused{" U16_XOR "," MFL_SIZE "}"
110 "unused{" U16_XOR "," MFL_SIZE "}"