/* When a reset is required due to an internal error, the driver notifies the upper layer software of this need through the ErrorHandler callback and specific status codes. The upper layer software is responsible for calling this Reset function and then re-configuring the device. */
void XEmac_Reset(XEmac *InstancePtr)
/* When a reset is required due to an internal error, the driver notifies the upper layer software of this need through the ErrorHandler callback and specific status codes. The upper layer software is responsible for calling this Reset function and then re-configuring the device. */
void XEmac_Reset(XEmac *InstancePtr)
{
	XASSERT_VOID(InstancePtr != NULL);
	XASSERT_VOID(InstancePtr->IsReady == XCOMPONENT_IS_READY);
	(void) XEmac_Stop(InstancePtr);
	InstancePtr->IsPolled = FALSE;
	XIIF_V123B_RESET(InstancePtr->BaseAddress);
	if (XEmac_mIsSgDma(InstancePtr)) {
		(void) XEmac_SetPktThreshold(InstancePtr, XEM_SEND,
					     XEM_SGDMA_DFT_THRESHOLD);
		(void) XEmac_SetPktThreshold(InstancePtr, XEM_RECV,
					     XEM_SGDMA_DFT_THRESHOLD);
		(void) XEmac_SetPktWaitBound(InstancePtr, XEM_SEND,
					     XEM_SGDMA_DFT_WAITBOUND);
		(void) XEmac_SetPktWaitBound(InstancePtr, XEM_RECV,
					     XEM_SGDMA_DFT_WAITBOUND);
	}
}