All of lore.kernel.org
 help / color / mirror / Atom feed
From: Loic Poulain <loic.poulain@intel.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 3/3] Bluetooth: hci_intel: Add runtime PM support
Date: Tue, 01 Sep 2015 17:32:04 +0200	[thread overview]
Message-ID: <55E5C4F4.6020305@intel.com> (raw)
In-Reply-To: <00A4FA75-DFA4-4890-A4A1-A4969FE5A313@holtmann.org>

Hi Marcel,

Thanks for the review.

>> static int intel_recv_lpm(struct hci_dev *hdev, struct sk_buff *skb)
>> @@ -895,9 +936,24 @@ static int intel_recv(struct hci_uart *hu, const void *data, int count)
>> static int intel_enqueue(struct hci_uart *hu, struct sk_buff *skb)
>> {
>> 	struct intel_data *intel = hu->priv;
>> +	struct list_head *p;
>>
>> 	BT_DBG("hu %p skb %p", hu, skb);
>>
>> +	mutex_lock(&intel_device_list_lock);
>> +	list_for_each(p, &intel_device_list) {
>> +		struct intel_device *idev = list_entry(p, struct intel_device,
>> +						      list);
>> +
>> +		if (hu->tty->dev->parent == idev->pdev->dev.parent) {
>> +			pm_runtime_get_sync(&idev->pdev->dev);
>
> just for my own clarification. Why this is get_sync and the other just get?
>

I want to be sure resume is completed before enqueuing any packet in 
order to be able to send the packet in dequeue.
Moreover, since LPM and 'standard' packets share the same queue, we 
don't want to enqueue a 'standard' packet before our LPM one.

In the threaded IRQ , we are actually already LPM resumed since we have
send a LPM resume ack to the controller, I just use get and put to 
notify the resume to the PM core and trigger autosuspend.

In the busy work, we don't need to be synced since we are already in a
async work. It is more a keep alive to delay the autosuspend.

Regards,
Loic
-- 
Intel Open Source Technology Center
http://oss.intel.com/

  reply	other threads:[~2015-09-01 15:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-01 14:42 [PATCH 1/3] Bluetooth: hci_intel: Implement LPM suspend/resume Loic Poulain
2015-09-01 14:42 ` [PATCH 2/3] Bluetooth: hci_intel: Add PM support Loic Poulain
2015-09-01 15:05   ` Marcel Holtmann
2015-09-01 14:42 ` [PATCH 3/3] Bluetooth: hci_intel: Add runtime " Loic Poulain
2015-09-01 15:09   ` Marcel Holtmann
2015-09-01 15:32     ` Loic Poulain [this message]
2015-09-01 15:37       ` Marcel Holtmann
2015-09-01 15:00 ` [PATCH 1/3] Bluetooth: hci_intel: Implement LPM suspend/resume 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=55E5C4F4.6020305@intel.com \
    --to=loic.poulain@intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.