summaryrefslogtreecommitdiff
path: root/drivers/net/kirkwood_egiga.c
diff options
context:
space:
mode:
authorPrafulla Wadaskar <prafulla@marvell.com>2010-04-06 21:33:08 +0530
committerBen Warren <biggerbadderben@gmail.com>2010-05-03 14:52:49 -0700
commitf0588fdf921c63f84051923bb29eb4255d62a6e7 (patch)
treeba3158a3daea80f13e23b9a246b62d8ab27a7029 /drivers/net/kirkwood_egiga.c
parent2e236bf28e729aca28e60c153dd8f913d1b3d058 (diff)
downloadu-boot-imx-f0588fdf921c63f84051923bb29eb4255d62a6e7.zip
u-boot-imx-f0588fdf921c63f84051923bb29eb4255d62a6e7.tar.gz
u-boot-imx-f0588fdf921c63f84051923bb29eb4255d62a6e7.tar.bz2
net: Kirkwood_egiga.c bugfixes for rx path
Cosmetic changes: Few comments updated Functionality: Rx packet frame size is programming should be done when port is in disabled state. this is corrected Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Diffstat (limited to 'drivers/net/kirkwood_egiga.c')
-rw-r--r--drivers/net/kirkwood_egiga.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/kirkwood_egiga.c b/drivers/net/kirkwood_egiga.c
index 25c72df..dd711e4 100644
--- a/drivers/net/kirkwood_egiga.c
+++ b/drivers/net/kirkwood_egiga.c
@@ -424,8 +424,6 @@ static int kwgbe_init(struct eth_device *dev)
KWGBEREG_WR(regs->pxc, PRT_CFG_VAL);
KWGBEREG_WR(regs->pxcx, PORT_CFG_EXTEND_VALUE);
KWGBEREG_WR(regs->psc0, PORT_SERIAL_CONTROL_VALUE);
- /* Disable port initially */
- KWGBEREG_BITS_SET(regs->psc0, KWGBE_SERIAL_PORT_EN);
/* Assign port SDMA configuration */
KWGBEREG_WR(regs->sdc, PORT_SDMA_CFG_VALUE);
@@ -438,6 +436,9 @@ static int kwgbe_init(struct eth_device *dev)
KWGBEREG_WR(regs->psc0, KWGBE_MAX_RX_PACKET_9700BYTE
| (KWGBEREG_RD(regs->psc0) & MRU_MASK));
+ /* Enable port initially */
+ KWGBEREG_BITS_SET(regs->psc0, KWGBE_SERIAL_PORT_EN);
+
/*
* Set ethernet MTU for leaky bucket mechanism to 0 - this will
* disable the leaky bucket mechanism .
@@ -480,7 +481,7 @@ static int kwgbe_halt(struct eth_device *dev)
stop_queue(&regs->tqc);
stop_queue(&regs->rqc);
- /* Enable port */
+ /* Disable port */
KWGBEREG_BITS_RESET(regs->psc0, KWGBE_SERIAL_PORT_EN);
/* Set port is not reset */
KWGBEREG_BITS_RESET(regs->psc1, 1 << 4);
@@ -525,7 +526,7 @@ static int kwgbe_send(struct eth_device *dev, volatile void *dataptr,
p_txdesc->buf_ptr = (u8 *) p;
p_txdesc->byte_cnt = datasize;
- /* Apply send command using zeroth RXUQ */
+ /* Apply send command using zeroth TXUQ */
KWGBEREG_WR(regs->tcqdp[TXUQ], (u32) p_txdesc);
KWGBEREG_WR(regs->tqc, (1 << TXUQ));