public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Oliver Neukum <oliver@neukum.org>
To: Marcel Holtmann <marcel@holtmann.org>,
	linux-usb@vger.kernel.org, linux-bluetooth@vger.kernel.org,
	Pavel Machek <pavel@ucw.cz>
Subject: fix bug in suspend/resume code of btusb
Date: Thu, 2 Oct 2008 22:32:06 +0200	[thread overview]
Message-ID: <200810022232.07165.oliver@neukum.org> (raw)

Hi,

this fixes an issue in btusb's suspend/resume support that strikes if
the adapter is suspended while the hci is down.
This probably fixes the bug Pavel sees with autosuspend and fixes a bug
for me. I am currently looking at issues with new hardware, but with this patch
it should work at least for the best hardware.

What tree should I base a clean patch against?

Signed-off-by: Oliver Neukum <oneukum@suse.de>

	Regards
		Oliver


---

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index ef24515..47ff028 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -1072,6 +1069,10 @@ static int btusb_resume(struct usb_interface *intf)
 			clear_bit(HCI_RUNNING, &hdev->flags);
 			return ret;
 		}
+	} else {
+		spin_lock_irq(&data->lock);
+		clear_bit(BTUSB_SUSPENDING, &data->flags);
+		spin_unlock_irq(&data->lock);
 	}
 
 	if (hdev->conn_hash.acl_num > 0) {

             reply	other threads:[~2008-10-02 20:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-02 20:32 Oliver Neukum [this message]
2008-10-02 22:12 ` fix bug in suspend/resume code of btusb Pavel Machek
2008-10-03  6:34 ` Marcel Holtmann
2008-10-06 11:09 ` Marcel Holtmann

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=200810022232.07165.oliver@neukum.org \
    --to=oliver@neukum.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=pavel@ucw.cz \
    /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