All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Simon Horman <horms@verge.net.au>,
	Magnus Damm <magnus.damm@gmail.com>,
	Linux-sh list <linux-sh@vger.kernel.org>,
	linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH/RFC v4 net-next] ravb: Add dma queue interrupt support
Date: Sun, 21 Feb 2016 15:42:41 +0000	[thread overview]
Message-ID: <56C9DAF1.1030003@cogentembedded.com> (raw)
In-Reply-To: <CAH1o70JFUVaRb07ivtnZhOYNbh8n2mdZpH41nsMjEenx5yNeeQ@mail.gmail.com>

Hello.

    Sorry for the late reply -- I was hoping to get AVB working on another 
gen2 board...

On 02/08/2016 08:19 PM, Yoshihiro Kaneko wrote:

[...]
>>>>> From: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
>>>>>
>>>>> This patch supports the following interrupts.
>>>>>
>>>>> - One interrupt for multiple (descriptor, error, management)
>>>>> - 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.
>>>>>
>>>>> Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
>>>>> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>

[...]

>>>>> diff --git a/drivers/net/ethernet/renesas/ravb_main.c
>>>>> b/drivers/net/ethernet/renesas/ravb_main.c
>>>>> index ac43ed9..076f25f 100644
>>>>> --- a/drivers/net/ethernet/renesas/ravb_main.c
>>>>> +++ b/drivers/net/ethernet/renesas/ravb_main.c
[...]
>>>>> +
>>>>> +       spin_lock(&priv->lock);
>>>>> +
>>>>> +       ris0 = ravb_read(ndev, RIS0);
>>>>> +       ric0 = ravb_read(ndev, RIC0);
>>>>> +       tis  = ravb_read(ndev, TIS);
>>>>> +       tic  = ravb_read(ndev, TIC);
>>>>> +
>>>>> +       /* Timestamp updated */
>>>>> +       if (tis & TIS_TFUF) {
>>>>> +               ravb_write(ndev, TID_TFUD, TID);
>>>>
>>>>      Wait, you're supposed to clear the TFUF interrupt, not to disable!
>>>
>>> Thanks for finding this bug.
>>>
>>>> And with that fixed, this interrupt's handler could get factored out into
>>>> a
>>>> function...
>>>
>>> Is this not too small to make a function?
>>
>>     I wouldn't say so. But need to count the summary LoCs, of course...
>> perhaps indeed not worth it...
>
> I don't feel need for making it a function.
> It only clears the interrupt and calls ravb_get_tx_tstamp().

    I meant that the enclosing *if* statement should be a part of function too...

[...]

>>>>> +                          struct net_device *ndev, struct device *dev,
>>>>> +                          const char *ch)
>>>>> +{
>>>>> +       char *name;
>>>>> +       int error;
>>>>> +
>>>>> +       name = devm_kasprintf(dev, GFP_KERNEL, "%s:%s", ndev->name, ch);
>>>>> +       error = request_irq(irq, handler, IRQF_SHARED, name, ndev);
>>>>
>>>>      Not sure if we need IRQF_SHARED on those IRQs, they're not really
>>>> shareable...
>>>
>>> I don't know whether this causes something bad.
>>> I think this controller is supporting a shared IRQ.
>>
>>     Based on the high-level trigger, I'd rather suspect not. Anyway, all the
>> SoC IRQs are dedicated to a certain (single) source.
>
> I don't want to change that if there is no fatal issue in the use of
> IRQF_SHARED.
> However, I will remove the flag if it is simple waste...

    It's not a waste but it just shouldn't be needed.

[...]

>>>>      OK, I'll now proceed to sanity-testing this patch on the gen2
>>>> hardware.
>>
>>     I'm afraid this will have to wait until I have a gen2 board with fully
>> working AVB... :-(
>
> Does it take long time?

    Unfortunately. :-(
    I wasn't able to get the AVB driver to work on the modified Porter board 
and now I've ascertained that it doesn't work on the re-jumpred Alt board too, 
seemingly for the same reason -- the AVB_MDIO pin gets stuck at 1 during the 
MDIO bus scan, so the device opening fails due to the driver not able to 
connect to PHY. LTSI 3.10 based kernels do work, however...

> Thanks,
> kaneko

MBR, Sergei


WARNING: multiple messages have this Message-ID (diff)
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Simon Horman <horms@verge.net.au>,
	Magnus Damm <magnus.damm@gmail.com>,
	Linux-sh list <linux-sh@vger.kernel.org>,
	linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH/RFC v4 net-next] ravb: Add dma queue interrupt support
Date: Sun, 21 Feb 2016 18:42:41 +0300	[thread overview]
Message-ID: <56C9DAF1.1030003@cogentembedded.com> (raw)
In-Reply-To: <CAH1o70JFUVaRb07ivtnZhOYNbh8n2mdZpH41nsMjEenx5yNeeQ@mail.gmail.com>

Hello.

    Sorry for the late reply -- I was hoping to get AVB working on another 
gen2 board...

On 02/08/2016 08:19 PM, Yoshihiro Kaneko wrote:

[...]
>>>>> From: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
>>>>>
>>>>> This patch supports the following interrupts.
>>>>>
>>>>> - One interrupt for multiple (descriptor, error, management)
>>>>> - 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.
>>>>>
>>>>> Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
>>>>> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>

[...]

>>>>> diff --git a/drivers/net/ethernet/renesas/ravb_main.c
>>>>> b/drivers/net/ethernet/renesas/ravb_main.c
>>>>> index ac43ed9..076f25f 100644
>>>>> --- a/drivers/net/ethernet/renesas/ravb_main.c
>>>>> +++ b/drivers/net/ethernet/renesas/ravb_main.c
[...]
>>>>> +
>>>>> +       spin_lock(&priv->lock);
>>>>> +
>>>>> +       ris0 = ravb_read(ndev, RIS0);
>>>>> +       ric0 = ravb_read(ndev, RIC0);
>>>>> +       tis  = ravb_read(ndev, TIS);
>>>>> +       tic  = ravb_read(ndev, TIC);
>>>>> +
>>>>> +       /* Timestamp updated */
>>>>> +       if (tis & TIS_TFUF) {
>>>>> +               ravb_write(ndev, TID_TFUD, TID);
>>>>
>>>>      Wait, you're supposed to clear the TFUF interrupt, not to disable!
>>>
>>> Thanks for finding this bug.
>>>
>>>> And with that fixed, this interrupt's handler could get factored out into
>>>> a
>>>> function...
>>>
>>> Is this not too small to make a function?
>>
>>     I wouldn't say so. But need to count the summary LoCs, of course...
>> perhaps indeed not worth it...
>
> I don't feel need for making it a function.
> It only clears the interrupt and calls ravb_get_tx_tstamp().

    I meant that the enclosing *if* statement should be a part of function too...

[...]

>>>>> +                          struct net_device *ndev, struct device *dev,
>>>>> +                          const char *ch)
>>>>> +{
>>>>> +       char *name;
>>>>> +       int error;
>>>>> +
>>>>> +       name = devm_kasprintf(dev, GFP_KERNEL, "%s:%s", ndev->name, ch);
>>>>> +       error = request_irq(irq, handler, IRQF_SHARED, name, ndev);
>>>>
>>>>      Not sure if we need IRQF_SHARED on those IRQs, they're not really
>>>> shareable...
>>>
>>> I don't know whether this causes something bad.
>>> I think this controller is supporting a shared IRQ.
>>
>>     Based on the high-level trigger, I'd rather suspect not. Anyway, all the
>> SoC IRQs are dedicated to a certain (single) source.
>
> I don't want to change that if there is no fatal issue in the use of
> IRQF_SHARED.
> However, I will remove the flag if it is simple waste...

    It's not a waste but it just shouldn't be needed.

[...]

>>>>      OK, I'll now proceed to sanity-testing this patch on the gen2
>>>> hardware.
>>
>>     I'm afraid this will have to wait until I have a gen2 board with fully
>> working AVB... :-(
>
> Does it take long time?

    Unfortunately. :-(
    I wasn't able to get the AVB driver to work on the modified Porter board 
and now I've ascertained that it doesn't work on the re-jumpred Alt board too, 
seemingly for the same reason -- the AVB_MDIO pin gets stuck at 1 during the 
MDIO bus scan, so the device opening fails due to the driver not able to 
connect to PHY. LTSI 3.10 based kernels do work, however...

> Thanks,
> kaneko

MBR, Sergei

  reply	other threads:[~2016-02-21 15:42 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-24 15:52 [PATCH/RFC v4 net-next] ravb: Add dma queue interrupt support Yoshihiro Kaneko
2016-01-24 15:52 ` Yoshihiro Kaneko
2016-01-26  0:23 ` Simon Horman
2016-01-26  0:23   ` Simon Horman
2016-01-26 19:00   ` Sergei Shtylyov
2016-01-26 19:00     ` Sergei Shtylyov
2016-01-27  1:49     ` Simon Horman
2016-01-27  1:49       ` Simon Horman
2016-01-28 15:50       ` Sergei Shtylyov
2016-01-28 15:50         ` Sergei Shtylyov
2016-01-28 18:36         ` Sergei Shtylyov
2016-01-28 18:36           ` Sergei Shtylyov
2016-01-28 16:48 ` Sergei Shtylyov
2016-01-28 16:48   ` Sergei Shtylyov
2016-02-07 16:50   ` Yoshihiro Kaneko
2016-02-07 16:50     ` Yoshihiro Kaneko
2016-02-07 17:09     ` Sergei Shtylyov
2016-02-07 17:09       ` Sergei Shtylyov
2016-02-08 17:19       ` Yoshihiro Kaneko
2016-02-08 17:19         ` Yoshihiro Kaneko
2016-02-21 15:42         ` Sergei Shtylyov [this message]
2016-02-21 15:42           ` Sergei Shtylyov
2016-02-21 19:16           ` Sergei Shtylyov
2016-02-21 19:16             ` Sergei Shtylyov
2016-02-25 22:22             ` Sergei Shtylyov
2016-02-25 22:22               ` Sergei Shtylyov
2016-01-28 17:32 ` Sergei Shtylyov
2016-01-28 17:32   ` Sergei Shtylyov
2016-02-07 16:56   ` Yoshihiro Kaneko
2016-02-07 16:56     ` Yoshihiro Kaneko
2016-02-07 17:18     ` Sergei Shtylyov
2016-02-07 17:18       ` Sergei Shtylyov
2016-01-28 17:51 ` Sergei Shtylyov
2016-01-28 17:51   ` Sergei Shtylyov
2016-02-07 17:18   ` Yoshihiro Kaneko
2016-02-07 17:18     ` Yoshihiro Kaneko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56C9DAF1.1030003@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=davem@davemloft.net \
    --cc=horms@verge.net.au \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=ykaneko0929@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.