From: Alexander Aring <alex.aring@gmail.com>
To: linux-wpan@vger.kernel.org
Cc: m.olbrich@pengutronix.de, Alexander Aring <alex.aring@gmail.com>
Subject: [PATCH bluetooth-next 2/9] at86rf230: add missing error handling
Date: Tue, 7 Oct 2014 10:38:26 +0200 [thread overview]
Message-ID: <1412671113-26675-3-git-send-email-alex.aring@gmail.com> (raw)
In-Reply-To: <1412671113-26675-1-git-send-email-alex.aring@gmail.com>
This patch adds an async error handling function if sync state change
runs into a timeout. The async error handling function tries to recover
the phy state machine into a valid state.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
drivers/net/ieee802154/at86rf230.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
index 6857038..44d2f1d 100644
--- a/drivers/net/ieee802154/at86rf230.c
+++ b/drivers/net/ieee802154/at86rf230.c
@@ -690,8 +690,10 @@ at86rf230_sync_state_change(struct at86rf230_local *lp, unsigned int state)
rc = wait_for_completion_timeout(&lp->state_complete,
msecs_to_jiffies(100));
- if (!rc)
+ if (!rc) {
+ at86rf230_async_error(lp, &lp->state, -ETIMEDOUT);
return -ETIMEDOUT;
+ }
return 0;
}
--
2.1.2
next prev parent reply other threads:[~2014-10-07 8:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-07 8:38 [PATCH bluetooth-next 0/9] at86rf230: various fixes and cleanups Alexander Aring
2014-10-07 8:38 ` [PATCH bluetooth-next 1/9] at86rf230: fix errno on tx timeout handling Alexander Aring
2014-10-07 8:54 ` Varka Bhadram
2014-10-07 8:38 ` Alexander Aring [this message]
2014-10-07 8:38 ` [PATCH bluetooth-next 3/9] at86rf230: correct aret lifs and sifs handling Alexander Aring
2014-10-07 8:51 ` Varka Bhadram
2014-10-07 8:56 ` Alexander Aring
2014-10-07 9:00 ` Varka Bhadram
2014-10-07 8:38 ` [PATCH bluetooth-next 4/9] at86rf230: correct at86rf2xx lifs timings Alexander Aring
2014-10-07 8:38 ` [PATCH bluetooth-next 5/9] at86rf230: squash unnecessary dereferencing Alexander Aring
2014-10-07 8:38 ` [PATCH bluetooth-next 6/9] at86rf230: add missing enable_irq Alexander Aring
2014-10-07 8:38 ` [PATCH bluetooth-next 7/9] at86rf230: fix race condition Alexander Aring
2014-10-07 8:38 ` [PATCH bluetooth-next 8/9] at86rf230: fix enable_irq handling on async spi Alexander Aring
2014-10-07 8:38 ` [PATCH bluetooth-next 9/9] at86rf230: remove unnecessary print of async error Alexander Aring
2014-10-07 11:16 ` [PATCH bluetooth-next 0/9] at86rf230: various fixes and cleanups Marcel Holtmann
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=1412671113-26675-3-git-send-email-alex.aring@gmail.com \
--to=alex.aring@gmail.com \
--cc=linux-wpan@vger.kernel.org \
--cc=m.olbrich@pengutronix.de \
/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).