Commit 7312da3c authored by Alessandro Rubini's avatar Alessandro Rubini Committed by Adam Wujek

minic: assert tx fifo is not full

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 3b630300
......@@ -11,6 +11,7 @@
#include <string.h>
#include <wrc.h>
#include <wrpc.h>
#include <assert.h>
#include "types.h"
#include "board.h"
......@@ -269,8 +270,9 @@ int minic_tx_frame(struct wr_ethhdr_vlan *hdr, uint8_t *payload, uint32_t size,
minic_txword(WRF_OOB, WRPC_FID);
}
/* Start sending the frame */
/* Start sending the frame, and while we read mcr check for fifo full */
mcr = minic_readl(MINIC_REG_MCR);
assert((mcr & MINIC_MCR_TX_FULL) == 0, "Minic tx fifo full");
minic_writel(MINIC_REG_MCR, mcr | MINIC_MCR_TX_START);
/* wait for the DMA to finish */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment