From: Ben Hutchings <bhutchings@solarflare.com>
To: Krishna Gudipati <kgudipat@Brocade.com>
Cc: "'davem@davemloft.net'" <davem@davemloft.net>,
"'netdev@vger.kernel.org'" <netdev@vger.kernel.org>,
Adapter Linux Open SRC Team
<adapter_linux_open_src_team@Brocade.COM>
Subject: RE: [PATCH] bna: Implement ethtool flash_device entry point.
Date: Wed, 1 Feb 2012 22:17:50 +0000 [thread overview]
Message-ID: <1328134670.2541.19.camel@bwh-desktop> (raw)
In-Reply-To: <B5EE62D80D50B84BB9E5174F7FCCE80A260325B6E1@HQ1-EXCH02.corp.brocade.com>
On Wed, 2012-02-01 at 14:10 -0800, Krishna Gudipati wrote:
> Thanks Ben for the review.
>
> I am making the changes as per the review comments to return proper error code.
>
> > + init_completion(&fcomp.comp);
> > + spin_lock_irqsave(&bnad->bna_lock, flags);
>
> No need to save flags, this is not called in IRQ context!
>
> [Krishna]: bna_lock is used in Interrupt context as well, by using spin_lock_irq instead of
> spin_lock_irqsave() - we will lose the state of the interrupts & will
> unconditionally enable interrupts. We plan to stay with using spin_lock_irqsave()
> as it's safe.
bnad_flash_device() will be called in process context, therefore it is
correct to unconditionally enable interrupts. It is safe but odd to use
spin_lock_irqsave()/spin_lock_irqrestore() in such a function.
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2012-02-01 22:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-01 0:06 [PATCH] bna: Implement ethtool flash_device entry point kgudipat
2012-02-01 19:14 ` Ben Hutchings
2012-02-01 22:10 ` Krishna Gudipati
2012-02-01 22:17 ` Ben Hutchings [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-02-02 1:02 kgudipat
2012-02-02 1:29 ` Ben Hutchings
2012-02-02 4:13 ` David Miller
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=1328134670.2541.19.camel@bwh-desktop \
--to=bhutchings@solarflare.com \
--cc=adapter_linux_open_src_team@Brocade.COM \
--cc=davem@davemloft.net \
--cc=kgudipat@Brocade.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox