summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown2015-02-02 15:41:19 +0100
committerMichael Brown2015-02-03 13:33:35 +0100
commitcc5a27f9cbbc43c485c4eceab4bd091714be7505 (patch)
tree2285e53ea90ce4b9b3ad0d9a747e05f8562a0d8e /src/include
parent[usb] Add support for xHCI host controllers (diff)
downloadipxe-cc5a27f9cbbc43c485c4eceab4bd091714be7505.tar.gz
ipxe-cc5a27f9cbbc43c485c4eceab4bd091714be7505.tar.xz
ipxe-cc5a27f9cbbc43c485c4eceab4bd091714be7505.zip
[ncm] Add support for CDC-NCM USB Ethernet devices
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ipxe/cdc.h38
-rw-r--r--src/include/ipxe/errfile.h2
2 files changed, 40 insertions, 0 deletions
diff --git a/src/include/ipxe/cdc.h b/src/include/ipxe/cdc.h
new file mode 100644
index 00000000..2eec598a
--- /dev/null
+++ b/src/include/ipxe/cdc.h
@@ -0,0 +1,38 @@
+#ifndef _IPXE_CDC_H
+#define _IPXE_CDC_H
+
+/** @file
+ *
+ * USB Communications Device Class (CDC)
+ *
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER );
+
+#include <ipxe/usb.h>
+
+/** Class code for communications devices */
+#define USB_CLASS_CDC 2
+
+/** Ethernet descriptor subtype */
+#define CDC_SUBTYPE_ETHERNET 15
+
+/** Network connection notification */
+#define CDC_NETWORK_CONNECTION \
+ ( USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE | \
+ USB_REQUEST_TYPE ( 0x00 ) )
+
+/** Connection speed change notification */
+#define CDC_CONNECTION_SPEED_CHANGE \
+ ( USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE | \
+ USB_REQUEST_TYPE ( 0x2a ) )
+
+/** Connection speed change notification */
+struct cdc_connection_speed_change {
+ /** Downlink bit rate, in bits per second */
+ uint32_t down;
+ /** Uplink bit rate, in bits per second */
+ uint32_t up;
+} __attribute__ (( packed ));
+
+#endif /* _IPXE_CDC_H */
diff --git a/src/include/ipxe/errfile.h b/src/include/ipxe/errfile.h
index 61aedf43..08747549 100644
--- a/src/include/ipxe/errfile.h
+++ b/src/include/ipxe/errfile.h
@@ -161,6 +161,8 @@ FILE_LICENCE ( GPL2_OR_LATER );
#define ERRFILE_netfront ( ERRFILE_DRIVER | 0x00690000 )
#define ERRFILE_nii ( ERRFILE_DRIVER | 0x006a0000 )
#define ERRFILE_netvsc ( ERRFILE_DRIVER | 0x006b0000 )
+#define ERRFILE_ecm ( ERRFILE_DRIVER | 0x006c0000 )
+#define ERRFILE_ncm ( ERRFILE_DRIVER | 0x006d0000 )
#define ERRFILE_scsi ( ERRFILE_DRIVER | 0x00700000 )
#define ERRFILE_arbel ( ERRFILE_DRIVER | 0x00710000 )