[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190520183147.rq67lmrfci7kcal3@shell.armlinux.org.uk>
Date: Mon, 20 May 2019 19:31:47 +0100
From: Russell King - ARM Linux admin <linux@...linux.org.uk>
To: Florian Fainelli <f.fainelli@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Vladimir Oltean <olteanv@...il.com>,
Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 1/4] net: phylink: support for link gpio
interrupt
On Mon, May 20, 2019 at 11:22:21AM -0700, Florian Fainelli wrote:
> On 5/20/19 8:22 AM, Russell King wrote:
> > Add support for using GPIO interrupts with a fixed-link GPIO rather than
> > polling the GPIO every second and invoking the phylink resolution. This
> > avoids unnecessary calls to mac_config().
> >
> > Signed-off-by: Russell King <rmk+kernel@...linux.org.uk>
>
> Reviewed-by: Florian Fainelli <f.fainelli@...il.com>
>
> Just one comment, see below:
>
> [snip]
>
> > - if (pl->link_an_mode == MLO_AN_FIXED && !IS_ERR(pl->link_gpio))
> > - del_timer_sync(&pl->link_poll);
> > + del_timer_sync(&pl->link_poll);
>
> Removing a timer that was only set-up if pl->link_an_mode ==
> MLO_AN_FIXED probably does not hurt, but this breaks symmetry a bit here.
The reason for this change is because that is no longer the only case
that the timer would be running. The timer will be running if either
of the following are true:
1. We are in fixed mode, and we have a get_fixed_state function
registered.
2. We are in fixed mode, and have a GPIO, but are unable to get an
interrupt for it.
It's way simpler and less error-prone to just delete the timer here,
rather than trying to keep track of whether we armed it.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
Powered by blists - more mailing lists