public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] bug report: trouble reconnecting keyboard after	timeout
Date: Thu, 15 May 2008 16:15:04 +0200	[thread overview]
Message-ID: <1210860904.7025.50.camel@violet.holtmann.net> (raw)
In-Reply-To: <1210786481.4797.4.camel@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 345 bytes --]

Hi Dick,

> I upgraded bluez-utils and bluez-libs (3.31) and it didn't help.
> 
> I've attached a logfile, I hope it's sufficient.
> 
> My mouse and keyboard couldn't connect, I've reconnected them by
> manually disconnecting them in bluetooth-applet.

if I am not mistaken, then the attached kernel patch will fix this
issue.

Regards

Marcel


[-- Attachment #2: patch --]
[-- Type: text/x-patch, Size: 918 bytes --]

diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
index 519cdb9..96434d7 100644
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
@@ -581,6 +581,12 @@ static int hidp_session(void *arg)
 		hid_free_device(session->hid);
 	}
 
+	/* Wakeup user-space polling for socket errors */
+	session->intr_sock->sk->sk_err = EUNATCH;
+	session->ctrl_sock->sk->sk_err = EUNATCH;
+
+	hidp_schedule(session);
+
 	fput(session->intr_sock->file);
 
 	wait_event_timeout(*(ctrl_sk->sk_sleep),
@@ -879,6 +885,10 @@ int hidp_del_connection(struct hidp_conndel_req *req)
 			skb_queue_purge(&session->ctrl_transmit);
 			skb_queue_purge(&session->intr_transmit);
 
+			/* Wakeup user-space polling for socket errors */
+			session->intr_sock->sk->sk_err = EUNATCH;
+			session->ctrl_sock->sk->sk_err = EUNATCH;
+
 			/* Kill session thread */
 			atomic_inc(&session->terminate);
 			hidp_schedule(session);

[-- Attachment #3: Type: text/plain, Size: 230 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

[-- Attachment #4: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

  reply	other threads:[~2008-05-15 14:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-14 17:34 [Bluez-devel] bug report: trouble reconnecting keyboard after timeout Dick
2008-05-15 14:15 ` Marcel Holtmann [this message]
2008-05-15 15:55   ` Stefan Seyfried
2008-05-17  7:32   ` Dick
2008-05-30  5:03   ` Didier Link
2008-05-30  6:49     ` Dick
  -- strict thread matches above, loose matches on Subject: below --
2008-05-12 16:45 Dick
2008-05-12 17:19 ` Marcel Holtmann
2008-05-13 19:29   ` Dick

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=1210860904.7025.50.camel@violet.holtmann.net \
    --to=marcel@holtmann.org \
    --cc=bluez-devel@lists.sourceforge.net \
    /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