diff options
author | Linas Vepstas <linas@austin.ibm.com> | 2006-10-10 17:09:40 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-10-11 04:04:26 -0400 |
commit | b21606a773faffc2b3ec326325c433bdf37ecbdf (patch) | |
tree | 59bfbf079f3770ead9e3a5eae777d0f972ddc7e9 | |
parent | 98b9040c747e50fe02ad616c9d5fee9aa4017cd1 (diff) |
[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: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r-- | drivers/net/spider_net.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index 0eeff1add882..d779a0b9d456 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c | |||
@@ -1628,8 +1628,10 @@ spider_net_open(struct net_device *netdev) | |||
1628 | if (spider_net_init_chain(card, &card->tx_chain, card->descr, | 1628 | if (spider_net_init_chain(card, &card->tx_chain, card->descr, |
1629 | PCI_DMA_TODEVICE, card->tx_desc)) | 1629 | PCI_DMA_TODEVICE, card->tx_desc)) |
1630 | goto alloc_tx_failed; | 1630 | goto alloc_tx_failed; |
1631 | |||
1632 | /* rx_chain is after tx_chain, so offset is descr + tx_count */ | ||
1631 | if (spider_net_init_chain(card, &card->rx_chain, | 1633 | if (spider_net_init_chain(card, &card->rx_chain, |
1632 | card->descr + card->rx_desc, | 1634 | card->descr + card->tx_desc, |
1633 | PCI_DMA_FROMDEVICE, card->rx_desc)) | 1635 | PCI_DMA_FROMDEVICE, card->rx_desc)) |
1634 | goto alloc_rx_failed; | 1636 | goto alloc_rx_failed; |
1635 | 1637 | ||