]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[usb] Add USB_INTERRUPT_OUT internal type
authorMichael Brown <mcb30@ipxe.org>
Mon, 11 May 2015 13:56:46 +0000 (14:56 +0100)
committerMichael Brown <mcb30@ipxe.org>
Mon, 11 May 2015 13:56:46 +0000 (14:56 +0100)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/bus/usb.c
src/drivers/usb/usbhub.c
src/drivers/usb/usbnet.c
src/include/ipxe/usb.h

index fd7a2a6fe6fa2730c3d1211efd160ef2b15eb44d..085caf23b9aec334afba80eb6a6576e70192aa21 100644 (file)
@@ -265,7 +265,8 @@ int usb_endpoint_described ( struct usb_endpoint *ep,
        burst = ( descx ? descx->burst : USB_ENDPOINT_BURST ( sizes ) );
 
        /* Calculate interval */
-       if ( type == USB_INTERRUPT ) {
+       if ( ( type & USB_ENDPOINT_ATTR_TYPE_MASK ) ==
+            USB_ENDPOINT_ATTR_INTERRUPT ) {
                if ( port->speed >= USB_SPEED_HIGH ) {
                        /* 2^(desc->interval-1) is a microframe count */
                        interval = ( 1 << ( desc->interval - 1 ) );
index 8b5fa9c4d1ecdb64c05bcfdcb9cfb75ee109cfc1..bf2a2000565a2bfd8dd4214f5aaa5fec5e91eb3f 100644 (file)
@@ -425,7 +425,7 @@ static int hub_probe ( struct usb_function *func,
 
        /* Locate interrupt endpoint descriptor */
        if ( ( rc = usb_endpoint_described ( &hubdev->intr, config, interface,
-                                            USB_INTERRUPT, 0 ) ) != 0 ) {
+                                            USB_INTERRUPT_IN, 0 ) ) != 0 ) {
                DBGC ( hubdev, "HUB %s could not describe interrupt endpoint: "
                       "%s\n", hubdev->name, strerror ( rc ) );
                goto err_endpoint;
index 60f580253229d8bee312357fae90e28ba235b282..b92336d052999a3c9b4098183411501038eee5df 100644 (file)
@@ -185,7 +185,7 @@ static int usbnet_comms_describe ( struct usbnet_device *usbnet,
 
                /* Describe interrupt endpoint */
                if ( ( rc = usb_endpoint_described ( &usbnet->intr, config,
-                                                    desc, USB_INTERRUPT,
+                                                    desc, USB_INTERRUPT_IN,
                                                     0 ) ) != 0 )
                        continue;
 
index 0b27d02cb445a545307cd821831a30b452be521a..ab060b8f48b4908add3ea094201a24962562379b 100644 (file)
@@ -277,8 +277,11 @@ struct usb_endpoint_descriptor {
 /** Bulk IN endpoint (internal) type */
 #define USB_BULK_IN ( USB_ENDPOINT_ATTR_BULK | USB_DIR_IN )
 
-/** Interrupt endpoint (internal) type */
-#define USB_INTERRUPT ( USB_ENDPOINT_ATTR_INTERRUPT | USB_DIR_IN )
+/** Interrupt IN endpoint (internal) type */
+#define USB_INTERRUPT_IN ( USB_ENDPOINT_ATTR_INTERRUPT | USB_DIR_IN )
+
+/** Interrupt OUT endpoint (internal) type */
+#define USB_INTERRUPT_OUT ( USB_ENDPOINT_ATTR_INTERRUPT | USB_DIR_OUT )
 
 /** USB endpoint MTU */
 #define USB_ENDPOINT_MTU(sizes) ( ( (sizes) >> 0 ) & 0x07ff )