Re: [PATCH 5/9] ravb: Support separate Line0 (Desc), Line1 (Err) and Line2 (Mgmt) irqs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/4/22 5:54 PM, Phil Edworthy wrote:

> R-Car has a combined interrupt line, ch22 = Line0_DiA | Line1_A | Line2_A.

   R-Car gen3, you mean? Because R-Car gen2 has single IRQ...

> RZ/V2M has separate interrupt lines for each of these, so add a feature
> that allows the driver to get these interrupts and call the common handler.
> 
> We keep the "ch22" name for Line0_DiA and "ch24" for Line3 interrupts to
> keep the code simple.

   Not sure I agree with such simplification -- at least about "ch22"...

> Signed-off-by: Phil Edworthy <phil.edworthy@xxxxxxxxxxx>
> Reviewed-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>

[...]
> diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
> index d0b9688074ca..f12a23b9c391 100644
> --- a/drivers/net/ethernet/renesas/ravb_main.c
> +++ b/drivers/net/ethernet/renesas/ravb_main.c
[...]
> @@ -2167,6 +2184,10 @@ static int ravb_close(struct net_device *ndev)
>  		free_irq(priv->rx_irqs[RAVB_BE], ndev);
>  		free_irq(priv->emac_irq, ndev);
>  	}
> +	if (info->err_mgmt_irqs) {
> +		free_irq(priv->erra_irq, ndev);
> +		free_irq(priv->mgmta_irq, ndev);
> +	}

   Shouldn't this be under:

	if (info->multi_irqs) {

above?

>  	free_irq(ndev->irq, ndev);
>  
>  	if (info->nc_queues)
> @@ -2665,6 +2686,22 @@ static int ravb_probe(struct platform_device *pdev)
>  		}
>  	}
>  
> +	if (info->err_mgmt_irqs) {
> +		irq = platform_get_irq_byname(pdev, "err_a");
> +		if (irq < 0) {
> +			error = irq;
> +			goto out_release;
> +		}
> +		priv->erra_irq = irq;
> +
> +		irq = platform_get_irq_byname(pdev, "mgmt_a");
> +		if (irq < 0) {
> +			error = irq;
> +			goto out_release;
> +		}
> +		priv->mgmta_irq = irq;
> +	}
> +

   Same here... 

>  	priv->clk = devm_clk_get(&pdev->dev, NULL);
>  	if (IS_ERR(priv->clk)) {
>  		error = PTR_ERR(priv->clk);

MBR, Sergey



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux