summaryrefslogtreecommitdiff
path: root/OptionRomPkg/Bus/Usb/UsbNetworking/Ax88772/Ax88772.h
diff options
context:
space:
mode:
authorYu Pei <pei.yu@intel.com>2013-06-27 05:07:29 +0000
committerqianouyang <qianouyang@6f19259b-4bc3-4df7-8a09-765794883524>2013-06-27 05:07:29 +0000
commit4986bbaf1151d1cccc1f2589bd13a86b539676b2 (patch)
tree978f1316e6cd66d885ed3de0974d860bb196ae4e /OptionRomPkg/Bus/Usb/UsbNetworking/Ax88772/Ax88772.h
parentca243131657ba03f58206a417b938aa14cff585c (diff)
downloadedk2-platforms-4986bbaf1151d1cccc1f2589bd13a86b539676b2.tar.xz
Ax88772: Add logic to separate packet, fix MTU issue. Ax88772b: Fix driver model unload function, fix SCT test failures.
Signed-off-by: Yu Pei <pei.yu@intel.com> Reviewed-by: Ouyang Qian <qian.ouyang@intel.com> Reviewed-by: Leahy, Leroy P <Leroy.P.Leahy@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14443 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OptionRomPkg/Bus/Usb/UsbNetworking/Ax88772/Ax88772.h')
-rw-r--r--OptionRomPkg/Bus/Usb/UsbNetworking/Ax88772/Ax88772.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/OptionRomPkg/Bus/Usb/UsbNetworking/Ax88772/Ax88772.h b/OptionRomPkg/Bus/Usb/UsbNetworking/Ax88772/Ax88772.h
index fa4008c2cf..3c02725bdc 100644
--- a/OptionRomPkg/Bus/Usb/UsbNetworking/Ax88772/Ax88772.h
+++ b/OptionRomPkg/Bus/Usb/UsbNetworking/Ax88772/Ax88772.h
@@ -39,22 +39,24 @@
//------------------------------------------------------------------------------
// Macros
//------------------------------------------------------------------------------
-
-#if defined(_MSC_VER) /* Handle Microsoft VC++ compiler specifics. */
-#define DBG_ENTER() DEBUG (( DEBUG_INFO, "Entering " __FUNCTION__ "\n" )) ///< Display routine entry
-#define DBG_EXIT() DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ "\n" )) ///< Display routine exit
-#define DBG_EXIT_DEC(Status) DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ ", Status: %d\n", Status )) ///< Display routine exit with decimal value
-#define DBG_EXIT_HEX(Status) DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ ", Status: 0x%08x\n", Status )) ///< Display routine exit with hex value
-#define DBG_EXIT_STATUS(Status) DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ ", Status: %r\n", Status )) ///< Display routine exit with status value
-#define DBG_EXIT_TF(Status) DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ ", returning %s\n", (FALSE == Status) ? L"FALSE" : L"TRUE" )) ///< Display routine with TRUE/FALSE value
-#else // _MSC_VER
+//
+//Too many output debug info hangs system in Debug tip
+//
+//#if defined(_MSC_VER) /* Handle Microsoft VC++ compiler specifics. */
+//#define DBG_ENTER() DEBUG (( DEBUG_INFO, "Entering " __FUNCTION__ "\n" )) ///< Display routine entry
+//#define DBG_EXIT() DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ "\n" )) ///< Display routine exit
+//#define DBG_EXIT_DEC(Status) DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ ", Status: %d\n", Status )) ///< Display routine exit with decimal value
+//#define DBG_EXIT_HEX(Status) DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ ", Status: 0x%08x\n", Status )) ///< Display routine exit with hex value
+//#define DBG_EXIT_STATUS(Status) DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ ", Status: %r\n", Status )) ///< Display routine exit with status value
+//#define DBG_EXIT_TF(Status) DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ ", returning %s\n", (FALSE == Status) ? L"FALSE" : L"TRUE" )) ///< Display routine with TRUE/FALSE value
+//#else // _MSC_VER
#define DBG_ENTER() ///< Display routine entry
#define DBG_EXIT() ///< Display routine exit
#define DBG_EXIT_DEC(Status) ///< Display routine exit with decimal value
#define DBG_EXIT_HEX(Status) ///< Display routine exit with hex value
#define DBG_EXIT_STATUS(Status) ///< Display routine exit with status value
#define DBG_EXIT_TF(Status) ///< Display routine with TRUE/FALSE value
-#endif // _MSC_VER
+//#endif // _MSC_VER
#define USB_IS_IN_ENDPOINT(EndPointAddr) (((EndPointAddr) & BIT7) != 0) ///< Return TRUE/FALSE for IN direction
#define USB_IS_OUT_ENDPOINT(EndPointAddr) (((EndPointAddr) & BIT7) == 0) ///< Return TRUE/FALSE for OUT direction
@@ -80,6 +82,8 @@
#define ETHERNET_HEADER_SIZE sizeof ( ETHERNET_HEADER ) ///< Size in bytes of the Ethernet header
#define MIN_ETHERNET_PKT_SIZE 60 ///< Minimum packet size including Ethernet header
#define MAX_ETHERNET_PKT_SIZE 1500 ///< Ethernet spec 3.1.1: Minimum packet size
+#define MAX_BULKIN_SIZE 2048 ///< Maximum size of one UsbBulk
+
#define USB_NETWORK_CLASS 0x09 ///< USB Network class code
#define USB_BUS_TIMEOUT 1000 ///< USB timeout in milliseconds
@@ -340,6 +344,7 @@ typedef struct {
RX_TX_PACKET * pRxTail; ///< Tail of receive packet list
RX_TX_PACKET * pRxFree; ///< Free packet list
INT32 MulticastHash[2]; ///< Hash table for multicast destination addresses
+ UINT8 * pBulkInBuff; ///< Buffer for Usb Bulk
} NIC_DEVICE;
#define DEV_FROM_SIMPLE_NETWORK(a) CR (a, NIC_DEVICE, SimpleNetwork, DEV_SIGNATURE) ///< Locate NIC_DEVICE from Simple Network Protocol