All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v3]net: Wrong Initialization in davinci-emac driver
@ 2016-02-01 15:21 Vishwas Srivastava
  2016-02-01 16:15 ` Albert ARIBAUD
  2016-02-06 14:28 ` [U-Boot] [PATCH] net: fix wrong initialization " Anatolij Gustschin
  0 siblings, 2 replies; 4+ messages in thread
From: Vishwas Srivastava @ 2016-02-01 15:21 UTC (permalink / raw)
  To: u-boot

Author: Vishwas Srivastava <vishu.kernel@gmail.com>
Date:   Mon Jan 25 21:28:17 2016 +0530

Wrong Initialization in davinci emac driver

emac module of the davinci platform supports only 8 tx and 8
rx channels (total 16). emac driver for davinci platform,
however, while doing initialization of the dma descriptor
head pointers,wrongly initializes the 16 head pointers
(instead of  8) for tx dma and 16 head pointers(insted of 8)
for rx dma, which is wrong.The result is, that this register
initilization spills over the other registers which was not
intended and is undesirable.This patch fixes this problem.

Changes for v2:
        -cleaned up the style format
        -addressed various comments given by Joe <joe.hershberger@ni.com>
        on the first version of the patch.

Changes for v3:
        - Added the missing patch part of v2


Signed-off-by: Vishwas Srivastava <vishu.kernel@gmail.com>
CC: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>

diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index 92c3dca..3f54a3f 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -459,11 +459,11 @@ static int davinci_eth_open(struct eth_device *dev,
bd_t *bis)

        /* Set DMA 8 TX / 8 RX Head pointers to 0 */
        addr = &adap_emac->TX0HDP;
-       for(cnt = 0; cnt < 16; cnt++)
+       for (cnt = 0; cnt < 8; cnt++)
                writel(0, addr++);

        addr = &adap_emac->RX0HDP;
-       for(cnt = 0; cnt < 16; cnt++)
+       for (cnt = 0; cnt < 8; cnt++)
                writel(0, addr++);

        /* Clear Statistics (do this before setting MacControl register) */



On Fri, Jan 29, 2016 at 9:32 PM, Vishwas Srivastava <vishu.kernel@gmail.com>
wrote:

