Skip to content
Commit 8b5fe624 authored by Joel Holdsworth's avatar Joel Holdsworth Committed by Benjamin Cabé
Browse files

include: usb_ch9: ensure packing of usb_setup_packet



struct usb_setup_packet represents the setup data payload of a USB control
message which is exactly 8-bytes in length.

On a legacy build of GCC 4.1.2 for an OpenRISC-like architecture it was
found that the compiler added padding after the bmRequestType anonymous
union, and subsequently the bRequest field causing the structure to be
padded to 12-bytes in length with the fields incorrectly laid out.

This patch corrects the issue by applying the __packed attribute to the
anonymous union. This corrects the issue.

The __packed attribute is also applied to the outer structure for the sake
of consistency.

Signed-off-by: default avatarJoel Holdsworth <jholdsworth@nvidia.com>
parent 39916042
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment