[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a0iwVpU_inEVH9mwkMkBxrxbGsXAfeR9_bOYBaNP4Wx5g@mail.gmail.com>
Date: Wed, 2 Jun 2021 11:12:47 +0200
From: Arnd Bergmann <arnd@...nel.org>
To: Nikolai Zhubr <zhubr.2@...il.com>
Cc: Heiner Kallweit <hkallweit1@...il.com>,
netdev <netdev@...r.kernel.org>, Jeff Garzik <jgarzik@...ox.com>
Subject: Re: Realtek 8139 problem on 486.
On Wed, Jun 2, 2021 at 1:27 AM Nikolai Zhubr <zhubr.2@...il.com> wrote:
> 02.06.2021 0:48, Heiner Kallweit:
> > Driver 8139too has no maintainer.
>
> Ups, indeed. I just looked at the header and supposed it has. Sorry.
> (I do not touch kernel development much, usually)
It was apparently maintained by Jeff Garzik until 2007, but he already
considered
this driver outdated back then, and later stopped maintaining drivers
altogether.
> > who are paid by somebody to maintain all drivers in the kernel. That's not the case in general.
> > You provided valuable input, and if you'd contribute to improving 8139too and submit patches for
> > fixing the issue you're facing, this would be much appreciated.
>
> Ok, it is a bit more clear now.
> I'll do more testing/searching/reading and probably come up with
> something then.
I thought about the issue a bit more. The idea of the level interrupt
handler is that it
gets called again as long as any of the bits in 'IntrStatus' are set,
so the handler
can just read the register, write ack or mask the bits it sees and then process
the events it got. If another tx-complete even comes in before the end
of the handler,
it gets entered again and everything works.
If the irqchip is set to edge mode, this breaks down, and the loop can
work around
it by making it much more likely that all bits are cleared or masked at the
end of the handler, but there is no guarantee for this: If any
interrupt comes in
between reading the IntrStatus register and finishing the handler, you never get
an interrupt again.
I think the easiest workaround to address this reliably would be to move all
the irq processing into the poll function. This way the interrupt is completely
masked in the device until the poll handler finishes, and unmasking it
while there
are pending events would reliably trigger a new irq regardless of level or edge
mode. Something like the untested change at https://pastebin.com/MhBJDt6Z .
I don't know of other drivers that do it like this though, so I'm not
sure if this
causes a different set of problems.
Arnd
Powered by blists - more mailing lists