提交 e44d38e1 编写于 作者: A Anton Blanchard 提交者: David S. Miller

ixgbe: Fix ixgbe_tx_map error path

Commit e5a43549 (ixgbe: remove
skb_dma_map/unmap calls from driver) looks to have introduced a bug in
ixgbe_tx_map. If we get an error from a PCI DMA call, we loop backwards
through count until it becomes -1 and return that.

The caller of ixgbe_tx_map expects 0 on error, so return that instead.
Signed-off-by: NAnton Blanchard <anton@samba.org>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e15eec28
......@@ -5179,7 +5179,7 @@ static int ixgbe_tx_map(struct ixgbe_adapter *adapter,
ixgbe_unmap_and_free_tx_resource(adapter, tx_buffer_info);
}
return count;
return 0;
}
static void ixgbe_tx_queue(struct ixgbe_adapter *adapter,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册