Subject: Re: [PATCH v7 net-next] ravb: Add dma queue interrupt support

From: Sergei Shtylyov <[email-masked]>
Date: Tue, 15 Mar 2016 20:08:02 +0300

Hello.

On 03/15/2016 06:03 PM, Yoshihiro Kaneko wrote:

>>> From: Kazuya Mizuguchi <[email-masked]>
>>>
>>> This patch supports the following interrupts.
>>>
>>> - One interrupt for multiple (timestamp, error, gPTP)
>>> - One interrupt for emac
>>> - Four interrupts for dma queue (best effort rx/tx, network control rx/tx)
>>>
>>> This patch improve efficiency of the interrupt handler by adding the
>>> interrupt handler corresponding to each interrupt source described
>>> above. Additionally, it reduces the number of times of the access to
>>> EthernetAVB IF.
>>> Also this patch prevent this driver depends on the whim of a boot loader.
>>>
>>> [[email-masked]: define bit names of registers]
>>> [[email-masked]: add comment for gen3 only registers]
>>> [[email-masked]: fix coding style]
>>> [[email-masked]: update changelog]
>>> [[email-masked]: gen3: fix initialization of interrupts]
>>> [[email-masked]: gen3: fix clearing interrupts]
>>> [[email-masked]: gen3: add helper function for request_irq()]
>>> [[email-masked]: gen3: remove IRQF_SHARED flag for request_irq()]
>>> [[email-masked]: revert ravb_close() and ravb_ptp_stop()]
>>> [[email-masked]: avoid calling free_irq() to non-hooked interrupts]
>>> [[email-masked]: make NC/BE interrupt handler a function]
>>> [[email-masked]: make timestamp interrupt handler a function]
>>> [[email-masked]: timestamp interrupt is handled in multiple
>>>    interrupt handler instead of dma queue interrupt handler]
>>> Signed-off-by: Kazuya Mizuguchi <[email-masked]>
>>> Signed-off-by: Yoshihiro Kaneko <[email-masked]>
>>
>> [...]
>>>
>>> diff --git a/drivers/net/ethernet/renesas/ravb_main.c
>>> b/drivers/net/ethernet/renesas/ravb_main.c
>>> index 8f2c4fb..8fa8ffe 100644
>>> --- a/drivers/net/ethernet/renesas/ravb_main.c
>>> +++ b/drivers/net/ethernet/renesas/ravb_main.c
>>
>> [...]
>>>
>>> @@ -757,14 +806,73 @@ static irqreturn_t ravb_interrupt(int irq, void
>>> *dev_id)
>>>                  result = IRQ_HANDLED;
>>>          }
>>>
>>> -       if (iss & ISS_CGIS)
>>> -               result = ravb_ptp_interrupt(ndev);
>>> +       /* gPTP interrupt status summary */
>>> +       if ((iss & ISS_CGIS) && ravb_ptp_interrupt(ndev) == IRQ_HANDLED)
>>> +               result = IRQ_HANDLED;
>>
>>     Wait, this seems like a bug in the existing driver! Please do fix it with
>> a separate patch against net.git. Sorry about missing (or even adding) it
>> while cleaning up the driver before submission...

> Thanks, I will do so.

    TIA.

>>
>> [...]
>>
>>     Looks fine otherwise, however the new features and the fixes shouldn't be
>> mixed together, so I couldn't ACK yet. I'll go test it on gen2...
>
> Thanks in advance.

    My testing on the modified Porter board went smooth.

> Thanks,
> kaneko

MBR, Sergei