From: Alexander Aring Date: Tue, 7 Oct 2014 08:38:26 +0000 (+0200) Subject: at86rf230: add missing error handling X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d06c21990fbbca644a31a3c851c22a8d1f5d0e66;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git at86rf230: add missing error handling 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 Signed-off-by: Marcel Holtmann --- diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index 6857038111a0..44d2f1de31e0 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; }