From: Daniel Mack <daniel@zonque.org>
To: Mugunthan V N <mugunthanvnm@ti.com>, davem@davemloft.net
Cc: julia.lawall@lip6.fr, netdev@vger.kernel.org, george.cherian@ti.com
Subject: Re: [PATCH 2/2] net: ethernet: cpsw: fix interrupt lookup logic in cpsw_probe()
Date: Wed, 03 Sep 2014 09:30:42 +0200 [thread overview]
Message-ID: <5406C3A2.4060103@zonque.org> (raw)
In-Reply-To: <5406C336.3020005@ti.com>
On 09/03/2014 09:28 AM, Mugunthan V N wrote:
> On Tuesday 02 September 2014 10:14 PM, Daniel Mack wrote:
>> The code in cpsw_probe() currently iterates over the available
>> interrupt resources and requests each of them. While doing so, it
>> keeps track of their indices through priv->irqs_table.
>>
>> However, the code currently only remembers the last interrupt in
>> a resource, and will leak the others if there is more than one.
>> This can only happen for board-file driven platforms and not via DT,
>> however.
>>
>> Also, there is currently no bounds check, while priv->irqs_table is a
>> fixed-size array. If we are passed more than 4 resources, we're in
>> trouble.
>>
>> This patch introduces a bounds check and changes the way interrupt
>> indices are kept. Tested on a Beagle Bone Black board only.
>>
>> Signed-off-by: Daniel Mack <zonque@gmail.com>
>
> The drivers is not supported for non-DT platforms as all the platforms
> which uses CPSW are DT only platforms.
Ok, thanks for explaining.
But then we can remove the iteration then and simplify the code, right?
The bounds check should also be done.
Thanks,
Daniel
next prev parent reply other threads:[~2014-09-03 7:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-02 16:44 [PATCH 1/2] net: ethernet: cpsw: don't claim IRQs with devm_request_irq() Daniel Mack
2014-09-02 16:44 ` [PATCH 2/2] net: ethernet: cpsw: fix interrupt lookup logic in cpsw_probe() Daniel Mack
2014-09-03 7:28 ` Mugunthan V N
2014-09-03 7:30 ` Daniel Mack [this message]
2014-09-03 8:22 ` Mugunthan V N
2014-09-03 8:23 ` Daniel Mack
2014-09-03 7:27 ` [PATCH 1/2] net: ethernet: cpsw: don't claim IRQs with devm_request_irq() Mugunthan V N
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=5406C3A2.4060103@zonque.org \
--to=daniel@zonque.org \
--cc=davem@davemloft.net \
--cc=george.cherian@ti.com \
--cc=julia.lawall@lip6.fr \
--cc=mugunthanvnm@ti.com \
--cc=netdev@vger.kernel.org \
/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.