forked from tianocore/edk2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MdeModulePkg/Bus/Pci: Fix Descriptor Misalignment in USB Config Handling
The issue with locating the expected interface and endpoint descriptors arises because `configDesc` (USB_CONFIG_DESCRIPTOR) and `IfDesc` (USB_INTERFACE_DESCRIPTOR) are incremented by structure size rather than by actual descriptor length. Specifically: - `configDesc` should be incremented by its actual length. - `IfDesc` should be incremented by its actual length. This incorrect increment causes misalignment, preventing access to the subsequent interface and endpoint descriptors. [Suggested Solution] Update the code to increment the pointers by the actual descriptor lengths, ensuring proper access to all descriptors in the USB configuration. Signed-off-by: Aniket Surekar <[email protected]>
- Loading branch information
1 parent
e8668d2
commit 333e963
Showing
2 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters