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>
Subject: Re: [PATCH/RFC net-next] ravb: Add dma queue interrupt support
Date: Thu, 17 Dec 2015 20:42:59 +0300 [thread overview]
Message-ID: <5672F423.6010807@cogentembedded.com> (raw)
In-Reply-To: <CAH1o70LnEEu3iYos8wsaEZ=T67N+Tex_XHZgE9P93n6X6Bzz4A@mail.gmail.com>
Hello.
On 12/17/2015 07:29 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)
>>
>>
>> You don't say why the current 2-interrupt scheme (implemented by Simon's
>> patch) isn't enpough...
>>
>>> 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.h
>>> b/drivers/net/ethernet/renesas/ravb.h
>>> index 9fbe92a..eada5a1 100644
>>> --- a/drivers/net/ethernet/renesas/ravb.h
>>> +++ b/drivers/net/ethernet/renesas/ravb.h
>>> @@ -157,6 +157,7 @@ enum ravb_reg {
[...]
>>> +#define RAVB_RIx2_ALL 0x8003ffff
>>
>> No prefix. And there's bit 31 in this register, according to my gen3
>> manual. So, your _ALL isn't really "all bits". I'd rather call it RIx2_QFx.
>> Or even RIE2_QFS and RID2_QFD.
>
> I think that bit 31 is included in the value 0x8003ffff. Or I'm
> missing something?
Sorry, I misread the code.
>>> +
>>> +/* TIx */
>>
>> TIE/TID.
>>
>>> +#define RAVB_TIx_ALL 0x000fffff
>>
>> No prefix. And there's bit 31 in this register, according to my gen3
>> manual.
Oops, no bit 31 in these regs.
> So, your _ALL isn't really "all bits".
>
> I think the correct value is 0x000f0f0f.
Indeed, please fix.
>> [...]
>>>
>>> diff --git a/drivers/net/ethernet/renesas/ravb_main.c
>>> b/drivers/net/ethernet/renesas/ravb_main.c
>>> index 120cc25..753b67d 100644
>>> --- a/drivers/net/ethernet/renesas/ravb_main.c
>>> +++ b/drivers/net/ethernet/renesas/ravb_main.c
[...]
>>> @@ -654,7 +679,7 @@ static int ravb_stop_dma(struct net_device *ndev)
>>> }
>>>
>>> /* E-MAC interrupt handler */
>>> -static void ravb_emac_interrupt(struct net_device *ndev)
>>> +static void _ravb_emac_interrupt(struct net_device *ndev)
>>
>>
>> ravb_emac_interrupt_[un]locked() perhaps? Not sure which is more
>> correct... :-)
>
> How about ravb_process_emac_interrupt() ?
I've made up my mind -- I'd prefer ravb_emac_interrupt_unlocked().
[...]
>>> +static irqreturn_t ravb_multi_interrupt(int irq, void *dev_id)
>>> +{
>>> + struct net_device *ndev = dev_id;
>>> + struct ravb_private *priv = netdev_priv(ndev);
>>> + irqreturn_t result = IRQ_NONE;
>>> + u32 iss;
>>> +
>>> + spin_lock(&priv->lock);
>>> + /* Get interrupt status */
>>> + iss = ravb_read(ndev, ISS);
>>> +
>>> /* Error status summary */
>>> if (iss & ISS_ES) {
>>> ravb_error_interrupt(ndev);
>>> result = IRQ_HANDLED;
>>> }
>>>
>>> + /* Management */
>>
>>
>> Really? I thought that's gPTP Interrupt...
>
> gPTP seems to be a part of Management related interrupts.
ISS.CGIM is still described as gPTP interrupt mirror in my gen3 manual.
>>> if (iss & ISS_CGIS)
>>> result = ravb_ptp_interrupt(ndev);
>>>
>>> @@ -776,6 +843,55 @@ static irqreturn_t ravb_interrupt(int irq, void
>>> *dev_id)
[...]
> Thanks,
> kaneko
MBR, Sergei
next prev parent reply other threads:[~2015-12-17 17:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-15 12:23 [PATCH/RFC net-next] ravb: Add dma queue interrupt support Yoshihiro Kaneko
2015-12-15 18:59 ` Sergei Shtylyov
2015-12-15 19:00 ` Sergei Shtylyov
2015-12-17 16:29 ` Yoshihiro Kaneko
2015-12-17 17:42 ` Sergei Shtylyov [this message]
2015-12-20 9:10 ` 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=5672F423.6010807@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=davem@davemloft.net \
--cc=horms@verge.net.au \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).