net/enic: fix Tx crash after restart

If you stop then start a port that had already sent some packets,
there was a segfault due to not resetting the number of completed
sends to zero.

Fixes: a3b1e9551c ("net/enic: streamline mbuf handling in Tx path")

Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
This commit is contained in:
Nelson Escobar 2016-06-29 16:03:20 -07:00 committed by Bruce Richardson
parent b12a4c911a
commit a3d5f0c92a

View File

@ -197,6 +197,8 @@ void vnic_wq_clean(struct vnic_wq *wq,
wq->head_idx = 0;
wq->tail_idx = 0;
wq->last_completed_index = 0;
*((uint32_t *)wq->cqmsg_rz->addr) = 0;
iowrite32(0, &wq->ctrl->fetch_index);
iowrite32(0, &wq->ctrl->posted_index);