netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 net] ravb: clear RIC1 in init instead of stop
@ 2015-12-14 16:24 Yoshihiro Kaneko
  2015-12-14 16:57 ` Sergei Shtylyov
  0 siblings, 1 reply; 3+ messages in thread
From: Yoshihiro Kaneko @ 2015-12-14 16:24 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Sergei Shtylyov, Simon Horman, Magnus Damm,
	linux-sh

From: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>

AVB-DMAC Receive FIFO Warning interrupt is not enabled, so it is not
necessary to disable the interrupt in ravb_close().
On the other hand, this patch disables the interrupt in ravb_dmac_init() to
prevent the possibility that the interrupt is issued by the state that
a boot loader left.

Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
---

This patch is based on the master branch of David Miller's networking
tree.

v3 [Yoshihiro Kaneko]
* compile tested only
* As suggested by Sergei Shtylyov
  - update the subject to reflect what this patch is doing.
  - clear RIC1 in ravb_dmac_init() instead of ravb_open().

v2 [Yoshihiro Kaneko]
* compile tested only
* As suggested by Sergei Shtylyov
  - clear RIC1 in ndo_open() to disable the interrupt regardless of
    a left state from a bootloader.

 drivers/net/ethernet/renesas/ravb_main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index b69e0c2..b76303e 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -405,9 +405,11 @@ static int ravb_dmac_init(struct net_device *ndev)
 	/* Timestamp enable */
 	ravb_write(ndev, TCCR_TFEN, TCCR);
 
-	/* Interrupt enable: */
+	/* Interrupt init: */
 	/* Frame receive */
 	ravb_write(ndev, RIC0_FRE0 | RIC0_FRE1, RIC0);
+	/* Disable FIFO full warning */
+	ravb_write(ndev, 0, RIC1);
 	/* Receive FIFO full error, descriptor empty */
 	ravb_write(ndev, RIC2_QFE0 | RIC2_QFE1 | RIC2_RFFE, RIC2);
 	/* Frame transmitted, timestamp FIFO updated */
@@ -1471,7 +1473,6 @@ static int ravb_close(struct net_device *ndev)
 
 	/* Disable interrupts by clearing the interrupt masks. */
 	ravb_write(ndev, 0, RIC0);
-	ravb_write(ndev, 0, RIC1);
 	ravb_write(ndev, 0, RIC2);
 	ravb_write(ndev, 0, TIC);
 
-- 
1.9.1


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

* Re: [PATCH v3 net] ravb: clear RIC1 in init instead of stop
  2015-12-14 16:24 [PATCH v3 net] ravb: clear RIC1 in init instead of stop Yoshihiro Kaneko
@ 2015-12-14 16:57 ` Sergei Shtylyov
  2015-12-14 19:33   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Sergei Shtylyov @ 2015-12-14 16:57 UTC (permalink / raw)
  To: Yoshihiro Kaneko, netdev
  Cc: David S. Miller, Simon Horman, Magnus Damm, linux-sh

On 12/14/2015 07:24 PM, Yoshihiro Kaneko wrote:

> From: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
>
> AVB-DMAC Receive FIFO Warning interrupt is not enabled, so it is not
> necessary to disable the interrupt in ravb_close().
> On the other hand, this patch disables the interrupt in ravb_dmac_init() to
> prevent the possibility that the interrupt is issued by the state that
> a boot loader left.
>
> Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>

Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

> ---
>
> This patch is based on the master branch of David Miller's networking
> tree.

    I think this should rather go into net-next.git though...

MBR, Sergei

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

* Re: [PATCH v3 net] ravb: clear RIC1 in init instead of stop
  2015-12-14 16:57 ` Sergei Shtylyov
@ 2015-12-14 19:33   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2015-12-14 19:33 UTC (permalink / raw)
  To: sergei.shtylyov; +Cc: ykaneko0929, netdev, horms, magnus.damm, linux-sh

From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Mon, 14 Dec 2015 19:57:39 +0300

> On 12/14/2015 07:24 PM, Yoshihiro Kaneko wrote:
> 
>> From: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
>>
>> AVB-DMAC Receive FIFO Warning interrupt is not enabled, so it is not
>> necessary to disable the interrupt in ravb_close().
>> On the other hand, this patch disables the interrupt in
>> ravb_dmac_init() to
>> prevent the possibility that the interrupt is issued by the state that
>> a boot loader left.
>>
>> Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
>> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
> 
> Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> 
>> ---
>>
>> This patch is based on the master branch of David Miller's networking
>> tree.
> 
>    I think this should rather go into net-next.git though...

Agreed, applied to net-next, thanks.

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

end of thread, other threads:[~2015-12-14 19:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-14 16:24 [PATCH v3 net] ravb: clear RIC1 in init instead of stop Yoshihiro Kaneko
2015-12-14 16:57 ` Sergei Shtylyov
2015-12-14 19:33   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).