kirkwood_egiga: bugfix: add DMA sequence points
PATCH v2 1/1 kirkwood_egiga: bugfix: add DMA sequence points
Insert isb() sequence points to ensure DMA descriptors are filled in and set up before actual DMA occurs.
---
PATCHSET HISTORY
V1: initial submit
V2: fixed badly placed isb()
drivers/net/kirkwood_egiga.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
drivers/net/kirkwood_egiga.c +8 -1
@@ -447,6 +447,8 @@ static int kwgbe_init(struct eth_device *dev)/* Assignment of Rx CRDB of given RXUQ */ KWGBEREG_WR (regs->rxcdp[RXUQ ], (u32 ) dkwgbe->p_rxdesc_curr); +/* ensure previous write is done before enabling Rx DMA */ +isb ();/* Enable port Rx. */ KWGBEREG_WR (regs->rqc, (1 <<RXUQ ));
@@ -536,8 +538,13 @@ 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 TXUQ */ +/* Set this tc desc as zeroth TXUQ */ KWGBEREG_WR (regs->tcqdp[TXUQ ], (u32 ) p_txdesc); + +/* ensure tx desc writes above are performed before we start Tx DMA */ +isb (); + +/* Apply send command using zeroth TXUQ */ KWGBEREG_WR (regs->tqc, (1 <<TXUQ ));/*
Signature · 1 line
1.6.4.4
PATCH v2 1/1 kirkwood_egiga: bugfix: add DMA sequence points
Quoted 48 lines
-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Albert Aribaud
Sent: Saturday, July 10, 2010 7:11 PM
To: u-boot at lists.denx.de
Subject: [U-Boot] [PATCH V2]kirkwood_egiga: bugfix: add DMA sequence pointsInsert
isb()sequence points to ensure DMA descriptors are filled in and set up before actual DMA occurs.Signed-off-by Albert Aribaud <[email protected]>---
PATCHSET HISTORYV1: initial submit
V2: fixed badly placedisb()drivers/net/kirkwood_egiga.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)drivers/net/kirkwood_egiga.c +5
-1@@ -447,6 +447,8 @@ static int kwgbe_init(struct eth_device *dev)/* Assignment of Rx CRDB of given RXUQ */ KWGBEREG_WR (regs->rxcdp[RXUQ ], (u32 ) dkwgbe->p_rxdesc_curr); +/* ensure previous write is done before enabling Rx DMA */ +isb ();/* Enable port Rx. */ KWGBEREG_WR (regs->rqc, (1 <<RXUQ ));@@ -536,8 +538,13 @@ 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 TXUQ */ +/* Set this tc desc as zeroth TXUQ */ KWGBEREG_WR (regs->tcqdp[TXUQ ], (u32 ) p_txdesc); + +/* ensure tx desc writes above are performed before we start Tx DMA */
drivers/net/kirkwood_egiga.c static int kwgbe_send(struct eth_device *dev, volatile void *dataptr, · line 550
Quoted 6 lines
drivers/net/kirkwood_egiga.c +3
-0+isb (); + +/* Apply send command using zeroth TXUQ */ KWGBEREG_WR (regs->tqc, (1 <<TXUQ ));/*
Regards..
Prafulla . .
Ben Warren
AppliedPATCH v2 1/1 kirkwood_egiga: bugfix: add DMA sequence points
In reply to Albert AribaudHi Albert,
Quoted 4 lines · Albert Aribaud
Insert
isb()sequence points to ensure DMA descriptors are filled in and set up before actual DMA occurs.Signed-off-by Albert Aribaud<[email protected]>
Quoted 8 lines
---
PATCHSET HISTORYV1: initial submit
V2: fixed badly placedisb()drivers/net/kirkwood_egiga.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
Applied to net repo.
thanks,
Ben