Merge branch 'master' of git://git.denx.de/u-boot-spi
[oweals/u-boot.git] / include / linux / usb / cdc.h
index 9b129c9ed2496c6c463ce9e0477333232d7efae6..442316b4e2cf629aaf9196fdda6fdde8c0a2114b 100644 (file)
@@ -5,12 +5,10 @@
  * notably ethernet adapters and various modems.  It's used mostly with
  * firmware based USB peripherals.
  *
- * Ported to U-boot by: Thomas Smits <ts.smits@gmail.com> and
+ * Ported to U-Boot by: Thomas Smits <ts.smits@gmail.com> and
  *                      Remy Bohmer <linux@bohmer.net>
  */
 
-
-
 #define USB_CDC_SUBCLASS_ACM                   0x02
 #define USB_CDC_SUBCLASS_ETHERNET              0x06
 #define USB_CDC_SUBCLASS_WHCM                  0x08
  * Class-Specific descriptors ... there are a couple dozen of them
  */
 
-#define USB_CDC_HEADER_TYPE            0x00            /* header_desc */
-#define USB_CDC_CALL_MANAGEMENT_TYPE   0x01            /* call_mgmt_descriptor */
-#define USB_CDC_ACM_TYPE               0x02            /* acm_descriptor */
-#define USB_CDC_UNION_TYPE             0x06            /* union_desc */
+#define USB_CDC_HEADER_TYPE            0x00    /* header_desc */
+#define USB_CDC_CALL_MANAGEMENT_TYPE   0x01    /* call_mgmt_descriptor */
+#define USB_CDC_ACM_TYPE               0x02    /* acm_descriptor */
+#define USB_CDC_UNION_TYPE             0x06    /* union_desc */
 #define USB_CDC_COUNTRY_TYPE           0x07
-#define USB_CDC_NETWORK_TERMINAL_TYPE  0x0a            /* network_terminal_desc */
-#define USB_CDC_ETHERNET_TYPE          0x0f            /* ether_desc */
+#define USB_CDC_NETWORK_TERMINAL_TYPE  0x0a    /* network_terminal_desc */
+#define USB_CDC_ETHERNET_TYPE          0x0f    /* ether_desc */
 #define USB_CDC_WHCM_TYPE              0x11
-#define USB_CDC_MDLM_TYPE              0x12            /* mdlm_desc */
-#define USB_CDC_MDLM_DETAIL_TYPE       0x13            /* mdlm_detail_desc */
+#define USB_CDC_MDLM_TYPE              0x12    /* mdlm_desc */
+#define USB_CDC_MDLM_DETAIL_TYPE       0x13    /* mdlm_detail_desc */
 #define USB_CDC_DMM_TYPE               0x14
 #define USB_CDC_OBEX_TYPE              0x15
 
@@ -160,6 +158,9 @@ struct usb_cdc_mdlm_detail_desc {
  *
  * section 3.6.2.1 table 4 has the ACM profile, for modems.
  * section 3.8.2 table 10 has the ethernet profile.
+ *
+ * Microsoft's RNDIS stack for Ethernet is a vendor-specific CDC ACM variant,
+ * heavily dependent on the encapsulated (proprietary) command mechanism.
  */
 
 #define USB_CDC_SEND_ENCAPSULATED_COMMAND      0x00
@@ -199,14 +200,14 @@ struct usb_cdc_line_coding {
 #define        USB_CDC_PACKET_TYPE_BROADCAST           (1 << 3)
 #define        USB_CDC_PACKET_TYPE_MULTICAST           (1 << 4) /* filtered */
 
-
 /*-------------------------------------------------------------------------*/
 
 /*
  * Class-Specific Notifications (6.3) sent by interrupt transfers
  *
  * section 3.8.2 table 11 of the CDC spec lists Ethernet notifications
- * section 3.6.2.1 table 5 specifies ACM notifications
+ * section 3.6.2.1 table 5 specifies ACM notifications, accepted by RNDIS
+ * RNDIS also defines its own bit-incompatible notifications
  */
 
 #define USB_CDC_NOTIFY_NETWORK_CONNECTION      0x00
@@ -221,4 +222,3 @@ struct usb_cdc_notification {
        __le16  wIndex;
        __le16  wLength;
 } __attribute__ ((packed));
-