diff options
author | Jan Dabros <jsd@semihalf.com> | 2021-04-22 16:01:43 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-23 16:05:12 +0000 |
commit | 1a7e7e64cba5954d481b37d96f71e2c6d270bce5 (patch) | |
tree | 184f8df8aa43625f16acb97a67f46dc6216614b7 /board/servo_v4p1/board.c | |
parent | fc81c164c4da5581f9ab4d9cf348dd1d0edb8517 (diff) | |
download | chrome-ec-1a7e7e64cba5954d481b37d96f71e2c6d270bce5.tar.gz |
servo_v4(p1): Implement empty usb interface descriptor
After removal of gpio_over_usb, firmware for servo_v4 was implementing
only 5 interfaces, even tough configuration descriptor claimed 6. This
leads to kernel warning during enumeration and more importantly some
UEFI implementations on high-end devices refused to boot.
Eventually we would like to remove EMPTY identifier and re-define all
consecutive interface numbers, however this bring implications to the
hdctools, which are using hardcoded values during normal operation.
BUG=b:183857501
BRANCH=main
TEST=Connect servo_v4 & servo_v4p1 to server machines (e.g HP,DELL) in
the lab and reboot the server. It should boot without issues
TEST=Plug servo_v4/v4p1 into host computer and verify dmesg. No
warnings should be visible in the output. For error case one may have
seen:
`config 1 has 5 interfaces, different from the descriptor's value: 6
config 1 has no interface number 1`
Signed-off-by: Jan Dabros <jsd@semihalf.com>
Change-Id: Ibc114aaeae7572845d3c6160cb897a9856e2f276
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2846330
Reviewed-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'board/servo_v4p1/board.c')
-rw-r--r-- | board/servo_v4p1/board.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/board/servo_v4p1/board.c b/board/servo_v4p1/board.c index 481b2ac16e..1ec782b2cf 100644 --- a/board/servo_v4p1/board.c +++ b/board/servo_v4p1/board.c @@ -337,6 +337,23 @@ USB_STREAM_CONFIG_USART_IFACE(usart4_usb, usart4) +/* + * Define usb interface descriptor for the `EMPTY` usb interface, to satisfy + * UEFI and kernel requirements (see b/183857501). + */ +const struct usb_interface_descriptor +USB_IFACE_DESC(USB_IFACE_EMPTY) = { + .bLength = USB_DT_INTERFACE_SIZE, + .bDescriptorType = USB_DT_INTERFACE, + .bInterfaceNumber = USB_IFACE_EMPTY, + .bAlternateSetting = 0, + .bNumEndpoints = 0, + .bInterfaceClass = USB_CLASS_VENDOR_SPEC, + .bInterfaceSubClass = 0, + .bInterfaceProtocol = 0, + .iInterface = 0, +}; + /****************************************************************************** * Define the strings used in our USB descriptors. */ |