Host sleep handshake with device might been fail, disable platform wakeup
interrupt in this case.
Signed-off-by: Xinming Hu <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Amitkumar Karwar <[email protected]>
---
drivers/bluetooth/btmrvl_sdio.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c
index 08e01f0..6166888 100644
--- a/drivers/bluetooth/btmrvl_sdio.c
+++ b/drivers/bluetooth/btmrvl_sdio.c
@@ -1625,6 +1625,13 @@ static int btmrvl_sdio_suspend(struct device *dev)
if (priv->adapter->hs_state != HS_ACTIVATED) {
if (btmrvl_enable_hs(priv)) {
BT_ERR("HS not activated, suspend failed!");
+ /* Disable platform specific wakeup interrupt */
+ if (card->plt_wake_cfg &&
+ card->plt_wake_cfg->irq_bt >= 0) {
+ disable_irq_wake(card->plt_wake_cfg->irq_bt);
+ disable_irq(card->plt_wake_cfg->irq_bt);
+ }
+
priv->adapter->is_suspending = false;
return -EBUSY;
}
--
1.8.1.4
On Thu, Mar 30, 2017 at 6:17 AM, Xinming Hu <[email protected]> wrote:
> Hi Guenter,
>
>> -----Original Message-----
>> From: Guenter Roeck [mailto:[email protected]]
>> Sent: 2017=E5=B9=B43=E6=9C=8830=E6=97=A5 20:58
>> To: Xinming Hu
>> Cc: Linux Bluetooth; Marcel Holtmann; Amitkumar Karwar; Cathy Luo; Guent=
er
>> Roeck
>> Subject: [EXT] Re: [PATCH 2/2] Bluetooth: btmrvl: remove unnecessary wak=
eup
>> interrupt number sanity check
>>
>> External Email
>>
>> ----------------------------------------------------------------------
>> On Thu, Mar 30, 2017 at 5:52 AM, Xinming Hu <[email protected]> wrote:
>> > Sanity check of interrupt number in interrupt handler is unnecessary
>> > and confusion, remove it.
>> >
>> > Signed-off-by: Xinming Hu <[email protected]>
>> > Signed-off-by: Guenter Roeck <[email protected]>
>>
>> Do you possibly mean "Reported-by:" ?
>
> The patch is prepared based on your suggestions on https://issuetracker.g=
oogle.com/issues/35647652
>
This means that either "Reported-by:" or "Suggested-by:" would be
appropriate, but not "Signed-off-by:".
Thanks,
Guenter
> Thanks
> Simon
>>
>> > Signed-off-by: Amitkumar Karwar <[email protected]>
>> > ---
>> > drivers/bluetooth/btmrvl_sdio.c | 9 +++------
>> > 1 file changed, 3 insertions(+), 6 deletions(-)
>> >
>> > diff --git a/drivers/bluetooth/btmrvl_sdio.c
>> > b/drivers/bluetooth/btmrvl_sdio.c index 6166888..7a26961 100644
>> > --- a/drivers/bluetooth/btmrvl_sdio.c
>> > +++ b/drivers/bluetooth/btmrvl_sdio.c
>> > @@ -62,12 +62,9 @@ static irqreturn_t btmrvl_wake_irq_bt(int irq, void
>> > *priv) {
>> > struct btmrvl_plt_wake_cfg *cfg =3D priv;
>> >
>> > - if (cfg->irq_bt >=3D 0) {
>> > - pr_info("%s: wake by bt", __func__);
>> > - cfg->wake_by_bt =3D true;
>> > - disable_irq_nosync(irq);
>> > - }
>> > -
>> > + pr_info("%s: wake by bt", __func__);
>> > + cfg->wake_by_bt =3D true;
>> > + disable_irq_nosync(irq);
>> > return IRQ_HANDLED;
>> > }
>> >
>> > --
>> > 1.8.1.4
>> >
SGkgTWFyY2VsLA0KDQo+IC0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQo+IEZyb206IGxpbnV4
LWJsdWV0b290aC1vd25lckB2Z2VyLmtlcm5lbC5vcmcNCj4gW21haWx0bzpsaW51eC1ibHVldG9v
dGgtb3duZXJAdmdlci5rZXJuZWwub3JnXSBPbiBCZWhhbGYgT2YgTWFyY2VsDQo+IEhvbHRtYW5u
DQo+IFNlbnQ6IDIwMTfE6jPUwjMwyNUgMjI6MjENCj4gVG86IFhpbm1pbmcgSHUNCj4gQ2M6IExp
bnV4IEJsdWV0b290aDsgQW1pdGt1bWFyIEthcndhcjsgQ2F0aHkgTHVvOyBHdWVudGVyIFJvZWNr
DQo+IFN1YmplY3Q6IFJlOiBbUEFUQ0ggM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2VsDQo+IA0KPiAtLQ0KPiBUbyB1bnN1YnNjcmliZSBmcm9tIHRoaXMgbGlzdDogc2VuZCB0
aGUgbGluZSAidW5zdWJzY3JpYmUgbGludXgtYmx1ZXRvb3RoIiBpbg0KPiB0aGUgYm9keSBvZiBh
IG1lc3NhZ2UgdG8gbWFqb3Jkb21vQHZnZXIua2VybmVsLm9yZyBNb3JlIG1ham9yZG9tbyBpbmZv
DQo+IGF0ICBodHRwOi8vdmdlci5rZXJuZWwub3JnL21ham9yZG9tby1pbmZvLmh0bWwNCg==
Hi Xinming,
> Host sleep handshake with device might been fail, disable platform wakeup
> interrupt in this case.
>
> Signed-off-by: Xinming Hu <[email protected]>
> Signed-off-by: Guenter Roeck <[email protected]>
> Signed-off-by: Amitkumar Karwar <[email protected]>
> ---
> drivers/bluetooth/btmrvl_sdio.c | 7 +++++++
> 1 file changed, 7 insertions(+)
patch has been applied to bluetooth-next tree.
Regards
Marcel
Hi Xinming,
> Sanity check of interrupt number in interrupt handler is unnecessary and
> confusion, remove it.
>
> Signed-off-by: Xinming Hu <[email protected]>
> Signed-off-by: Guenter Roeck <[email protected]>
> Signed-off-by: Amitkumar Karwar <[email protected]>
> ---
> drivers/bluetooth/btmrvl_sdio.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
patch does not apply to bluetooth-next tree.
error: drivers/bluetooth/btmrvl_sdio.c: patch does not apply
Patch failed at 0002 Bluetooth: btmrvl: remove unnecessary wakeup interrupt number sanity check
Regards
Marcel
SGkgR3VlbnRlciwNCg0KPiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBHdWVu
dGVyIFJvZWNrIFttYWlsdG86Z3JvZWNrQGdvb2dsZS5jb21dDQo+IFNlbnQ6IDIwMTflubQz5pyI
MzDml6UgMjA6NTgNCj4gVG86IFhpbm1pbmcgSHUNCj4gQ2M6IExpbnV4IEJsdWV0b290aDsgTWFy
Y2VsIEhvbHRtYW5uOyBBbWl0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EpOw0K
PiA+ICAgICAgICAgcmV0dXJuIElSUV9IQU5ETEVEOw0KPiA+ICB9DQo+ID4NCj4gPiAtLQ0KPiA+
IDEuOC4xLjQNCj4gPg0K
On Thu, Mar 30, 2017 at 5:52 AM, Xinming Hu <[email protected]> wrote:
> Sanity check of interrupt number in interrupt handler is unnecessary and
> confusion, remove it.
>
> Signed-off-by: Xinming Hu <[email protected]>
> Signed-off-by: Guenter Roeck <[email protected]>
Do you possibly mean "Reported-by:" ?
> Signed-off-by: Amitkumar Karwar <[email protected]>
> ---
> drivers/bluetooth/btmrvl_sdio.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c
> index 6166888..7a26961 100644
> --- a/drivers/bluetooth/btmrvl_sdio.c
> +++ b/drivers/bluetooth/btmrvl_sdio.c
> @@ -62,12 +62,9 @@ static irqreturn_t btmrvl_wake_irq_bt(int irq, void *priv)
> {
> struct btmrvl_plt_wake_cfg *cfg = priv;
>
> - if (cfg->irq_bt >= 0) {
> - pr_info("%s: wake by bt", __func__);
> - cfg->wake_by_bt = true;
> - disable_irq_nosync(irq);
> - }
> -
> + pr_info("%s: wake by bt", __func__);
> + cfg->wake_by_bt = true;
> + disable_irq_nosync(irq);
> return IRQ_HANDLED;
> }
>
> --
> 1.8.1.4
>
Sanity check of interrupt number in interrupt handler is unnecessary and
confusion, remove it.
Signed-off-by: Xinming Hu <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Amitkumar Karwar <[email protected]>
---
drivers/bluetooth/btmrvl_sdio.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c
index 6166888..7a26961 100644
--- a/drivers/bluetooth/btmrvl_sdio.c
+++ b/drivers/bluetooth/btmrvl_sdio.c
@@ -62,12 +62,9 @@ static irqreturn_t btmrvl_wake_irq_bt(int irq, void *priv)
{
struct btmrvl_plt_wake_cfg *cfg = priv;
- if (cfg->irq_bt >= 0) {
- pr_info("%s: wake by bt", __func__);
- cfg->wake_by_bt = true;
- disable_irq_nosync(irq);
- }
-
+ pr_info("%s: wake by bt", __func__);
+ cfg->wake_by_bt = true;
+ disable_irq_nosync(irq);
return IRQ_HANDLED;
}
--
1.8.1.4