From: Daniel Örstadius <hidden> Date: 2010-08-13 09:19:26
Since bluetoothd power cycles the adapter at startup, it is possible
that the plugin gets a reply from reading the state of the MCE and
tries to power the adapter before it is down. The patch checks for
that situation and if it occurs postpones powering the adapter to
the mode change callback. The off_requested member of btd_adapter
is used for the check, so it is set to FALSE when the adapter is
down.
/Daniel
From: Daniel Örstadius <hidden> Date: 2010-08-18 11:25:17
On Fri, Aug 13, 2010 at 12:19 PM, Daniel Örstadius
[off-list ref] wrote:
Since bluetoothd power cycles the adapter at startup, it is possible
that the plugin gets a reply from reading the state of the MCE and
tries to power the adapter before it is down. The patch checks for
that situation and if it occurs postpones powering the adapter to
the mode change callback. The off_requested member of btd_adapter
is used for the check, so it is set to FALSE when the adapter is
down.
From: Daniel Örstadius <hidden> Date: 2010-08-18 13:20:49
On Wed, Aug 18, 2010 at 2:25 PM, Daniel Örstadius
[off-list ref] wrote:
On Fri, Aug 13, 2010 at 12:19 PM, Daniel Örstadius
[off-list ref] wrote:
quoted
Since bluetoothd power cycles the adapter at startup, it is possible
that the plugin gets a reply from reading the state of the MCE and
tries to power the adapter before it is down. The patch checks for
that situation and if it occurs postpones powering the adapter to
the mode change callback. The off_requested member of btd_adapter
is used for the check, so it is set to FALSE when the adapter is
down.
From: Johan Hedberg <hidden> Date: 2010-08-18 13:33:32
Hi Daniel,
On Wed, Aug 18, 2010, Daniel Örstadius wrote:
Patch without the off_requested part.
/Daniel
From 3160d36371fe7c95ecd5a4eb3e167ac374dbc4d4 Mon Sep 17 00:00:00 2001
From: Daniel Orstadius <redacted>
Date: Wed, 18 Aug 2010 15:48:28 +0300
Subject: [PATCH] Maemo6 MCE: handle race condition at startup
Since bluetoothd power cycles the adapter at startup, it is possible
that the plugin gets a reply from reading the state of the MCE and
tries to power the adapter before it is down. The patch checks for
that situation and if it occurs postpones powering the adapter to
the powered state callback.
---
plugins/maemo6.c | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)