|
|
@@ -314,6 +314,7 @@ sitaraif_transmit(struct sitaraif *sitaraif, struct pbuf *pbuf) {
|
|
|
else {
|
|
|
curr_bd = txch->active_tail;
|
|
|
curr_bd->next = active_head;
|
|
|
+ //while((curr_bd->flags_pktlen & EMAC_BUF_DESC_EOQ) != EMAC_BUF_DESC_EOQ);
|
|
|
if(curr_bd->flags_pktlen & EMAC_BUF_DESC_EOQ) {
|
|
|
/* Write the Header Descriptor Pointer and start DMA */
|
|
|
EMACTxHdrDescPtrWrite(sitaraif->emac_base, (unsigned int)(active_head), 0);
|
|
|
@@ -753,22 +754,20 @@ sitaraif_tx_inthandler(struct netif *netif) {
|
|
|
struct txch *txch;
|
|
|
struct sitaraif *sitaraif;
|
|
|
volatile struct emac_tx_bd *curr_bd, *next_bd_to_process;
|
|
|
-
|
|
|
sitaraif = netif->state;
|
|
|
txch = &(sitaraif->txch);
|
|
|
|
|
|
next_bd_to_process = txch->next_bd_to_process;
|
|
|
|
|
|
curr_bd = next_bd_to_process;
|
|
|
-
|
|
|
/* Check for correct start of packet */
|
|
|
while((curr_bd->flags_pktlen) & EMAC_BUF_DESC_SOP) {
|
|
|
|
|
|
/* Make sure that the transmission is over */
|
|
|
while((curr_bd->flags_pktlen & EMAC_BUF_DESC_OWNER)
|
|
|
== EMAC_BUF_DESC_OWNER);
|
|
|
-
|
|
|
- /* Traverse till the end of packet is reached */
|
|
|
+
|
|
|
+ /* Traverse till the end of packet is reached */
|
|
|
while(((curr_bd->flags_pktlen) & EMAC_BUF_DESC_EOP) != EMAC_BUF_DESC_EOP) {
|
|
|
curr_bd = curr_bd->next;
|
|
|
}
|
|
|
@@ -790,7 +789,6 @@ sitaraif_tx_inthandler(struct netif *netif) {
|
|
|
|
|
|
/* Acknowledge the EMAC and free the corresponding pbuf */
|
|
|
EMACTxCPWrite(sitaraif->emac_base, 0, (u32_t)curr_bd);
|
|
|
-
|
|
|
pbuf_free((struct pbuf *)curr_bd->pbuf);
|
|
|
|
|
|
LINK_STATS_INC(link.xmit);
|