summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network/SnpDxe/Snp.h
diff options
context:
space:
mode:
authorFu Siyuan <siyuan.fu@intel.com>2016-01-08 02:21:25 +0000
committersfu5 <sfu5@Edk2>2016-01-08 02:21:25 +0000
commit7b4b93a24790a3a802138d75167a8e55f3181d70 (patch)
treefca557d13ccca5a31749329cd925ab7ea5910de2 /MdeModulePkg/Universal/Network/SnpDxe/Snp.h
parentc2967d35d84fce6caf6691d2d892d20e8c273601 (diff)
downloadedk2-7b4b93a24790a3a802138d75167a8e55f3181d70.zip
edk2-7b4b93a24790a3a802138d75167a8e55f3181d70.tar.gz
edk2-7b4b93a24790a3a802138d75167a8e55f3181d70.tar.bz2
MdeModulePkg: update SNP.GetStatus to handle multiple recycled TX buffer.
This patch fixes a bug in SNP.GetStatus() interface. The UNDI driver may return multiple transmitted buffers in a single GetStatus command, while SNP.GetStatus could only return one pointer each time, the rest of them are lost. This patch fixes this issue by store these recycled pointer in a temporary buffer in SNP driver. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19623 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/SnpDxe/Snp.h')
-rw-r--r--MdeModulePkg/Universal/Network/SnpDxe/Snp.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/Network/SnpDxe/Snp.h b/MdeModulePkg/Universal/Network/SnpDxe/Snp.h
index f1d0ab3..67f65ff 100644
--- a/MdeModulePkg/Universal/Network/SnpDxe/Snp.h
+++ b/MdeModulePkg/Universal/Network/SnpDxe/Snp.h
@@ -1,7 +1,7 @@
/** @file
Declaration of strctures and functions for SnpDxe driver.
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed
and made available under the terms and conditions of the BSD License which
accompanies this distribution. The full text of the license may be found at
@@ -49,6 +49,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define PCI_BAR_MEM_MODE 0x00000000
#define PCI_BAR_MEM_64BIT 0x00000004
+#define SNP_TX_BUFFER_INCREASEMENT MAX_XMIT_BUFFERS
+#define SNP_MAX_TX_BUFFER_NUM 65536
+
typedef
EFI_STATUS
(EFIAPI *ISSUE_UNDI32_COMMAND) (
@@ -130,6 +133,19 @@ typedef struct {
// i.e. PXE_STATFLAGS_GET_STATUS_NO_MEDIA_SUPPORTED
//
BOOLEAN MediaStatusSupported;
+
+ //
+ // Array of the recycled transmit buffer address from UNDI.
+ //
+ UINT64 *RecycledTxBuf;
+ //
+ // The maximum number of recycled buffer pointers in RecycledTxBuf.
+ //
+ UINT32 MaxRecycledTxBuf;
+ //
+ // Current number of recycled buffer pointers in RecycledTxBuf.
+ //
+ UINT32 RecycledTxBufCount;
} SNP_DRIVER;
#define EFI_SIMPLE_NETWORK_DEV_FROM_THIS(a) CR (a, SNP_DRIVER, Snp, SNP_DRIVER_SIGNATURE)