Re: [PATCH net-next 01/13] net: mvpp2: do not call phylink_mac_change if there is no event

From: Antoine Tenart
Date: Mon Feb 18 2019 - 05:40:09 EST


Hi Russell,

On Fri, Feb 15, 2019 at 05:05:53PM +0000, Russell King - ARM Linux admin wrote:
> On Fri, Feb 15, 2019 at 04:32:29PM +0100, Antoine Tenart wrote:
> > This patch makes the link interrupt handler to avoid calling
> > phylink_mac_change when there are no event.
>
> The reasoning being?

The interrupt can fire for a number of reasons, some of which may not be
related to changes in the MAC state (it can fire upon errors or counter
wraparound).

This interrupt handler currently checks if an event occurred bu checking
if the cause of the interrupt is a link change. I wanted to extend this
logic to phylink to avoid having two link change handlers (phylink and
!phylink) being called in different ways.

Anyway, the only cause unmask so far is the link one, so it won't make
any difference so far. We can probably drop this one for now.

Antoine

--
Antoine Ténart, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com