summaryrefslogtreecommitdiff
path: root/drivers/net/greth.c
diff options
context:
space:
mode:
authorDaniel Hellstrom <daniel@gaisler.com>2010-10-22 11:36:39 +0200
committerDaniel Hellstrom <daniel@gaisler.com>2010-11-18 08:33:25 +0100
commited52d121d34078fbf13bd5ea2ed52800a7da2051 (patch)
tree8b317707ff5054f7b2f294f02d899711a14c236e /drivers/net/greth.c
parent533b67d4bf310c445745bdd605edc2ff9dc6b921 (diff)
downloadu-boot-imx-ed52d121d34078fbf13bd5ea2ed52800a7da2051.zip
u-boot-imx-ed52d121d34078fbf13bd5ea2ed52800a7da2051.tar.gz
u-boot-imx-ed52d121d34078fbf13bd5ea2ed52800a7da2051.tar.bz2
GRETH: fixed 2 decriptor table typos
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Diffstat (limited to 'drivers/net/greth.c')
-rw-r--r--drivers/net/greth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/greth.c b/drivers/net/greth.c
index f081855..0566e68 100644
--- a/drivers/net/greth.c
+++ b/drivers/net/greth.c
@@ -168,7 +168,7 @@ int greth_init(struct eth_device *dev, bd_t * bis)
greth->rxbd_base = (greth_bd *)
memalign(0x1000, GRETH_RXBD_CNT * sizeof(greth_bd));
greth->txbd_base = (greth_bd *)
- memalign(0x1000, GRETH_RXBD_CNT * sizeof(greth_bd));
+ memalign(0x1000, GRETH_TXBD_CNT * sizeof(greth_bd));
/* allocate buffers to all descriptors */
greth->rxbuf_base =
@@ -200,7 +200,7 @@ int greth_init(struct eth_device *dev, bd_t * bis)
for (i = 0; i < GRETH_TXBD_CNT; i++) {
greth->txbd_base[i].addr = 0;
/* enable desciptor & set wrap bit if last descriptor */
- if (i >= (GRETH_RXBD_CNT - 1)) {
+ if (i >= (GRETH_TXBD_CNT - 1)) {
greth->txbd_base[i].stat = GRETH_BD_WR;
} else {
greth->txbd_base[i].stat = 0;