[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200528222447.GB853774@lunn.ch>
Date: Fri, 29 May 2020 00:24:47 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Armin Wolf <W_Armin@....de>
Cc: netdev@...r.kernel.org
Subject: Re: Usage of mdelay() inside Interrupt
On Thu, May 28, 2020 at 11:15:18PM +0200, Armin Wolf wrote:
> Hi,
>
> while browsing the sourcefile of lib8390.c in
> drivers/net/ethernet/8390/, i noticed that inside
> of ei_rx_overrun(), which is called from inside
> a Interrupt handler, mdelay() is being used.
> So i wonder if the usage of mdelay() inside the
> Interrupt handler may cause problems since waiting
> ~10ms in Interrupt context seems a bit odd.
Hi Armin
It is legal. But it is not ideal. But reading the comments around it
suggests the hardware is very particular about how you recover from an
overrun, and maybe this is the most robust solution?
Overruns should not happen too often. If the statistics counter
stats.rx_over_errors indicates it is happening a lot then maybe more
investigation is needed, because it is going to be bad for
performance.
Andrew
Powered by blists - more mailing lists