[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150814192700.GA17284@electric-eye.fr.zoreil.com>
Date: Fri, 14 Aug 2015 21:27:00 +0200
From: Francois Romieu <romieu@...zoreil.com>
To: Corcodel Marian <corcodel.marian@...il.com>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net-next]r8169.c: Force transmission when nic refuse to
start.
Corcodel Marian <corcodel.marian@...il.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists