summaryrefslogtreecommitdiffstats
path: root/src/drivers/bus
diff options
context:
space:
mode:
authorMichael Brown2015-12-07 01:32:08 +0100
committerMichael Brown2015-12-07 14:08:23 +0100
commitfb8c52de9b50d3562ce08469f23bbd221946519d (patch)
tree08cccbbed849605a6f41fe8b4733f44f1cc0a6ae /src/drivers/bus
parent[usb] Record USB device speed separately from current port speed (diff)
downloadipxe-fb8c52de9b50d3562ce08469f23bbd221946519d.tar.gz
ipxe-fb8c52de9b50d3562ce08469f23bbd221946519d.tar.xz
ipxe-fb8c52de9b50d3562ce08469f23bbd221946519d.zip
[usb] Allow USB device IDs to include arbitrary driver-specific data
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/bus')
-rw-r--r--src/drivers/bus/usb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/drivers/bus/usb.c b/src/drivers/bus/usb.c
index a3718d83..b1fa4efb 100644
--- a/src/drivers/bus/usb.c
+++ b/src/drivers/bus/usb.c
@@ -1186,6 +1186,11 @@ static int usb_probe ( struct usb_function *func,
return -ENOENT;
}
+ /* Record driver */
+ func->driver = driver;
+ func->id = id;
+ func->dev.driver_name = id->name;
+
/* Probe driver */
if ( ( rc = driver->probe ( func, config ) ) != 0 ) {
DBGC ( usb, "USB %s failed to probe driver %s: %s\n",
@@ -1193,9 +1198,6 @@ static int usb_probe ( struct usb_function *func,
return rc;
}
- /* Record driver */
- func->driver = driver;
- func->dev.driver_name = id->name;
return 0;
}