|
@@ -1314,15 +1314,16 @@ static void mvneta_txq_bufs_free(struct mvneta_port *pp,
|
|
}
|
|
}
|
|
|
|
|
|
/* Handle end of transmission */
|
|
/* Handle end of transmission */
|
|
-static int mvneta_txq_done(struct mvneta_port *pp,
|
|
|
|
|
|
+static void mvneta_txq_done(struct mvneta_port *pp,
|
|
struct mvneta_tx_queue *txq)
|
|
struct mvneta_tx_queue *txq)
|
|
{
|
|
{
|
|
struct netdev_queue *nq = netdev_get_tx_queue(pp->dev, txq->id);
|
|
struct netdev_queue *nq = netdev_get_tx_queue(pp->dev, txq->id);
|
|
int tx_done;
|
|
int tx_done;
|
|
|
|
|
|
tx_done = mvneta_txq_sent_desc_proc(pp, txq);
|
|
tx_done = mvneta_txq_sent_desc_proc(pp, txq);
|
|
- if (tx_done == 0)
|
|
|
|
- return tx_done;
|
|
|
|
|
|
+ if (!tx_done)
|
|
|
|
+ return;
|
|
|
|
+
|
|
mvneta_txq_bufs_free(pp, txq, tx_done);
|
|
mvneta_txq_bufs_free(pp, txq, tx_done);
|
|
|
|
|
|
txq->count -= tx_done;
|
|
txq->count -= tx_done;
|
|
@@ -1331,8 +1332,6 @@ static int mvneta_txq_done(struct mvneta_port *pp,
|
|
if (txq->size - txq->count >= MAX_SKB_FRAGS + 1)
|
|
if (txq->size - txq->count >= MAX_SKB_FRAGS + 1)
|
|
netif_tx_wake_queue(nq);
|
|
netif_tx_wake_queue(nq);
|
|
}
|
|
}
|
|
-
|
|
|
|
- return tx_done;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
static void *mvneta_frag_alloc(const struct mvneta_port *pp)
|
|
static void *mvneta_frag_alloc(const struct mvneta_port *pp)
|