* [RFC] Bluetooth : Fix hci_sync miss wakeup interrupt
@ 2014-10-22 13:48 박찬열
2014-10-28 17:26 ` Marcel Holtmann
0 siblings, 1 reply; 3+ messages in thread
From: 박찬열 @ 2014-10-22 13:48 UTC (permalink / raw)
To: linux-bluetooth
DQpfX2hjaV9jbWRfc3luY19ldigpLCBfX2hjaV9yZXFfc3luYygpIGNvdWxkIG1pc3Mgd2FrZV91
cF9pbnRlcnJ1cHQgZnJvbQ0KaGNpX3JlcV9zeW5jX2NvbXBsZXRlKCkgYmVjYXVzZSBoY2lfY21k
X3dvcmsoKSB3b3JrcXVlZSBhbmQgaXRzIHJlcG9uc2UNCmNvdWxkIGJlIGNvbXBsZXRlZCBiZWZv
cmUgdGhleSBhcmUgcmVhZHkgdG8gZ2V0IHRoZSBzaWduYWwgdGhyb3VnaA0KYWRkX3dhaXRfcXVl
dWUoKSwgc2V0X2N1cnJlbnRfc3RhdGUoVEFTS19JTlRFUlJVUFRJQkxFKS4NCg0KU2lnbmVkLW9m
Zi1ieTogQ2hhbi15ZW9sIFBhcmsgPGNoYW55ZW9sLnBhcmtAc2Ftc3VuZy5jb20+DQpTaWduZWQt
b2ZmLWJ5OiBLeXVuZ21pbiBQYXJrIDxreXVuZ21pbi5wYXJrQHNhbXN1bmcuY29tPg0KLS0tDQog
bmV0L2JsdWV0b290aC9oY2lfY29yZS5jIHwgMTggKysrKysrKysrKystLS0tLS0tDQogMSBmaWxl
IGNoYW5nZWQsIDExIGluc2VydGlvbnMoKyksIDcgZGVsZXRpb25zKC0pDQoNCmRpZmYgLS1naXQg
YS9uZXQvYmx1ZXRvb3RoL2hjaV9jb3JlLmMgYi9uZXQvYmx1ZXRvb3RoL2hjaV9jb3JlLmMNCmlu
ZGV4IGNiMDVkN2YuLmMwMDhmMWYgMTAwNjQ0DQotLS0gYS9uZXQvYmx1ZXRvb3RoL2hjaV9jb3Jl
LmMNCisrKyBiL25ldC9ibHVldG9vdGgvaGNpX2NvcmUuYw0KQEAgLTExND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[flat|nested] 3+ messages in thread
* Re: [RFC] Bluetooth : Fix hci_sync miss wakeup interrupt
2014-10-22 13:48 [RFC] Bluetooth : Fix hci_sync miss wakeup interrupt 박찬열
@ 2014-10-28 17:26 ` Marcel Holtmann
2014-10-31 7:03 ` Chanyeol,Park
0 siblings, 1 reply; 3+ messages in thread
From: Marcel Holtmann @ 2014-10-28 17:26 UTC (permalink / raw)
To: chanyeol.park; +Cc: linux-bluetooth
Hi Chan-yeol,
> __hci_cmd_sync_ev(), __hci_req_sync() could miss wake_up_interrupt from
> hci_req_sync_complete() because hci_cmd_work() workquee and its reponse
> could be completed before they are ready to get the signal through
> add_wait_queue(), set_current_state(TASK_INTERRUPTIBLE).
>
> Signed-off-by: Chan-yeol Park <chanyeol.park@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> net/bluetooth/hci_core.c | 18 +++++++++++-------
> 1 file changed, 11 insertions(+), 7 deletions(-)
>
> diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
> index cb05d7f..c008f1f 100644
> --- a/net/bluetooth/hci_core.c
> +++ b/net/bluetooth/hci_core.c
> @@ -1147,13 +1147,15 @@ struct sk_buff *__hci_cmd_sync_ev(struct hci_dev *hdev, u16 opcode, u32 plen,
>
> hdev->req_status = HCI_REQ_PEND;
>
> - err = hci_req_run(&req, hci_req_sync_complete);
> - if (err < 0)
> - return ERR_PTR(err);
> -
the whole patch has whitespace damages. Please fix this.
Regards
Marcel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] Bluetooth : Fix hci_sync miss wakeup interrupt
2014-10-28 17:26 ` Marcel Holtmann
@ 2014-10-31 7:03 ` Chanyeol,Park
0 siblings, 0 replies; 3+ messages in thread
From: Chanyeol,Park @ 2014-10-31 7:03 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: linux-bluetooth, 박찬열
[-- Attachment #1: Type: text/plain, Size: 1529 bytes --]
Hi Marcel
Due to internal reason I made mistake.
I raised it again.
Thanks
Chanyeol
2014. 10. 29. 오전 2:32에 "Marcel Holtmann" <marcel@holtmann.org>님이 작성:
> Hi Chan-yeol,
>
> > __hci_cmd_sync_ev(), __hci_req_sync() could miss wake_up_interrupt from
> > hci_req_sync_complete() because hci_cmd_work() workquee and its reponse
> > could be completed before they are ready to get the signal through
> > add_wait_queue(), set_current_state(TASK_INTERRUPTIBLE).
> >
> > Signed-off-by: Chan-yeol Park <chanyeol.park@samsung.com>
> > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> > ---
> > net/bluetooth/hci_core.c | 18 +++++++++++-------
> > 1 file changed, 11 insertions(+), 7 deletions(-)
> >
> > diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
> > index cb05d7f..c008f1f 100644
> > --- a/net/bluetooth/hci_core.c
> > +++ b/net/bluetooth/hci_core.c
> > @@ -1147,13 +1147,15 @@ struct sk_buff *__hci_cmd_sync_ev(struct hci_dev
> *hdev, u16 opcode, u32 plen,
> >
> > hdev->req_status = HCI_REQ_PEND;
> >
> > - err = hci_req_run(&req, hci_req_sync_complete);
> > - if (err < 0)
> > - return ERR_PTR(err);
> > -
>
> the whole patch has whitespace damages. Please fix this.
>
> Regards
>
> Marcel
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
[-- Attachment #2: Type: text/html, Size: 2223 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-10-31 7:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-22 13:48 [RFC] Bluetooth : Fix hci_sync miss wakeup interrupt 박찬열
2014-10-28 17:26 ` Marcel Holtmann
2014-10-31 7:03 ` Chanyeol,Park
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox