diff options
author | Michael Brown <mcb30@ipxe.org> | 2015-09-14 17:52:25 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2015-09-14 21:56:40 +0100 |
commit | 668dc73d526fa67957b9c10100f9ca5f2ab60522 (patch) | |
tree | cf6887506d5ac016fd04497cbd568463292903de /src/drivers/usb/usbio.c | |
parent | 549a0caabb2f239fc702ccea3c1825518e13d121 (diff) | |
download | ipxe-668dc73d526fa67957b9c10100f9ca5f2ab60522.tar.gz |
[usb] Allow for wildcard USB class IDs
Make the class ID a property of the USB driver (rather than a property
of the USB device ID), and allow USB drivers to specify a wildcard ID
for any of the three component IDs (class, subclass, or protocol).
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/usb/usbio.c')
-rw-r--r-- | src/drivers/usb/usbio.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/drivers/usb/usbio.c b/src/drivers/usb/usbio.c index 55c61ed49..153f39421 100644 --- a/src/drivers/usb/usbio.c +++ b/src/drivers/usb/usbio.c @@ -1316,6 +1316,7 @@ static int usbio_supported ( EFI_HANDLE handle ) { "%s\n", efi_handle_name ( handle ), strerror ( rc ) ); goto err_get_device_descriptor; } + memset ( &desc, 0, sizeof ( desc ) ); desc.vendor = device.IdVendor; desc.product = device.IdProduct; @@ -1327,9 +1328,9 @@ static int usbio_supported ( EFI_HANDLE handle ) { "%s\n", efi_handle_name ( handle ), strerror ( rc ) ); goto err_get_interface_descriptor; } - desc.class.class = interface.InterfaceClass; - desc.class.subclass = interface.InterfaceSubClass; - desc.class.protocol = interface.InterfaceProtocol; + desc.class.class.class = interface.InterfaceClass; + desc.class.class.subclass = interface.InterfaceSubClass; + desc.class.class.protocol = interface.InterfaceProtocol; /* Look for a driver for this interface */ driver = usb_find_driver ( &desc, &id ); |