diff mbox

net: stmmac: Fix null-function call in ISR on stmmac1000

Message ID E5152E61-5896-46FD-BF4A-16CDFB3796F6@bluematt.me (mailing list archive)
State Not Applicable
Headers show

Commit Message

Matt Corallo June 25, 2016, 7:35 p.m. UTC
At least on Meson GXBB, the CORE_IRQ_MTL_RX_OVERFLOW interrupt is thrown
with the stmmac1000 driver, which does not support set_rx_tail_ptr. With
this patch and the clock fixes, 1G ethernet works on ODROID-C2.

Signed-off-by: Matt Corallo <git@bluematt.me>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

 							STMMAC_CHAN0);

Comments

Giuseppe CAVALLARO June 27, 2016, 5:50 a.m. UTC | #1
Thanks Matt for the fix

On 6/25/2016 9:35 PM, Matt Corallo wrote:
> At least on Meson GXBB, the CORE_IRQ_MTL_RX_OVERFLOW interrupt is thrown
> with the stmmac1000 driver, which does not support set_rx_tail_ptr. With
> this patch and the clock fixes, 1G ethernet works on ODROID-C2.
>
> Signed-off-by: Matt Corallo <git@bluematt.me>

Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>

> ---
>  drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index a473c18..e407126 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -2804,7 +2804,7 @@ static irqreturn_t stmmac_interrupt(int irq, void
> *dev_id)
>  				priv->tx_path_in_lpi_mode = true;
>  			if (status & CORE_IRQ_TX_PATH_EXIT_LPI_MODE)
>  				priv->tx_path_in_lpi_mode = false;
> -			if (status & CORE_IRQ_MTL_RX_OVERFLOW)
> +			if (status & CORE_IRQ_MTL_RX_OVERFLOW && priv->hw->dma->set_rx_tail_ptr)
>  				priv->hw->dma->set_rx_tail_ptr(priv->ioaddr,
>  							priv->rx_tail_addr,
>  							STMMAC_CHAN0);
>
David Miller June 29, 2016, 7:58 a.m. UTC | #2
From: Matt Corallo <linux@bluematt.me>
Date: Sat, 25 Jun 2016 19:35:03 +0000

> At least on Meson GXBB, the CORE_IRQ_MTL_RX_OVERFLOW interrupt is thrown
> with the stmmac1000 driver, which does not support set_rx_tail_ptr. With
> this patch and the clock fixes, 1G ethernet works on ODROID-C2.
> 
> Signed-off-by: Matt Corallo <git@bluematt.me>

This patch does not apply without rejects to any of my trees.
Matt Corallo June 30, 2016, 7:48 p.m. UTC | #3
Damn mail clients and their helpful corruption of patches...
Resent w/o the extran \n in the diff header.

On 06/29/16 07:58, David Miller wrote:
> From: Matt Corallo <linux@bluematt.me>
> Date: Sat, 25 Jun 2016 19:35:03 +0000
> 
>> At least on Meson GXBB, the CORE_IRQ_MTL_RX_OVERFLOW interrupt is thrown
>> with the stmmac1000 driver, which does not support set_rx_tail_ptr. With
>> this patch and the clock fixes, 1G ethernet works on ODROID-C2.
>>
>> Signed-off-by: Matt Corallo <git@bluematt.me>
> 
> This patch does not apply without rejects to any of my trees.
> 
> _______________________________________________
> linux-amlogic mailing list
> linux-amlogic@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-amlogic
>
diff mbox

Patch

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index a473c18..e407126 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2804,7 +2804,7 @@  static irqreturn_t stmmac_interrupt(int irq, void
*dev_id)
 				priv->tx_path_in_lpi_mode = true;
 			if (status & CORE_IRQ_TX_PATH_EXIT_LPI_MODE)
 				priv->tx_path_in_lpi_mode = false;
-			if (status & CORE_IRQ_MTL_RX_OVERFLOW)
+			if (status & CORE_IRQ_MTL_RX_OVERFLOW && priv->hw->dma->set_rx_tail_ptr)
 				priv->hw->dma->set_rx_tail_ptr(priv->ioaddr,
 							priv->rx_tail_addr,