From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: SH-Linux <linux-sh@vger.kernel.org>
Subject: Re: [PATCH 1/2] net: sh_eth: Fix receive packet "exceeded" condition in sh_eth_rx()
Date: Mon, 9 Jun 2014 20:11:54 +0900 [thread overview]
Message-ID: <5395967A.7030007@renesas.com> (raw)
In-Reply-To: <53959359.1060407@cogentembedded.com>
Hello.
(2014/06/09 19:58), Sergei Shtylyov wrote:
> Hello.
>
> On 09-06-2014 14:39, Yoshihiro Shimoda wrote:
>
>> This patch fixes the packet "exceeded" condition in sh_eth_rx() when
>> RACT in an RX descriptor is not set and the "quota" is 0.
>> Otherwise, kernel panic happens because the "&n->poll_list" is deleted
>> twice in sh_eth_poll() which calls napi_complete() and net_rx_action().
>
>> Signed-off-by: Kouei Abe <kouei.abe.cp@renesas.com>
>> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
>> ---
>> drivers/net/ethernet/renesas/sh_eth.c | 8 +++-----
>> 1 file changed, 3 insertions(+), 5 deletions(-)
>
>> diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
>> index 08ed9a3..ad0b5bd 100644
>> --- a/drivers/net/ethernet/renesas/sh_eth.c
>> +++ b/drivers/net/ethernet/renesas/sh_eth.c
> [...]
>> @@ -1508,7 +1506,7 @@ static int sh_eth_rx(struct net_device *ndev, u32 intr_status, int *quota)
>> sh_eth_write(ndev, EDRRR_R, EDRRR);
>> }
>>
>> - return exceeded;
>> + return (*quota <= 0);
>
> Parens not needed here.
Thank you for the point. I will remove the parens.
Best regards,
Yoshihiro Shimoda
> WBR, Sergei
>
prev parent reply other threads:[~2014-06-09 11:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-09 10:39 [PATCH 1/2] net: sh_eth: Fix receive packet "exceeded" condition in sh_eth_rx() Yoshihiro Shimoda
2014-06-09 10:58 ` Sergei Shtylyov
2014-06-09 11:11 ` Yoshihiro Shimoda [this message]
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=5395967A.7030007@renesas.com \
--to=yoshihiro.shimoda.uh@renesas.com \
--cc=linux-sh@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.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).