提交 b21606a7 编写于 作者: L Linas Vepstas 提交者: Jeff Garzik

[PATCH] powerpc/cell spidernet incorrect offset

Bugfix -- the rx chain is in memory after the tx chain --
the offset being used was wrong, resulting in memory corruption
when the size of the rx and tx rings weren't exactly the same.
Signed-off-by: NLinas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 98b9040c
......@@ -1628,8 +1628,10 @@ spider_net_open(struct net_device *netdev)
if (spider_net_init_chain(card, &card->tx_chain, card->descr,
PCI_DMA_TODEVICE, card->tx_desc))
goto alloc_tx_failed;
/* rx_chain is after tx_chain, so offset is descr + tx_count */
if (spider_net_init_chain(card, &card->rx_chain,
card->descr + card->rx_desc,
card->descr + card->tx_desc,
PCI_DMA_FROMDEVICE, card->rx_desc))
goto alloc_rx_failed;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册