* [PATCH net-next]r8169.c: Force transmission when nic refuse to start.
@ 2015-08-14 7:58 Corcodel Marian
2015-08-14 19:27 ` Francois Romieu
0 siblings, 1 reply; 2+ messages in thread
From: Corcodel Marian @ 2015-08-14 7:58 UTC (permalink / raw)
To: netdev; +Cc: Corcodel Marian
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next]r8169.c: Force transmission when nic refuse to start.
2015-08-14 7:58 [PATCH net-next]r8169.c: Force transmission when nic refuse to start Corcodel Marian
@ 2015-08-14 19:27 ` Francois Romieu
0 siblings, 0 replies; 2+ messages in thread
From: Francois Romieu @ 2015-08-14 19:27 UTC (permalink / raw)
To: Corcodel Marian; +Cc: netdev
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);
> + }
> + }
Please try to use TimerInt instead of this ugly hack.
--
Ueimor
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-14 19:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-14 7:58 [PATCH net-next]r8169.c: Force transmission when nic refuse to start Corcodel Marian
2015-08-14 19:27 ` Francois Romieu
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).