]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OptionRomPkg/Bus/Usb/UsbNetworking/Ax88772/Ax88772.h
Ax88772: Add logic to separate packet, fix MTU issue. Ax88772b: Fix driver model...
[mirror_edk2.git] / OptionRomPkg / Bus / Usb / UsbNetworking / Ax88772 / Ax88772.h
index fa4008c2cf5e486a91937d41acf8a19f3f255c16..3c02725bdc08af5381c715514ecce5b0d5546c53 100644 (file)
 //------------------------------------------------------------------------------\r
 //  Macros\r
 //------------------------------------------------------------------------------\r
-\r
-#if defined(_MSC_VER)           /* Handle Microsoft VC++ compiler specifics. */\r
-#define DBG_ENTER()             DEBUG (( DEBUG_INFO, "Entering " __FUNCTION__ "\n" )) ///<  Display routine entry\r
-#define DBG_EXIT()              DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ "\n" ))  ///<  Display routine exit\r
-#define DBG_EXIT_DEC(Status)    DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ ", Status: %d\n", Status ))      ///<  Display routine exit with decimal value\r
-#define DBG_EXIT_HEX(Status)    DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ ", Status: 0x%08x\n", Status ))  ///<  Display routine exit with hex value\r
-#define DBG_EXIT_STATUS(Status) DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ ", Status: %r\n", Status ))      ///<  Display routine exit with status value\r
-#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\r
-#else   //  _MSC_VER\r
+//\r
+//Too many output debug info hangs system in Debug tip\r
+//\r
+//#if defined(_MSC_VER)           /* Handle Microsoft VC++ compiler specifics. */\r
+//#define DBG_ENTER()             DEBUG (( DEBUG_INFO, "Entering " __FUNCTION__ "\n" )) ///<  Display routine entry\r
+//#define DBG_EXIT()              DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ "\n" ))  ///<  Display routine exit\r
+//#define DBG_EXIT_DEC(Status)    DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ ", Status: %d\n", Status ))      ///<  Display routine exit with decimal value\r
+//#define DBG_EXIT_HEX(Status)    DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ ", Status: 0x%08x\n", Status ))  ///<  Display routine exit with hex value\r
+//#define DBG_EXIT_STATUS(Status) DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ ", Status: %r\n", Status ))      ///<  Display routine exit with status value\r
+//#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\r
+//#else   //  _MSC_VER\r
 #define DBG_ENTER()               ///<  Display routine entry\r
 #define DBG_EXIT()                ///<  Display routine exit\r
 #define DBG_EXIT_DEC(Status)      ///<  Display routine exit with decimal value\r
 #define DBG_EXIT_HEX(Status)      ///<  Display routine exit with hex value\r
 #define DBG_EXIT_STATUS(Status)   ///<  Display routine exit with status value\r
 #define DBG_EXIT_TF(Status)       ///<  Display routine with TRUE/FALSE value\r
-#endif  //  _MSC_VER\r
+//#endif  //  _MSC_VER\r
 \r
 #define USB_IS_IN_ENDPOINT(EndPointAddr)      (((EndPointAddr) & BIT7) != 0)  ///<  Return TRUE/FALSE for IN direction\r
 #define USB_IS_OUT_ENDPOINT(EndPointAddr)     (((EndPointAddr) & BIT7) == 0)  ///<  Return TRUE/FALSE for OUT direction\r
@@ -80,6 +82,8 @@
 #define ETHERNET_HEADER_SIZE  sizeof ( ETHERNET_HEADER )  ///<  Size in bytes of the Ethernet header\r
 #define MIN_ETHERNET_PKT_SIZE 60    ///<  Minimum packet size including Ethernet header\r
 #define MAX_ETHERNET_PKT_SIZE 1500  ///<  Ethernet spec 3.1.1: Minimum packet size\r
+#define MAX_BULKIN_SIZE       2048  ///<  Maximum size of one UsbBulk \r
+\r
 \r
 #define USB_NETWORK_CLASS   0x09    ///<  USB Network class code\r
 #define USB_BUS_TIMEOUT     1000    ///<  USB timeout in milliseconds\r
@@ -340,6 +344,7 @@ typedef struct {
   RX_TX_PACKET * pRxTail;   ///<  Tail of receive packet list\r
   RX_TX_PACKET * pRxFree;   ///<  Free packet list\r
   INT32 MulticastHash[2];   ///<  Hash table for multicast destination addresses\r
+  UINT8 * pBulkInBuff;      ///<  Buffer for Usb Bulk\r
 } NIC_DEVICE;\r
 \r
 #define DEV_FROM_SIMPLE_NETWORK(a)  CR (a, NIC_DEVICE, SimpleNetwork, DEV_SIGNATURE)  ///< Locate NIC_DEVICE from Simple Network Protocol\r