netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Corcodel Marian <corcodel.marian@gmail.com>
To: netdev@vger.kernel.org
Cc: Corcodel Marian <corcodel.marian@gmail.com>
Subject: [PATCH] r8169: Filtered data on Rx descriptor status context
Date: Sun,  9 Aug 2015 14:57:29 +0300	[thread overview]
Message-ID: <1439121449-1835-1-git-send-email-corcodel.marian@gmail.com> (raw)

 We want to start evaluate an RES Receive error summary only 
 when LS (LastFrag) occurred but without FirstFrag


Signed-off-by: Corcodel Marian <corcodel.marian@gmail.com>

diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 8bf8c3f..0ee0107 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -7305,12 +7305,15 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, u32 budget
 		if (status & DescOwn)
 			break;
 
+		if (!(status & LastFrag))
+			break;
+
 		/* This barrier is needed to keep us from reading
 		 * any other fields out of the Rx descriptor until
 		 * we know the status of DescOwn
 		 */
 		dma_rmb();
-
+               if (!(status & FirstFrag)) {
 		if (unlikely(status & RxRES)) {
 			netif_info(tp, rx_err, dev, "Rx ERROR. status = %08x\n",
 				   status);
@@ -7323,6 +7326,7 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, u32 budget
 				rtl_schedule_task(tp, RTL_FLAG_TASK_RESET_PENDING);
 				dev->stats.rx_fifo_errors++;
 			}
+	       }
 			if ((status & (RxRUNT | RxCRC)) &&
 			    !(status & (RxRWT | RxFOVF)) &&
 			    (dev->features & NETIF_F_RXALL))
-- 
2.1.4

             reply	other threads:[~2015-08-09 11:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-09 11:57 Corcodel Marian [this message]
2015-08-09 12:41 ` [PATCH] r8169: Filtered data on Rx descriptor status context Sergei Shtylyov
2015-08-09 22:09 ` Francois Romieu
     [not found]   ` <CAGg4U=GQwTUcZhNv-mJPZ8JxO4JSLw_1UwQSorYfCv38u1uuUg@mail.gmail.com>
2015-08-10 19:24     ` Francois Romieu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1439121449-1835-1-git-send-email-corcodel.marian@gmail.com \
    --to=corcodel.marian@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).