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
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user