[PATCH] misc/bt-host: Clear the ATN flag on open

Cyril Bur cyrilbur at gmail.com
Wed Oct 28 16:17:55 AEDT 2015


Not doing so might cause a subsequent read to return a stale message.

Signed-off-by: Cyril Bur <cyrilbur at gmail.com>
---
 drivers/misc/bt-host.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/misc/bt-host.c b/drivers/misc/bt-host.c
index bf1e4ac..0ee93ce 100644
--- a/drivers/misc/bt-host.c
+++ b/drivers/misc/bt-host.c
@@ -120,6 +120,8 @@ static int bt_host_open(struct inode *inode, struct file *file)
 {
 	struct bt_host *bt_host = file_bt_host(file);
 
+	/* Avoid the first read reading possibly stale data */
+	clr_h2b_atn(bt_host);
 	clr_b_busy(bt_host);
 
 	return 0;
-- 
2.6.2



More information about the openbmc mailing list