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 net-next]r8169.c: Force transmission when nic refuse to start.
Date: Fri, 14 Aug 2015 10:58:27 +0300	[thread overview]
Message-ID: <1439539107-13638-1-git-send-email-corcodel.marian@gmail.com> (raw)

Brute force transmission when Rx interrupt exist on
 interface is up.  Guaranteed to start on full duplex and not maximum
 speed.When set  half duplex working same without this patch.
For apply this patch set --whitespace=warn

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 eb2d2a4..6882eab 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -7470,15 +7470,22 @@ static int rtl8169_poll(struct napi_struct *napi, int budget)
 	u16 enable_mask = RTL_EVENT_NAPI | tp->event_slow;
 	int work_done= 0;
 	u16 status;
+        int tx_force = 1;
 
 	status = rtl_get_events(tp);
 	rtl_ack_events(tp, status & ~tp->event_slow);
-
+       if (netif_running(dev)) {
 	if (status & RTL_EVENT_NAPI_RX)
 		work_done = rtl_rx(dev, tp, (u32) budget);
+                
 
 	if (status & RTL_EVENT_NAPI_TX)
 		rtl_tx(dev, tp);
+         else if (tx_force == 1) {
+                mdelay(10);
+                rtl_tx(dev, tp);
+         }
+        }
 
 	if (status & tp->event_slow) {
 		enable_mask &= ~tp->event_slow;
-- 
2.1.4

             reply	other threads:[~2015-08-14  7:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-14  7:58 Corcodel Marian [this message]
2015-08-14 19:27 ` [PATCH net-next]r8169.c: Force transmission when nic refuse to start 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=1439539107-13638-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).