> Author: Vishwas Srivastava <vishu.kernel@gmail.com>
> Date:   Mon Jan 25 21:28:17 2016 +0530
>
> Wrong Initialization in davinci emac driver
>
> emac module of the davinci platform supports only 8 tx and 8
> rx channels (total 16). emac driver for davinci platform,
> however, while doing initialization of the dma descriptor
> head pointers,wrongly initializes the 16 head pointers
> (instead of  8) for tx dma and 16 head pointers(insted of 8)
> for rx dma, which is wrong.The result is, that this register
> initilization spills over the other registers which was not
> intended and is undesirable.This patch fixes this problem.
>
> Changes for v2:
>         -cleaned up the style format
>         -addressed various comments given by Joe <joe.hershberger@ni.com>
>         on the first version of the patch.
>
> Signed-off-by: Vishwas Srivastava <vishu.kernel@gmail.com>
> CC: Joe Hershberger <joe.hershberger@ni.com>
> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
>
> diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
> index 92c3dca..3f54a3f 100644
> --- a/drivers/net/davinci_emac.c
> +++ b/drivers/net/davinci_emac.c
> @@ -459,11 +459,11 @@ static int davinci_eth_open(struct eth_device *dev,
> bd_t *bis)
>
>         /* Set DMA 8 TX / 8 RX Head pointers to 0 */
>         addr = &adap_emac->TX0HDP;
> -       for(cnt = 0; cnt < 16; cnt++)
> +       for (cnt = 0; cnt < 8; cnt++)
>                 writel(0, addr++);
>
>
> On Thu, Jan 28, 2016 at 1:27 AM, Joe Hershberger <
> joe.hershberger at gmail.com> wrote:
>
>> On Mon, Jan 25, 2016 at 11:00 AM, Vishwas Srivastava
>> <vishu.kernel@gmail.com> wrote:
>> > Author: Vishwas Srivastava <vishu.kernel@gmail.com>
>> > Date:   Mon Jan 25 21:28:17 2016 +0530
>>
>> Please fix the patch subject. No Leading colon.
>>
>> >
>> >     Wrong Initialization in davinci emac driver
>> >
>> >     emac module of the davinci platform supports only 8 tx and
>> >     8 rx channels (total 16). emac driver for davinci platform,
>> >     however, while doing initialization of the dma descriptor
>> >     head pointers,wrongly initializes the 16 head pointers
>> >     (instead of  8) for tx dma and 16 head pointers for rx dma,
>> >     which is wrong.The result is, that this register initilization
>> >     spills over the other registers which was not intended and is
>> >     undesirable.This patch fixes this problem.
>> >
>> >     Signed-off-by: Vishwas Srivastava <vishu.kernel@gmail.com>
>> >     CC: Sergey Kubushyn <ksi@koi8.net>;Joe Hershberger <
>> > joe.hershberger at ni.com>
>>
>> Please fix this formatting. One "Cc:" per line.
>>
>> >     Signed-off-by: Vishwas Srivastava <vishu.kernel@gmail.com>
>>
>> Don't specify this twice.
>>
>> >
>> > diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
>> > index 92c3dca..3f54a3f 100644
>> > --- a/drivers/net/davinci_emac.c
>> > +++ b/drivers/net/davinci_emac.c
>> > @@ -459,11 +459,11 @@ static int davinci_eth_open(struct eth_device
>> *dev,
>> > bd_t *bis)
>>
>> This line wrap is corrupt. The patch won't apply cleanly.
>>
>> >
>> >         /* Set DMA 8 TX / 8 RX Head pointers to 0 */
>> >         addr = &adap_emac->TX0HDP;
>> > -       for(cnt = 0; cnt < 16; cnt++)
>> > +       for(cnt = 0; cnt < 8; cnt++)
>> >                 writel(0, addr++);
>> >
>> >         addr = &adap_emac->RX0HDP;
>> > -       for(cnt = 0; cnt < 16; cnt++)
>> > +       for(cnt = 0; cnt < 8; cnt++)
>> >                 writel(0, addr++);
>> >
>> >         /* Clear Statistics (do this before setting MacControl
>> register) */
>>
>> This line was corrupted by patchwork. You are doing something wrong.
>>
>> > _______________________________________________
>> > U-Boot mailing list
>> > U-Boot at lists.denx.de
>> > http://lists.denx.de/mailman/listinfo/u-boot
>>
>> Please correct all these issues, but for the content of the patch, still
>> Acked.
>>
>> Thanks,
>> -Joe
>>
>
>

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

* [U-Boot] [PATCH v3]net: Wrong Initialization in davinci-emac driver
  2016-02-01 15:21 [U-Boot] [PATCH v3]net: Wrong Initialization in davinci-emac driver Vishwas Srivastava
@ 2016-02-01 16:15 ` Albert ARIBAUD
  2016-02-06 14:28 ` [U-Boot] [PATCH] net: fix wrong initialization " Anatolij Gustschin
  1 sibling, 0 replies; 4+ messages in thread
From: Albert ARIBAUD @ 2016-02-01 16:15 UTC (permalink / raw)
  To: u-boot

Hello Vishwas,

On Mon, 1 Feb 2016 20:51:58 +0530, Vishwas Srivastava
<vishu.kernel@gmail.com> wrote:
> Author: Vishwas Srivastava <vishu.kernel@gmail.com>
> Date:   Mon Jan 25 21:28:17 2016 +0530

This is unneeded in the commit message, as the author and date are
already provided in the mail.

> Wrong Initialization in davinci emac driver

This is the title of the patch and does not need to be repeated.

> Changes for v2:
>         -cleaned up the style format
>         -addressed various comments given by Joe <joe.hershberger@ni.com>
>         on the first version of the patch.
> 
> Changes for v3:
>         - Added the missing patch part of v2

Changes should not be part of the commit message; they should appear
after the '---' line which, by the way, is completely missing here,
along with some lines at the start of the patch ; and changes should
start with the most recent change first.

Also, you are quoting the previous patch, which is unneeded.

It seems like you put this e-mail together from the output of a manual
diff rather than producing it with git send-email or patman. I suggest
re-sending (under v3 to avoid confusion) using patman, which would ease
the work of formatting the mail and managing patch versions.

Amicalement,
-- 
Albert.

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

