summaryrefslogtreecommitdiffstats
path: root/src/drivers/bus
diff options
context:
space:
mode:
authorMichael Brown2015-03-16 06:39:14 +0100
committerMichael Brown2015-03-16 16:40:53 +0100
commit7b6765ff1b13f088f2ac41556b8639a35bd6b893 (patch)
tree0b9fda41653e73a378aeb5fb99d473672722da34 /src/drivers/bus
parent[libc] Add ffs(), ffsl(), and ffsll() (diff)
downloadipxe-7b6765ff1b13f088f2ac41556b8639a35bd6b893.tar.gz
ipxe-7b6765ff1b13f088f2ac41556b8639a35bd6b893.tar.xz
ipxe-7b6765ff1b13f088f2ac41556b8639a35bd6b893.zip
[usb] Add the concept of a USB bus maximum transfer size
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/bus')
-rw-r--r--src/drivers/bus/usb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/drivers/bus/usb.c b/src/drivers/bus/usb.c
index 22a57e6e..57a25332 100644
--- a/src/drivers/bus/usb.c
+++ b/src/drivers/bus/usb.c
@@ -1736,11 +1736,12 @@ void free_usb_hub ( struct usb_hub *hub ) {
*
* @v dev Underlying hardware device
* @v ports Number of root hub ports
+ * @v mtu Largest transfer allowed on the bus
* @v op Host controller operations
* @ret bus USB bus, or NULL on allocation failure
*/
struct usb_bus * alloc_usb_bus ( struct device *dev, unsigned int ports,
- struct usb_host_operations *op ) {
+ size_t mtu, struct usb_host_operations *op ) {
struct usb_bus *bus;
/* Allocate and initialise structure */
@@ -1749,6 +1750,7 @@ struct usb_bus * alloc_usb_bus ( struct device *dev, unsigned int ports,
goto err_alloc_bus;
bus->name = dev->name;
bus->dev = dev;
+ bus->mtu = mtu;
bus->op = op;
INIT_LIST_HEAD ( &bus->devices );
INIT_LIST_HEAD ( &bus->hubs );