All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] kirkwood_egiga: bugfix: add DMA sequence points
@ 2010-07-10  8:37 Albert Aribaud
  2010-07-10  8:54 ` Albert ARIBAUD
  0 siblings, 1 reply; 5+ messages in thread
From: Albert Aribaud @ 2010-07-10  8:37 UTC (permalink / raw)
  To: u-boot

Insert isb() sequence points to ensure DMA descriptors
are filled in and set up before actual DMA occurs.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
---
 drivers/net/kirkwood_egiga.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/net/kirkwood_egiga.c b/drivers/net/kirkwood_egiga.c
index 932792e..9eca2f3 100644
--- a/drivers/net/kirkwood_egiga.c
+++ b/drivers/net/kirkwood_egiga.c
@@ -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,6 +538,9 @@ static int kwgbe_send(struct eth_device *dev, volatile void *dataptr,
 	p_txdesc->buf_ptr = (u8 *) p;
 	p_txdesc->byte_cnt = datasize;
 
+	/* ensure tx desc writes above are performed before we start Tx DMA */
+	isb();
+
 	/* Apply send command using zeroth TXUQ */
 	KWGBEREG_WR(regs->tcqdp[TXUQ], (u32) p_txdesc);
 	KWGBEREG_WR(regs->tqc, (1 << TXUQ));
-- 
1.6.4.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] kirkwood_egiga: bugfix: add DMA sequence points
  2010-07-10  8:37 [U-Boot] [PATCH] kirkwood_egiga: bugfix: add DMA sequence points Albert Aribaud
@ 2010-07-10  8:54 ` Albert ARIBAUD
  0 siblings, 0 replies; 5+ messages in thread
From: Albert ARIBAUD @ 2010-07-10  8:54 UTC (permalink / raw)
  To: u-boot

Please disregard. I have misplaced the second isb().

> @@ -536,6 +538,9 @@ static int kwgbe_send(struct eth_device *dev, volatile void *dataptr,
>   	p_txdesc->buf_ptr = (u8 *) p;
>   	p_txdesc->byte_cnt = datasize;
>
> +	/* ensure tx desc writes above are performed before we start Tx DMA */
> +	isb();
> +
>   	/* Apply send command using zeroth TXUQ */
>   	KWGBEREG_WR(regs->tcqdp[TXUQ], (u32) p_txdesc);
>   	KWGBEREG_WR(regs->tqc, (1<<  TXUQ));

It should actually apprear right before the write to tqc.

Resending correct patch.

Amicalement,
-- 
Albert.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] kirkwood_egiga: bugfix: add DMA sequence points
  2010-07-10 13:23 ` Prafulla Wadaskar
@ 2010-07-10 13:36   ` Albert ARIBAUD
  0 siblings, 0 replies; 5+ messages in thread
From: Albert ARIBAUD @ 2010-07-10 13:36 UTC (permalink / raw)
  To: u-boot

Le 10/07/2010 15:23, Prafulla Wadaskar a ?crit :
> When you repost the patch, you should change its version and change log, this is standard procedure to be followed, now there are two patches on mailing list with same subject, confusing for custodian to pick right one ......
>
> Regards..
> Prafulla . .

Do you want me to repost as V2 ?

Amicalement,
-- 
Albert.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] kirkwood_egiga: bugfix: add DMA sequence points
  2010-07-10  9:01 Albert Aribaud
@ 2010-07-10 13:23 ` Prafulla Wadaskar
  2010-07-10 13:36   ` Albert ARIBAUD
  0 siblings, 1 reply; 5+ messages in thread
From: Prafulla Wadaskar @ 2010-07-10 13:23 UTC (permalink / raw)
  To: u-boot

When you repost the patch, you should change its version and change log, this is standard procedure to be followed, now there are two patches on mailing list with same subject, confusing for custodian to pick right one ......

Regards..
Prafulla . . 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH] kirkwood_egiga: bugfix: add DMA sequence points
@ 2010-07-10  9:01 Albert Aribaud
  2010-07-10 13:23 ` Prafulla Wadaskar
  0 siblings, 1 reply; 5+ messages in thread
From: Albert Aribaud @ 2010-07-10  9:01 UTC (permalink / raw)
  To: u-boot

Insert isb() sequence points to ensure DMA descriptors
are filled in and set up before actual DMA occurs.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
---
 drivers/net/kirkwood_egiga.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/drivers/net/kirkwood_egiga.c b/drivers/net/kirkwood_egiga.c
index 932792e..ea0c522 100644
--- a/drivers/net/kirkwood_egiga.c
+++ b/drivers/net/kirkwood_egiga.c
@@ -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));
 
 	/*
-- 
1.6.4.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-07-10 13:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-10  8:37 [U-Boot] [PATCH] kirkwood_egiga: bugfix: add DMA sequence points Albert Aribaud
2010-07-10  8:54 ` Albert ARIBAUD
2010-07-10  9:01 Albert Aribaud
2010-07-10 13:23 ` Prafulla Wadaskar
2010-07-10 13:36   ` Albert ARIBAUD

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.