From: David Miller <davem@davemloft.net>
To: jhautbois@gmail.com
Cc: richard.cochran@omicron.at, shemminger@vyatta.com, tj@kernel.org,
randy.dunlap@oracle.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] net: phy: balance disable/enable irq on change
Date: Thu, 23 Dec 2010 11:24:50 -0800 (PST) [thread overview]
Message-ID: <20101223.112450.246547841.davem@davemloft.net> (raw)
In-Reply-To: <1292756331-3735-1-git-send-email-jhautbois@gmail.com>
From: Jean-Michel Hautbois <jhautbois@gmail.com>
Date: Sun, 19 Dec 2010 11:58:48 +0100
> When phy interface changes its status, it calls phy_change() function.
> This function calls the interrupt disabling functions for the driver
> registered, but if this driver doesn't implement it, there is no IRQ
> disabling. After doing the work, we call enable_irq and not the
> respective driver function. This fixes it, as it could lead to an
> unbalanced IRQ. Error code changed to EOPNOTSUPP.
>
> Signed-off-by: Jean-Michel Hautbois <jhautbois@gmail.com>
This is completely bogus.
First of all, there are 5 call sites for phy_change_interrupt() but
you've only implemented the new semantics for two of those.
Therefore, if we even wanted this, we should implement the behavior in
phy_change_interrupt() itself instead of duplicating the logic at
each and every call site.
But we don't want this.
It's not appropriate at all. If a device lacks a way to turn
interrupt off and on, using disable_irq() and enable_irq() is not
necessarily correct.
If the interrupt line is shared, for example, this will break
everything.
next prev parent reply other threads:[~2010-12-23 19:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-19 10:58 Jean-Michel Hautbois
2010-12-19 10:58 ` [PATCH 2/4] net: phy: printk issues fixed Jean-Michel Hautbois
2010-12-19 10:58 ` [PATCH 3/4] net: phy: White space correction and switch/case braces Jean-Michel Hautbois
2010-12-19 10:58 ` [PATCH 4/4] net: phy: EXPORT_SYMBOL not following the function Jean-Michel Hautbois
2010-12-23 19:24 ` David Miller [this message]
2010-12-24 8:46 ` [PATCH 1/4] net: phy: balance disable/enable irq on change Jean-Michel Hautbois
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=20101223.112450.246547841.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jhautbois@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=randy.dunlap@oracle.com \
--cc=richard.cochran@omicron.at \
--cc=shemminger@vyatta.com \
--cc=tj@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
all inboxes | Powered by JetHome®