Re: [PATCH net-next 10/18] net: mvpp2: use the GoP interrupt for link status changes

Antoine Tenart
2017-07-25T10:41:31Z

[-- Attachment #1: Type: text/plain, Size: 1334 bytes --]

Hi Marcin,

On Tue, Jul 25, 2017 at 12:58:20AM +0200, Marcin Wojtas wrote:
>
> This patch requires also:
>
> diff --git a/drivers/net/ethernet/marvell/mvpp2.c
> b/drivers/net/ethernet/marvell/mvpp2.c
> index 4694d4f..369819f 100644
> --- a/drivers/net/ethernet/marvell/mvpp2.c
> +++ b/drivers/net/ethernet/marvell/mvpp2.c
> @@ -6625,6 +6625,7 @@ static int mvpp2_stop(struct net_device *dev)
> {
> struct mvpp2_port *port = netdev_priv(dev);
> struct mvpp2_port_pcpu *port_pcpu;
> + struct mvpp2 *priv = port->priv;
> int cpu;
>
> mvpp2_stop_dev(port);
> @@ -6633,6 +6634,10 @@ static int mvpp2_stop(struct net_device *dev)
> /* Mask interrupts on all CPUs */
> on_each_cpu(mvpp2_interrupts_mask, port, 1);
>
> + if (priv->hw_version == MVPP22 && !port->phy_node && port->link_irq) {
> + free_irq(port->link_irq, port);
> + }
> +
> free_irq(port->irq, port);
> for_each_present_cpu(cpu) {
> port_pcpu = per_cpu_ptr(port->pcpu, cpu);
>
> Otherwise a sequence: ifconfig up/down/up results in faults.

You're right, thanks for the patch! I'll squash it in v2.

Thanks!
Antoine

--
Antoine Ténart, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]