From: Alan Ott <alan@signal11.us>
To: David Hauweele <david@hauweele.net>
Cc: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>,
Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
linux-zigbee-devel@lists.sourceforge.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [Linux-zigbee-devel] [PATCH 2/2] mrf24j40: Keep the interrupt line enabled
Date: Mon, 13 May 2013 23:55:48 -0400 [thread overview]
Message-ID: <5191B5C4.2020609@signal11.us> (raw)
In-Reply-To: <1368112788-25701-2-git-send-email-david@hauweele.net>
On 5/9/13 11:19 AM, David Hauweele wrote:
> Disabling the interrupt line could miss an IRQ and leave the line into a
> low state hence locking the driver.
>
Have you observed this? My understanding is that the interrupt won't be
lost but instead delayed until enable_irq() is called.
I got this pattern from the other 802.15.4 drivers. Perhaps my
understanding is wrong.
> Signed-off-by: David Hauweele <david@hauweele.net>
> ---
> drivers/net/ieee802154/mrf24j40.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c
> index 1e3ddf3..6ef32f7 100644
> --- a/drivers/net/ieee802154/mrf24j40.c
> +++ b/drivers/net/ieee802154/mrf24j40.c
> @@ -603,8 +603,6 @@ static irqreturn_t mrf24j40_isr(int irq, void *data)
> {
> struct mrf24j40 *devrec = data;
>
> - disable_irq_nosync(irq);
> -
> schedule_work(&devrec->irqwork);
>
> return IRQ_HANDLED;
> @@ -619,7 +617,7 @@ static void mrf24j40_isrwork(struct work_struct *work)
> /* Read the interrupt status */
> ret = read_short_reg(devrec, REG_INTSTAT, &intstat);
> if (ret)
> - goto out;
> + return;
>
> /* Check for TX complete */
> if (intstat & 0x1)
> @@ -628,9 +626,6 @@ static void mrf24j40_isrwork(struct work_struct *work)
> /* Check for Rx */
> if (intstat & 0x8)
> schedule_work(&devrec->rxwork);
> -
> -out:
> - enable_irq(devrec->spi->irq);
> }
>
> static void mrf24j40_rxwork(struct work_struct *work)
>
WARNING: multiple messages have this Message-ID (diff)
From: Alan Ott <alan-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
To: David Hauweele <david-1EggE+PRa6vk1uMJSBkQmQ@public.gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH 2/2] mrf24j40: Keep the interrupt line enabled
Date: Mon, 13 May 2013 23:55:48 -0400 [thread overview]
Message-ID: <5191B5C4.2020609@signal11.us> (raw)
In-Reply-To: <1368112788-25701-2-git-send-email-david-1EggE+PRa6vk1uMJSBkQmQ@public.gmane.org>
On 5/9/13 11:19 AM, David Hauweele wrote:
> Disabling the interrupt line could miss an IRQ and leave the line into a
> low state hence locking the driver.
>
Have you observed this? My understanding is that the interrupt won't be
lost but instead delayed until enable_irq() is called.
I got this pattern from the other 802.15.4 drivers. Perhaps my
understanding is wrong.
> Signed-off-by: David Hauweele <david-1EggE+PRa6vk1uMJSBkQmQ@public.gmane.org>
> ---
> drivers/net/ieee802154/mrf24j40.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c
> index 1e3ddf3..6ef32f7 100644
> --- a/drivers/net/ieee802154/mrf24j40.c
> +++ b/drivers/net/ieee802154/mrf24j40.c
> @@ -603,8 +603,6 @@ static irqreturn_t mrf24j40_isr(int irq, void *data)
> {
> struct mrf24j40 *devrec = data;
>
> - disable_irq_nosync(irq);
> -
> schedule_work(&devrec->irqwork);
>
> return IRQ_HANDLED;
> @@ -619,7 +617,7 @@ static void mrf24j40_isrwork(struct work_struct *work)
> /* Read the interrupt status */
> ret = read_short_reg(devrec, REG_INTSTAT, &intstat);
> if (ret)
> - goto out;
> + return;
>
> /* Check for TX complete */
> if (intstat & 0x1)
> @@ -628,9 +626,6 @@ static void mrf24j40_isrwork(struct work_struct *work)
> /* Check for Rx */
> if (intstat & 0x8)
> schedule_work(&devrec->rxwork);
> -
> -out:
> - enable_irq(devrec->spi->irq);
> }
>
> static void mrf24j40_rxwork(struct work_struct *work)
>
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
next prev parent reply other threads:[~2013-05-14 3:55 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-09 15:19 [PATCH 1/2] mrf24j40: Avoid transmission while receiving a frame David Hauweele
2013-05-09 15:19 ` David Hauweele
2013-05-09 15:19 ` [PATCH 2/2] mrf24j40: Keep the interrupt line enabled David Hauweele
2013-05-14 3:55 ` Alan Ott [this message]
2013-05-14 3:55 ` Alan Ott
2013-05-16 21:34 ` [Linux-zigbee-devel] " David Hauweele
2013-05-19 23:04 ` Alan Ott
2013-05-21 16:17 ` David Hauweele
2013-05-21 18:22 ` Alan Ott
2013-05-21 18:22 ` Alan Ott
2013-05-14 3:22 ` [Linux-zigbee-devel] [PATCH 1/2] mrf24j40: Avoid transmission while receiving a frame Alan Ott
[not found] ` <5191ADE4.8040709-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
2013-05-16 17:45 ` David Hauweele
2013-05-20 0:05 ` [PATCH testing] mrf24j40: Move INIT_COMPLETION to before the packet is sent Alan Ott
2013-05-20 0:05 ` Alan Ott
2013-05-22 2:01 ` [PATCH beta 1] 0/3] Fix race conditions in mrf24j40 interrupts Alan Ott
2013-05-22 2:01 ` Alan Ott
2013-05-22 2:01 ` [PATCH beta 1] 1/3] mrf24j40: Move INIT_COMPLETION() to before packet transmission Alan Ott
2013-05-22 2:01 ` Alan Ott
2013-05-22 2:01 ` [PATCH beta 1] 2/3] mrf24j40: Use threaded IRQ handler Alan Ott
2013-05-22 2:01 ` Alan Ott
2013-05-22 2:01 ` [PATCH beta 1] 3/3] mrf24j40: Use level-triggered interrupts Alan Ott
2013-05-22 2:03 ` [PATCH beta 1] 0/3] Fix race conditions in mrf24j40 interrupts Alan Ott
2013-05-22 20:32 ` David Hauweele
2013-05-23 6:36 ` Alan Ott
2013-05-23 6:36 ` Alan Ott
2013-05-23 17:54 ` David Hauweele
2013-05-23 17:54 ` David Hauweele
2013-05-23 19:33 ` Alan Ott
2013-10-06 3:52 ` [PATCH v1 " Alan Ott
2013-10-06 3:52 ` Alan Ott
2013-10-06 3:52 ` [PATCH v1 1/3] mrf24j40: Move INIT_COMPLETION() to before packet transmission Alan Ott
2013-10-06 3:52 ` Alan Ott
2013-10-06 3:52 ` [PATCH v1 2/3] mrf24j40: Use threaded IRQ handler Alan Ott
2013-10-06 3:52 ` Alan Ott
2013-10-06 3:52 ` [PATCH v1 3/3] mrf24j40: Use level-triggered interrupts Alan Ott
2013-10-06 3:52 ` Alan Ott
2013-10-08 19:32 ` [PATCH v1 0/3] Fix race conditions in mrf24j40 interrupts 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=5191B5C4.2020609@signal11.us \
--to=alan@signal11.us \
--cc=alex.bluesman.smirnov@gmail.com \
--cc=david@hauweele.net \
--cc=dbaryshkov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-zigbee-devel@lists.sourceforge.net \
--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.