[Macchiato] [EXT] Network driver crash

Steve McIntyre steve at einval.com
Sun Mar 4 21:35:17 GMT 2018


On Sun, Mar 04, 2018 at 10:29:15PM +0100, Marcin Wojtas wrote:
>Hi Steve,
>
>2018-03-04 22:03 GMT+01:00 Steve McIntyre <steve at einval.com>:
>
>    On Sun, Mar 04, 2018 at 01:30:31PM +0000, Stefan Chulski wrote:
>    >
>    >Yes. Look like it cause issue.
>    >
>    >Each TX done interrupt mapped to specific CPU by smp_affinity and without
>    IRQ
>    >balancing. Look like with old dtb interrupt raised on wrong CPU’s.
>    >
>    >You can work around this issue by disabling TX Done interrupts in
>    >mvpp2_port_has_tx_irqs
>    >
>    >
>    >
>    >         for (i = 0; i < 5; i++) {
>    >
>    >                     ret = of_property_match_string(port_node,
>    >"interrupt-names",
>    >
>    >                                                                irqs[i]);
>    >
>    >                     if (ret < 0)
>    >
>    >                                 return false;
>    >
>    >          }
>    >
>    >-       return true;
>    >
>    >+      return false;
>
>    Hi,
>
>    I've tried that but it doesn't fix the problem for me. Same symptoms -
>    complaints then a crash. Even hacking a similar change in
>    mvpp2_port_probe() didn't help.
>
>
>
>Just to make sure about your setup:
>- firmware from Leif?

Yup, the flash-image-17.10.bin file that it looks like he's now taken down.

>- which kernel revision?

current upstream git HEAD, built today - now on
58bdf601c2de6071d0386a7a6fa707bd04761c47. Just trivial changes to the
mvpp2.c source:

steve at mjolnir:~/linux.git$ git diff drivers/net/ethernet/
diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c
index 5a1668cdb461..07f32ed94747 100644
--- a/drivers/net/ethernet/marvell/mvpp2.c
+++ b/drivers/net/ethernet/marvell/mvpp2.c
@@ -5556,7 +5556,8 @@ static void mvpp2_txq_done(struct mvpp2_port *port, struct mvpp2_tx_queue *txq,
        int tx_done;
 
        if (txq_pcpu->cpu != smp_processor_id())
-               netdev_err(port->dev, "wrong cpu on the end of Tx processing\n");
+         netdev_err(port->dev, "wrong cpu on the end of Tx processing, txq for %d, s_p_i() says %d\n",
+                    txq_pcpu->cpu, smp_processor_id());
 
        tx_done = mvpp2_txq_sent_desc_proc(port, txq);
        if (!tx_done)
@@ -7719,7 +7720,7 @@ static bool mvpp2_port_has_tx_irqs(struct mvpp2 *priv,
                        return false;
        }
 
-       return true;
+       return false;
 }
 
 static void mvpp2_port_copy_mac_addr(struct net_device *dev, struct mvpp2 *priv,
@@ -7776,6 +7777,8 @@ static int mvpp2_port_probe(struct platform_device *pdev,
                queue_mode = MVPP2_QDIST_MULTI_MODE;
        }
 
+       has_tx_irqs = false;
+
        if (!has_tx_irqs)
                queue_mode = MVPP2_QDIST_SINGLE_MODE;
 



>
>Thanks,
>Marcin 
>
-- 
Steve McIntyre, Cambridge, UK.                                steve at einval.com
Into the distance, a ribbon of black
Stretched to the point of no turning back




More information about the Macchiato mailing list