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>
Cc: Pavel Machek <pavel@suse.cz>, Stefan Seyfried <seife@suse.de>,
	linux-bluetooth@vger.kernel.org,
	linux-pm@lists.linux-foundation.org, linux-usb@vger.kernel.org
Subject: Re: [rft]autosuspend for btusb
Date: Fri, 22 Aug 2008 15:51:56 +0200	[thread overview]
Message-ID: <200808221551.57225.oliver@neukum.org> (raw)
In-Reply-To: <1219412033.7591.464.camel@violet.holtmann.net>

Am Freitag 22 August 2008 15:33:53 schrieb Marcel Holtmann:
> Hi Oliver,
> 
> > this patch against vanilla 2.6.27-rc4 implements full autosuspend for
> > btusb. It should allow the HCI to be suspended during periods of inactivity
> > while retaining full service if the device supports USB remote wakeup.
> 
> actually we do have two cases. An inactive device can be woken up by an
> HCI Connection Request coming via the interrupt endpoint or if we have a
> send_frame callback via the Bluetooth stack itself.

Yes, if send_frame triggers it, we wake using a work queue. A connection
request will wake us via remote wakeup.

> What do we do if a device does not support remote wakeup?

Autosuspend on close, resume on open. I don't think we can do more.

> > Please test and/or comment on the code.
> > It works for me with a few glitches but still needs to be a bit polished.
> 
> Please explain the tx_in_flight stuff to me. It looks unneeded since we
> anchor all TX URBs anyway.

The completion of an URB may happen after the autosuspend timeout passed.
But we cannot use the pm counters as they are not accessible in interrupt.
Hence we must maintain a counter ourselves.

> So can we just leave the ISOC interface stuff out of it and try to get

The isoc stuff should be handled already, but I haven't tested that.

> the case right where we have control and interrupt URBs only and maybe
> bulk URBs in case we an ACL link up.
> 
> This reminds me that we should extend the notify() callback to inform
> about sniff and active state changes. Since in theory when a connection
> goes into sniff mode, we could suspend it.

We should definitely do that.

	Regards
		Oliver


	

  reply	other threads:[~2008-08-22 13:51 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-22 13:20 [rft]autosuspend for btusb Oliver Neukum
2008-08-22 13:33 ` Marcel Holtmann
2008-08-22 13:51   ` Oliver Neukum [this message]
2008-08-22 14:31     ` Marcel Holtmann
2008-08-22 14:38       ` Oliver Neukum
2008-08-25 10:43       ` Oliver Neukum
2008-08-25 11:51         ` Marcel Holtmann
2009-02-11 16:52           ` [linux-pm] " Matthew Garrett
2009-02-11 16:55             ` Marcel Holtmann
2008-08-26  9:56         ` Pavel Machek
2008-08-26 10:05           ` Pavel Machek
2008-08-26 11:02             ` Oliver Neukum
2008-08-28  8:06               ` Pavel Machek
2008-08-25 11:37       ` btusb hibernation/suspend breakage in current -git Rafael J. Wysocki
2008-08-25 11:53         ` Oliver Neukum
2008-08-25 11:55           ` Marcel Holtmann
2008-08-25 12:45         ` Pavel Machek
     [not found]         ` <BEF46EAA-4013-44BB-881F-F1740FE8BE6D@holtmann.org>
2008-08-25 13:50           ` Oliver Neukum
2008-08-26  9:36             ` Rafael J. Wysocki
2008-08-26  9:43               ` Oliver Neukum
2008-08-26 10:10                 ` Rafael J. Wysocki
2008-08-26 11:41                   ` Stefan Seyfried
2008-08-26 18:44                     ` Rafael J. Wysocki
2008-08-26 19:53                       ` Oliver Neukum
2008-08-26 23:28                         ` Rafael J. Wysocki
2008-08-27  7:55                           ` Oliver Neukum
2008-08-27 13:04                             ` Rafael J. Wysocki
2008-08-27 13:09                               ` Oliver Neukum
2008-08-27 13:28                                 ` Rafael J. Wysocki
2008-08-27 22:33                                   ` [linux-pm] " Rafael J. Wysocki
2008-08-28  7:17                                     ` Oliver Neukum
2008-09-08 20:49                                       ` Marcel Holtmann
2008-09-08 21:45                                         ` Rafael J. Wysocki
     [not found]                           ` <5E249C07-0710-49B2-B352-87DDA85E891D@holtmann.org>
2008-08-27  9:10                             ` Pavel Machek
2008-08-27 13:29                               ` Rafael J. Wysocki
2008-08-27  9:56                           ` 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=200808221551.57225.oliver@neukum.org \
    --to=oliver@neukum.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=pavel@suse.cz \
    --cc=seife@suse.de \
    /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