OpenProtocol() giving me EFI_INVALID_PARAMETER


Ethin Probst
 

Hey all,

So my UsbAudio.efi app has hit a bit of a roadblock. This code:

```C
status = st->BootServices->OpenProtocol(handles[i],
&gEfiUsbIoProtocolGuid, (void**)&UsbIo, imageHandle, NULL,
EFI_OPEN_PROTOCOL_EXCLUSIVE);
if (EFI_ERROR(status)) {
Print(L"%r, skipping\n", status);
continue;
}
```
Is giving me EFI_INVALID_PARAMETER and I don't know why. I don't think
I'm violating any of its constraints, according to the specification,
and I haven't touched this code since it was written. It also happens
irregularly: sometimes it happens on the USB audio streaming device,
or if I have a device plugged in it might happen on that device, you
get the idea. But it doesn't consistently fail. Does anybody have any
idea what's going on?

--
Signed,
Ethin D. Probst

Join devel@edk2.groups.io to automatically receive all group messages.