summaryrefslogtreecommitdiffstats
path: root/src/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/bus/usb.c4
-rw-r--r--src/drivers/usb/xhci.c2
-rw-r--r--src/drivers/usb/xhci.h3
3 files changed, 7 insertions, 2 deletions
diff --git a/src/drivers/bus/usb.c b/src/drivers/bus/usb.c
index 22a57e6e5..57a253320 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 );
diff --git a/src/drivers/usb/xhci.c b/src/drivers/usb/xhci.c
index 5d067bd05..34290774a 100644
--- a/src/drivers/usb/xhci.c
+++ b/src/drivers/usb/xhci.c
@@ -3117,7 +3117,7 @@ static int xhci_probe ( struct pci_device *pci ) {
goto err_reset;
/* Allocate USB bus */
- xhci->bus = alloc_usb_bus ( &pci->dev, xhci->ports,
+ xhci->bus = alloc_usb_bus ( &pci->dev, xhci->ports, XHCI_MTU,
&xhci_operations );
if ( ! xhci->bus ) {
rc = -ENOMEM;
diff --git a/src/drivers/usb/xhci.h b/src/drivers/usb/xhci.h
index 269f50b82..303208071 100644
--- a/src/drivers/usb/xhci.h
+++ b/src/drivers/usb/xhci.h
@@ -24,6 +24,9 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
*/
#define XHCI_MIN_ALIGN 64
+/** Maximum transfer size */
+#define XHCI_MTU 65536
+
/** xHCI PCI BAR */
#define XHCI_BAR PCI_BASE_ADDRESS_0