-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MdeModulePkg|UsbBusDxe: support USB Interface Association #10558
base: master
Are you sure you want to change the base?
Conversation
94494ae
to
4c2d6f1
Compare
USB_INTERFACE_SETTING *Setting; | ||
USB_INTERFACE_DESC *Interface; | ||
UINTN Index; | ||
UINTN NumIf; |
Check failure
Code scanning / CodeQL
Comparison of narrow type with wide type in loop condition High
Index
... + ...
@@ -752,6 +779,7 @@ UsbBusControllerDriverStop ( | |||
); | |||
|
|||
extern EFI_USB_IO_PROTOCOL mUsbIoProtocol; | |||
extern EDKII_USB_IA_PROTOCOL mUsbIaProtocol; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expand "IA" to full words.
@retval EFI_INVALID_PARAMETER Descriptor is NULL. | ||
|
||
**/ | ||
typedef |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can these be library services instead of a new protocol? If it is a new protocol, then USB Device Drivers will depends on EDK II specific protocols instead of just UEFI Protocols.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this PR we create USB Association handle and install DP and Association protocols on it. This handle is essential If USB Device Driver follows UEFI driver model, it can not be implemented using the library.
If this EDKII protocol is successful, it can be adopted by UEFI specification.
USB Association is a part of USB specification and this PR is an attempt to implement its functionality.
If there is any other way of advertising the new protocol, please advise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the intent is to add to UEFI Spec, then there is a process for that and the doc and code updates would be done in edk2-staging repo.
https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Code-First-Process
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, will move it to edk2-staging. The document above talks about creating a bugzilla issue, I understand bugzilla function has been replaced with github issue. Should the issue be created in edk2 repo or edk2-staging repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good question. Please create in edk2 repo because that is the location the feature will be added once it is available in published spec.
USB Interface Association is a group of UsbIo instances that implement a USB function. UEFI device driver manages multiple UsbIo instances. Examples of such devices are: USB camera, USB serial, USB network, etc. Current approach for supporting these devices is to respond on UsbIo installation and analyze if current UsbIo belongs to the USB association. This algorithm is based on assumptions that may not be correct for different device configurations. Having USB association protocol that reports its associates (UsbIo) simplifies the USB device driver. For the USB configurations that implement USB association the UsbDxeBus driver: - creates USB association device - installs device path - installs USB association IO protocol Signed-off-by: Oleg Ilyasov <[email protected]>
Description
USB Interface Association is a group of UsbIo that implement a USB function. UEFI device driver manages multiple UsbIo instances. Examples of such devices are: USB camera, USB serial, USB network, etc.
Current approach for supporting these devices is to respond on UsbIo installation and analyze if the current UsbIo belongs to the USB association. This algorithm is based on assumptions that may not be correct for different device configurations. Having USB association protocol that reports its associates (UsbIo) simplifies the USB device driver.
For the USB configurations that implement USB association the UsbDxeBus driver:
creates USB association device
installs device path
installs USB association IO protocol
Breaking change?
Impacts security?
Includes tests?
How This Was Tested
<Describe the test(s) that were run to verify the changes.>
Integration Instructions
<Describe how these changes should be integrated. Use N/A if nothing is required.>