netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/1] net: fec: clear receive interrupts before processing a packet
@ 2015-09-02  9:24 Fugang Duan
  2015-09-02  9:40 ` Philippe De Muyter
  2015-09-02 23:07 ` David Miller
  0 siblings, 2 replies; 6+ messages in thread
From: Fugang Duan @ 2015-09-02  9:24 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux, phdm, b38611

From: Russell King <rmk+kernel@arm.linux.org.uk>

The patch just to re-submit the patch "db3421c114cfa6326" because the
patch "4d494cdc92b3b9a0" remove the change.

Clear any pending receive interrupt before we process a pending packet.
This helps to avoid any spurious interrupts being raised after we have
fully cleaned the receive ring, while still allowing an interrupt to be
raised if we receive another packet.

The position of this is critical: we must do this prior to reading the
next packet status to avoid potentially dropping an interrupt when a
packet is still pending.

Acked-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 drivers/net/ethernet/freescale/fec_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 1f89c59..6bed0ff 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -1400,6 +1400,7 @@ fec_enet_rx_queue(struct net_device *ndev, int budget, u16 queue_id)
 		if ((status & BD_ENET_RX_LAST) == 0)
 			netdev_err(ndev, "rcv is not +last\n");
 
+		writel(FEC_ENET_RXF, fep->hwp + FEC_IEVENT);
 
 		/* Check for errors. */
 		if (status & (BD_ENET_RX_LG | BD_ENET_RX_SH | BD_ENET_RX_NO |
-- 
1.9.1

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

* Re: [PATCH net-next 1/1] net: fec: clear receive interrupts before processing a packet
  2015-09-02  9:24 [PATCH net-next 1/1] net: fec: clear receive interrupts before processing a packet Fugang Duan
@ 2015-09-02  9:40 ` Philippe De Muyter
  2015-09-02  9:46   ` Russell King - ARM Linux
  2015-09-03  8:00   ` Philippe De Muyter
  2015-09-02 23:07 ` David Miller
  1 sibling, 2 replies; 6+ messages in thread
From: Philippe De Muyter @ 2015-09-02  9:40 UTC (permalink / raw)
  To: Fugang Duan; +Cc: davem, netdev, linux

On Wed, Sep 02, 2015 at 05:24:14PM +0800, Fugang Duan wrote:
> From: Russell King <rmk+kernel@arm.linux.org.uk>
> 
> The patch just to re-submit the patch "db3421c114cfa6326" because the
> patch "4d494cdc92b3b9a0" remove the change.

I think you should mention also the titles of the commits.

And maybe send it also to stable.
> 
> Clear any pending receive interrupt before we process a pending packet.
> This helps to avoid any spurious interrupts being raised after we have
> fully cleaned the receive ring, while still allowing an interrupt to be
> raised if we receive another packet.
> 
> The position of this is critical: we must do this prior to reading the
> next packet status to avoid potentially dropping an interrupt when a
> packet is still pending.
> 
> Acked-by: Fugang Duan <B38611@freescale.com>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  drivers/net/ethernet/freescale/fec_main.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
> index 1f89c59..6bed0ff 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -1400,6 +1400,7 @@ fec_enet_rx_queue(struct net_device *ndev, int budget, u16 queue_id)
>  		if ((status & BD_ENET_RX_LAST) == 0)
>  			netdev_err(ndev, "rcv is not +last\n");
>  
Could a comment be added here to avoid another future removal ?

> +		writel(FEC_ENET_RXF, fep->hwp + FEC_IEVENT);
>  
>  		/* Check for errors. */
>  		if (status & (BD_ENET_RX_LG | BD_ENET_RX_SH | BD_ENET_RX_NO |
> -- 
> 1.9.1

Philippe

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

* Re: [PATCH net-next 1/1] net: fec: clear receive interrupts before processing a packet
  2015-09-02  9:40 ` Philippe De Muyter
@ 2015-09-02  9:46   ` Russell King - ARM Linux
  2015-09-03  8:00   ` Philippe De Muyter
  1 sibling, 0 replies; 6+ messages in thread
From: Russell King - ARM Linux @ 2015-09-02  9:46 UTC (permalink / raw)
  To: Philippe De Muyter; +Cc: Fugang Duan, davem, netdev

On Wed, Sep 02, 2015 at 11:40:15AM +0200, Philippe De Muyter wrote:
> On Wed, Sep 02, 2015 at 05:24:14PM +0800, Fugang Duan wrote:
> > From: Russell King <rmk+kernel@arm.linux.org.uk>
> > 
> > The patch just to re-submit the patch "db3421c114cfa6326" because the
> > patch "4d494cdc92b3b9a0" remove the change.
> 
> I think you should mention also the titles of the commits.

Yes, that's standard kernel procedure.  Also, 12 characters of commit ID
is the recommended length.

> Could a comment be added here to avoid another future removal ?

I think reading the commit messages introducing the code would also help,
but a comment wouldn't hurt.

-- 
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

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

* Re: [PATCH net-next 1/1] net: fec: clear receive interrupts before processing a packet
  2015-09-02  9:24 [PATCH net-next 1/1] net: fec: clear receive interrupts before processing a packet Fugang Duan
  2015-09-02  9:40 ` Philippe De Muyter
@ 2015-09-02 23:07 ` David Miller
  1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2015-09-02 23:07 UTC (permalink / raw)
  To: b38611; +Cc: netdev, linux, phdm

From: Fugang Duan <b38611@freescale.com>
Date: Wed, 2 Sep 2015 17:24:14 +0800

> From: Russell King <rmk+kernel@arm.linux.org.uk>
> 
> The patch just to re-submit the patch "db3421c114cfa6326" because the
> patch "4d494cdc92b3b9a0" remove the change.
> 
> Clear any pending receive interrupt before we process a pending packet.
> This helps to avoid any spurious interrupts being raised after we have
> fully cleaned the receive ring, while still allowing an interrupt to be
> raised if we receive another packet.
> 
> The position of this is critical: we must do this prior to reading the
> next packet status to avoid potentially dropping an interrupt when a
> packet is still pending.
> 
> Acked-by: Fugang Duan <B38611@freescale.com>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Applied and queued up for -stable, thanks.

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

* Re: [PATCH net-next 1/1] net: fec: clear receive interrupts before processing a packet
  2015-09-02  9:40 ` Philippe De Muyter
  2015-09-02  9:46   ` Russell King - ARM Linux
@ 2015-09-03  8:00   ` Philippe De Muyter
  2015-09-03 14:40     ` Duan Andy
  1 sibling, 1 reply; 6+ messages in thread
From: Philippe De Muyter @ 2015-09-03  8:00 UTC (permalink / raw)
  To: Fugang Duan; +Cc: davem, netdev, linux

Hi Andy,

can you resubmit it, adding also my

Reported-by: Philippe De Muyter <phdm@macqel.be>

and explaining that it also prevents a complete rx blockage failure ?

Philippe

On Wed, Sep 02, 2015 at 11:40:15AM +0200, Philippe De Muyter wrote:
> On Wed, Sep 02, 2015 at 05:24:14PM +0800, Fugang Duan wrote:
> > From: Russell King <rmk+kernel@arm.linux.org.uk>
> > 
> > The patch just to re-submit the patch "db3421c114cfa6326" because the
> > patch "4d494cdc92b3b9a0" remove the change.
> 
> I think you should mention also the titles of the commits.
> 
> And maybe send it also to stable.
> > 
> > Clear any pending receive interrupt before we process a pending packet.
> > This helps to avoid any spurious interrupts being raised after we have
> > fully cleaned the receive ring, while still allowing an interrupt to be
> > raised if we receive another packet.
> > 
> > The position of this is critical: we must do this prior to reading the
> > next packet status to avoid potentially dropping an interrupt when a
> > packet is still pending.
> > 
> > Acked-by: Fugang Duan <B38611@freescale.com>
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> > ---
> >  drivers/net/ethernet/freescale/fec_main.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
> > index 1f89c59..6bed0ff 100644
> > --- a/drivers/net/ethernet/freescale/fec_main.c
> > +++ b/drivers/net/ethernet/freescale/fec_main.c
> > @@ -1400,6 +1400,7 @@ fec_enet_rx_queue(struct net_device *ndev, int budget, u16 queue_id)
> >  		if ((status & BD_ENET_RX_LAST) == 0)
> >  			netdev_err(ndev, "rcv is not +last\n");
> >  
> Could a comment be added here to avoid another future removal ?
> 
> > +		writel(FEC_ENET_RXF, fep->hwp + FEC_IEVENT);
> >  
> >  		/* Check for errors. */
> >  		if (status & (BD_ENET_RX_LG | BD_ENET_RX_SH | BD_ENET_RX_NO |
> > -- 
> > 1.9.1
> 
> Philippe

-- 
Philippe De Muyter +32 2 6101532 Macq SA rue de l'Aeronef 2 B-1140 Bruxelles

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

* RE: [PATCH net-next 1/1] net: fec: clear receive interrupts before processing a packet
  2015-09-03  8:00   ` Philippe De Muyter
@ 2015-09-03 14:40     ` Duan Andy
  0 siblings, 0 replies; 6+ messages in thread
From: Duan Andy @ 2015-09-03 14:40 UTC (permalink / raw)
  To: Philippe De Muyter
  Cc: davem@davemloft.net, netdev@vger.kernel.org,
	linux@arm.linux.org.uk

From: Philippe De Muyter <phdm@macq.eu> Sent: Thursday, September 03, 2015 4:00 PM
> To: Duan Fugang-B38611
> Cc: davem@davemloft.net; netdev@vger.kernel.org; linux@arm.linux.org.uk
> Subject: Re: [PATCH net-next 1/1] net: fec: clear receive interrupts
> before processing a packet
> 
> Hi Andy,
> 
> can you resubmit it, adding also my
> 
> Reported-by: Philippe De Muyter <phdm@macqel.be>
> 
> and explaining that it also prevents a complete rx blockage failure ?
> 
> Philippe
> 
Sorry, consider the patch was submitted/reviewed/applied, so I just re-submited it with keeping the original author/commit log/sign-in information.

> On Wed, Sep 02, 2015 at 11:40:15AM +0200, Philippe De Muyter wrote:
> > On Wed, Sep 02, 2015 at 05:24:14PM +0800, Fugang Duan wrote:
> > > From: Russell King <rmk+kernel@arm.linux.org.uk>
> > >
> > > The patch just to re-submit the patch "db3421c114cfa6326" because
> > > the patch "4d494cdc92b3b9a0" remove the change.
> >
> > I think you should mention also the titles of the commits.
> >
> > And maybe send it also to stable.
> > >
> > > Clear any pending receive interrupt before we process a pending
> packet.
> > > This helps to avoid any spurious interrupts being raised after we
> > > have fully cleaned the receive ring, while still allowing an
> > > interrupt to be raised if we receive another packet.
> > >
> > > The position of this is critical: we must do this prior to reading
> > > the next packet status to avoid potentially dropping an interrupt
> > > when a packet is still pending.
> > >
> > > Acked-by: Fugang Duan <B38611@freescale.com>
> > > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> > > ---
> > >  drivers/net/ethernet/freescale/fec_main.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/drivers/net/ethernet/freescale/fec_main.c
> > > b/drivers/net/ethernet/freescale/fec_main.c
> > > index 1f89c59..6bed0ff 100644
> > > --- a/drivers/net/ethernet/freescale/fec_main.c
> > > +++ b/drivers/net/ethernet/freescale/fec_main.c
> > > @@ -1400,6 +1400,7 @@ fec_enet_rx_queue(struct net_device *ndev, int
> budget, u16 queue_id)
> > >  		if ((status & BD_ENET_RX_LAST) == 0)
> > >  			netdev_err(ndev, "rcv is not +last\n");
> > >
> > Could a comment be added here to avoid another future removal ?
> >
> > > +		writel(FEC_ENET_RXF, fep->hwp + FEC_IEVENT);
> > >
> > >  		/* Check for errors. */
> > >  		if (status & (BD_ENET_RX_LG | BD_ENET_RX_SH | BD_ENET_RX_NO |
> > > --
> > > 1.9.1
> >
> > Philippe
> 
> --
> Philippe De Muyter +32 2 6101532 Macq SA rue de l'Aeronef 2 B-1140
> Bruxelles

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

end of thread, other threads:[~2015-09-03 14:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-02  9:24 [PATCH net-next 1/1] net: fec: clear receive interrupts before processing a packet Fugang Duan
2015-09-02  9:40 ` Philippe De Muyter
2015-09-02  9:46   ` Russell King - ARM Linux
2015-09-03  8:00   ` Philippe De Muyter
2015-09-03 14:40     ` Duan Andy
2015-09-02 23:07 ` 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).