mirror of
https://github.com/ipxe/ipxe
synced 2026-01-01 09:09:32 +03:00
[usb] Select preferred USB device configuration based on driver score
Generate a score for each possible USB device configuration based on the available driver support, and select the configuration with the highest score. This will allow us to prefer ECM over RNDIS (for devices which support both) and will allow us to meaningfully select a configuration even when we have drivers available for all functions (e.g. when exposing unused functions via EFI_USB_IO_PROTOCOL). Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -515,6 +515,7 @@ static struct usb_device_id ecm_ids[] = {
|
||||
struct usb_driver ecm_driver __usb_driver = {
|
||||
.ids = ecm_ids,
|
||||
.id_count = ( sizeof ( ecm_ids ) / sizeof ( ecm_ids[0] ) ),
|
||||
.score = USB_SCORE_NORMAL,
|
||||
.probe = ecm_probe,
|
||||
.remove = ecm_remove,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user