From: <sean.wang@mediatek.com>
To: robh+dt@kernel.org, mark.rutland@arm.com, marcel@holtmann.org,
johan.hedberg@gmail.com
Cc: devicetree@vger.kernel.org, linux-bluetooth@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
Sean Wang <sean.wang@mediatek.com>
Subject: [PATCH 3/6] Bluetooth: mediatek: fix up an error path to restore bdev->tx_state
Date: Fri, 15 Feb 2019 07:19:35 +0800 [thread overview]
Message-ID: <b1a496748170af6a89d8ba19db9412787ef53668.1550184473.git.sean.wang@mediatek.com> (raw)
In-Reply-To: <cover.1550184473.git.sean.wang@mediatek.com>
From: Sean Wang <sean.wang@mediatek.com>
Restore bdev->tx_state with clearing bit BTMTKUART_TX_WAIT_VND_EVT
when there is an error on waiting for the corresponding event.
Fixes: 7237c4c9ec92 ("Bluetooth: mediatek: Add protocol support for MediaTek serial devices")
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
drivers/bluetooth/btmtkuart.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/bluetooth/btmtkuart.c b/drivers/bluetooth/btmtkuart.c
index b8ea011b82d8..9f8177b216b6 100644
--- a/drivers/bluetooth/btmtkuart.c
+++ b/drivers/bluetooth/btmtkuart.c
@@ -115,11 +115,13 @@ static int mtk_hci_wmt_sync(struct hci_dev *hdev, u8 op, u8 flag, u16 plen,
TASK_INTERRUPTIBLE, HCI_INIT_TIMEOUT);
if (err == -EINTR) {
bt_dev_err(hdev, "Execution of wmt command interrupted");
+ clear_bit(BTMTKUART_TX_WAIT_VND_EVT, &bdev->tx_state);
return err;
}
if (err) {
bt_dev_err(hdev, "Execution of wmt command timed out");
+ clear_bit(BTMTKUART_TX_WAIT_VND_EVT, &bdev->tx_state);
return -ETIMEDOUT;
}
--
2.18.0
next prev parent reply other threads:[~2019-02-14 23:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-14 23:19 [PATCH 0/6]Bluetooth: mediatek: add support for MediaTek MT7663U and MT7668U UART devices sean.wang
2019-02-14 23:19 ` [PATCH 1/6] dt-bindings: net: bluetooth: " sean.wang
2019-02-18 13:05 ` Marcel Holtmann
2019-02-28 18:35 ` Rob Herring
2019-02-14 23:19 ` [PATCH 2/6] Bluetooth: mediatek: trivial typo fix sean.wang
2019-02-18 13:06 ` Marcel Holtmann
2019-02-14 23:19 ` sean.wang [this message]
2019-02-18 13:07 ` [PATCH 3/6] Bluetooth: mediatek: fix up an error path to restore bdev->tx_state Marcel Holtmann
2019-02-14 23:19 ` [PATCH 4/6] Bluetooth: mediatek: pass a pointer to mtk_hci_wmt_sync sean.wang
2019-02-18 13:08 ` Marcel Holtmann
2019-02-14 23:19 ` [PATCH 5/6] Bluetooth: mediatek: update the common setup between MT7622 and other devices sean.wang
2019-02-18 13:09 ` Marcel Holtmann
2019-02-14 23:19 ` [PATCH 6/6] Bluetooth: mediatek: add support for MediaTek MT7663U and MT7668U UART devices sean.wang
2019-02-18 13:10 ` [PATCH 0/6]Bluetooth: " Marcel Holtmann
2019-02-19 21:13 ` Sean Wang
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=b1a496748170af6a89d8ba19db9412787ef53668.1550184473.git.sean.wang@mediatek.com \
--to=sean.wang@mediatek.com \
--cc=devicetree@vger.kernel.org \
--cc=johan.hedberg@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=marcel@holtmann.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).