* [U-Boot] [PATCH] net: fix wrong initialization in davinci-emac driver
  2016-02-01 15:21 [U-Boot] [PATCH v3]net: Wrong Initialization in davinci-emac driver Vishwas Srivastava
  2016-02-01 16:15 ` Albert ARIBAUD
@ 2016-02-06 14:28 ` Anatolij Gustschin
  2016-02-06 14:35   ` Anatolij Gustschin
  1 sibling, 1 reply; 4+ messages in thread
From: Anatolij Gustschin @ 2016-02-06 14:28 UTC (permalink / raw)
  To: u-boot

From: Vishwas Srivastava <vishu.kernel@gmail.com>

emac module of the davinci platform supports only 8 tx and 8
rx channels (total 16). emac driver for davinci platform,
however, while doing initialization of the dma descriptor
head pointers, wrongly initializes the 16 head pointers
(instead of  8) for tx dma and 16 head pointers (insted of 8)
for rx dma, which is wrong. The result is, that this register
initilization spills over the other registers which was not
intended and is undesirable. This patch fixes this problem.

Signed-off-by: Vishwas Srivastava <vishu.kernel@gmail.com>
CC: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---

Changes for v4:
	- slightly edit the commit message
	- prepare properly formated patch

Changes for v3:
	- Added the missing patch part of v2

Changes for v2:
	- cleaned up the style format
	- addressed various comments given by Joe

 drivers/net/davinci_emac.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index 92c3dca..6f2dc8d 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -459,11 +459,11 @@ static int davinci_eth_open(struct eth_device *dev, bd_t *bis)
 
 	/* Set DMA 8 TX / 8 RX Head pointers to 0 */
 	addr = &adap_emac->TX0HDP;
-	for(cnt = 0; cnt < 16; cnt++)
+	for (cnt = 0; cnt < 8; cnt++)
 		writel(0, addr++);
 
 	addr = &adap_emac->RX0HDP;
-	for(cnt = 0; cnt < 16; cnt++)
+	for (cnt = 0; cnt < 8; cnt++)
 		writel(0, addr++);
 
 	/* Clear Statistics (do this before setting MacControl register) */
-- 
1.7.9.5

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

* [U-Boot] [PATCH] net: fix wrong initialization in davinci-emac driver
  2016-02-06 14:28 ` [U-Boot] [PATCH] net: fix wrong initialization " Anatolij Gustschin
@ 2016-02-06 14:35   ` Anatolij Gustschin
  0 siblings, 0 replies; 4+ messages in thread
From: Anatolij Gustschin @ 2016-02-06 14:35 UTC (permalink / raw)
  To: u-boot

On Sat,  6 Feb 2016 15:28:26 +0100
Anatolij Gustschin agust at denx.de wrote:

> From: Vishwas Srivastava <vishu.kernel@gmail.com>
> 
> emac module of the davinci platform supports only 8 tx and 8
> rx channels (total 16). emac driver for davinci platform,
> however, while doing initialization of the dma descriptor
> head pointers, wrongly initializes the 16 head pointers
> (instead of  8) for tx dma and 16 head pointers (insted of 8)
> for rx dma, which is wrong. The result is, that this register
> initilization spills over the other registers which was not
> intended and is undesirable. This patch fixes this problem.
> 
> Signed-off-by: Vishwas Srivastava <vishu.kernel@gmail.com>
> CC: Joe Hershberger <joe.hershberger@ni.com>
> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
> 
> Changes for v4:
> 	- slightly edit the commit message
> 	- prepare properly formated patch
> 
> Changes for v3:
> 	- Added the missing patch part of v2
> 
> Changes for v2:
> 	- cleaned up the style format
> 	- addressed various comments given by Joe
> 
>  drivers/net/davinci_emac.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied to u-boot-staging, thanks!

--
Anatolij

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

end of thread, other threads:[~2016-02-06 14:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-01 15:21 [U-Boot] [PATCH v3]net: Wrong Initialization in davinci-emac driver Vishwas Srivastava
2016-02-01 16:15 ` Albert ARIBAUD
2016-02-06 14:28 ` [U-Boot] [PATCH] net: fix wrong initialization " Anatolij Gustschin
2016-02-06 14:35   ` Anatolij Gustschin

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.