lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 11 Mar 2021 11:31:09 +0530
From:   gubbaven@...eaurora.org
To:     Bjorn Andersson <bjorn.andersson@...aro.org>
Cc:     marcel@...tmann.org, johan.hedberg@...il.com, mka@...omium.org,
        linux-kernel@...r.kernel.org, linux-bluetooth@...r.kernel.org,
        hemantg@...eaurora.org, linux-arm-msm@...r.kernel.org,
        bgodavar@...eaurora.org, rjliao@...eaurora.org,
        hbandi@...eaurora.org, abhishekpandit@...omium.org
Subject: Re: [RFC PATCH v1] Bluetooth: hci_qca: Add device_may_wakeup support

Hi Bjorn,

On 2021-03-10 20:32, Bjorn Andersson wrote:
> On Wed 10 Mar 05:41 CST 2021, Venkata Lakshmi Narayana Gubba wrote:
> 
>> Added device_may_wakeup() support.
> 
> This would be an excellent place to describe _why_ this is necessary,
> instead of just repeating $subject.
> 
> Something along the lines of the comment in the patch.
> 
> Regards,
> Bjorn
> 
[Venkata]:
Sure.I will update in next patch.
>> 
>> Signed-off-by: Venkata Lakshmi Narayana Gubba 
>> <gubbaven@...eaurora.org>
>> ---
>>  drivers/bluetooth/hci_qca.c | 15 +++++++++++++++
>>  1 file changed, 15 insertions(+)
>> 
>> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
>> index de36af6..73af901 100644
>> --- a/drivers/bluetooth/hci_qca.c
>> +++ b/drivers/bluetooth/hci_qca.c
>> @@ -1571,6 +1571,20 @@ static void qca_cmd_timeout(struct hci_dev 
>> *hdev)
>>  	mutex_unlock(&qca->hci_memdump_lock);
>>  }
>> 
>> +static bool qca_prevent_wake(struct hci_dev *hdev)
>> +{
>> +	struct hci_uart *hu = hci_get_drvdata(hdev);
>> +	bool wakeup;
>> +
>> +	/* UART driver handles the interrupt from BT SoC.So we need to use
>> +	 * device handle of UART driver to get the status of device may 
>> wakeup.
>> +	 */
>> +	wakeup = device_may_wakeup(hu->serdev->ctrl->dev.parent);
>> +	bt_dev_dbg(hu->hdev, "wakeup status : %d", wakeup);
>> +
>> +	return !wakeup;
>> +}
>> +
>>  static int qca_wcn3990_init(struct hci_uart *hu)
>>  {
>>  	struct qca_serdev *qcadev;
>> @@ -1721,6 +1735,7 @@ static int qca_setup(struct hci_uart *hu)
>>  		qca_debugfs_init(hdev);
>>  		hu->hdev->hw_error = qca_hw_error;
>>  		hu->hdev->cmd_timeout = qca_cmd_timeout;
>> +		hu->hdev->prevent_wake = qca_prevent_wake;
>>  	} else if (ret == -ENOENT) {
>>  		/* No patch/nvm-config found, run with original fw/config */
>>  		set_bit(QCA_ROM_FW, &qca->flags);
>> --
>> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a 
>> member
>> of Code Aurora Forum, hosted by The Linux Foundation
>> 

Regards,
Venkata.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