linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: hci_qca: fix in-band sleep enablement
@ 2019-10-09  8:51 Claire Chang
  2019-10-11  7:01 ` Harish Bandi
  0 siblings, 1 reply; 4+ messages in thread
From: Claire Chang @ 2019-10-09  8:51 UTC (permalink / raw)
  To: marcel, johan.hedberg
  Cc: linux-bluetooth, linux-kernel, rjliao, rongchi, Claire Chang

Enabling in-band sleep when there is no patch/nvm-config found and
bluetooth is running with the original fw/config.

Fixes: ba8f35979002 ("Bluetooth: hci_qca: Avoid setup failure on missing rampatch")
Fixes: 7dc5fe0814c3 ("Bluetooth: hci_qca: Avoid missing rampatch failure with userspace fw loader")
Signed-off-by: Claire Chang <tientzu@chromium.org>
---
 drivers/bluetooth/hci_qca.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index e3164c200eac..367eef893a11 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1291,10 +1291,8 @@ static int qca_setup(struct hci_uart *hu)
 	/* Setup patch / NVM configurations */
 	ret = qca_uart_setup(hdev, qca_baudrate, soc_type, soc_ver,
 			firmware_name);
-	if (!ret) {
-		set_bit(QCA_IBS_ENABLED, &qca->flags);
-		qca_debugfs_init(hdev);
-	} else if (ret == -ENOENT) {
+
+	if (ret == -ENOENT) {
 		/* No patch/nvm-config found, run with original fw/config */
 		ret = 0;
 	} else if (ret == -EAGAIN) {
@@ -1305,6 +1303,11 @@ static int qca_setup(struct hci_uart *hu)
 		ret = 0;
 	}
 
+	if (!ret) {
+		set_bit(QCA_IBS_ENABLED, &qca->flags);
+		qca_debugfs_init(hdev);
+	}
+
 	/* Setup bdaddr */
 	if (qca_is_wcn399x(soc_type))
 		hu->hdev->set_bdaddr = qca_set_bdaddr;
-- 
2.23.0.581.g78d2f28ef7-goog


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Bluetooth: hci_qca: fix in-band sleep enablement
  2019-10-09  8:51 [PATCH] Bluetooth: hci_qca: fix in-band sleep enablement Claire Chang
@ 2019-10-11  7:01 ` Harish Bandi
  2019-10-11  7:21   ` Balakrishna Godavarthi
  0 siblings, 1 reply; 4+ messages in thread
From: Harish Bandi @ 2019-10-11  7:01 UTC (permalink / raw)
  To: Claire Chang
  Cc: marcel, johan.hedberg, linux-bluetooth, linux-kernel, rjliao,
	rongchi, linux-bluetooth-owner, Balakrishna Godavarthi

++ Balakrishna

On 2019-10-09 14:21, Claire Chang wrote:
> Enabling in-band sleep when there is no patch/nvm-config found and
> bluetooth is running with the original fw/config.
> 
> Fixes: ba8f35979002 ("Bluetooth: hci_qca: Avoid setup failure on
> missing rampatch")
> Fixes: 7dc5fe0814c3 ("Bluetooth: hci_qca: Avoid missing rampatch
> failure with userspace fw loader")
> Signed-off-by: Claire Chang <tientzu@chromium.org>
> ---
>  drivers/bluetooth/hci_qca.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> index e3164c200eac..367eef893a11 100644
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c
> @@ -1291,10 +1291,8 @@ static int qca_setup(struct hci_uart *hu)
>  	/* Setup patch / NVM configurations */
>  	ret = qca_uart_setup(hdev, qca_baudrate, soc_type, soc_ver,
>  			firmware_name);
> -	if (!ret) {
> -		set_bit(QCA_IBS_ENABLED, &qca->flags);
> -		qca_debugfs_init(hdev);
> -	} else if (ret == -ENOENT) {
> +
> +	if (ret == -ENOENT) {
>  		/* No patch/nvm-config found, run with original fw/config */
>  		ret = 0;
>  	} else if (ret == -EAGAIN) {
> @@ -1305,6 +1303,11 @@ static int qca_setup(struct hci_uart *hu)
>  		ret = 0;
>  	}
> 
> +	if (!ret) {
> +		set_bit(QCA_IBS_ENABLED, &qca->flags);
> +		qca_debugfs_init(hdev);
> +	}
> +
>  	/* Setup bdaddr */
>  	if (qca_is_wcn399x(soc_type))
>  		hu->hdev->set_bdaddr = qca_set_bdaddr;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Bluetooth: hci_qca: fix in-band sleep enablement
  2019-10-11  7:01 ` Harish Bandi
@ 2019-10-11  7:21   ` Balakrishna Godavarthi
  2019-10-18  2:59     ` Claire Chang
  0 siblings, 1 reply; 4+ messages in thread
From: Balakrishna Godavarthi @ 2019-10-11  7:21 UTC (permalink / raw)
  To: Harish Bandi
  Cc: Claire Chang, marcel, johan.hedberg, linux-bluetooth,
	linux-kernel, rjliao, rongchi, linux-bluetooth-owner

Hi Claire,

This change will not work  as we need fw files to be loaded tofor IBS to 
active.
may i know on which chipset you have this issue of IBS active even with 
out fw download.

On 2019-10-11 12:31, Harish Bandi wrote:
> ++ Balakrishna
> 
> On 2019-10-09 14:21, Claire Chang wrote:
>> Enabling in-band sleep when there is no patch/nvm-config found and
>> bluetooth is running with the original fw/config.
>> 
>> Fixes: ba8f35979002 ("Bluetooth: hci_qca: Avoid setup failure on
>> missing rampatch")
>> Fixes: 7dc5fe0814c3 ("Bluetooth: hci_qca: Avoid missing rampatch
>> failure with userspace fw loader")
>> Signed-off-by: Claire Chang <tientzu@chromium.org>
>> ---
>>  drivers/bluetooth/hci_qca.c | 11 +++++++----
>>  1 file changed, 7 insertions(+), 4 deletions(-)
>> 
>> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
>> index e3164c200eac..367eef893a11 100644
>> --- a/drivers/bluetooth/hci_qca.c
>> +++ b/drivers/bluetooth/hci_qca.c
>> @@ -1291,10 +1291,8 @@ static int qca_setup(struct hci_uart *hu)
>>  	/* Setup patch / NVM configurations */
>>  	ret = qca_uart_setup(hdev, qca_baudrate, soc_type, soc_ver,
>>  			firmware_name);
>> -	if (!ret) {
>> -		set_bit(QCA_IBS_ENABLED, &qca->flags);
>> -		qca_debugfs_init(hdev);
>> -	} else if (ret == -ENOENT) {
>> +
>> +	if (ret == -ENOENT) {
>>  		/* No patch/nvm-config found, run with original fw/config */
>>  		ret = 0;
>>  	} else if (ret == -EAGAIN) {
>> @@ -1305,6 +1303,11 @@ static int qca_setup(struct hci_uart *hu)
>>  		ret = 0;
>>  	}
>> 
>> +	if (!ret) {
>> +		set_bit(QCA_IBS_ENABLED, &qca->flags);
>> +		qca_debugfs_init(hdev);
>> +	}
>> +
>>  	/* Setup bdaddr */
>>  	if (qca_is_wcn399x(soc_type))
>>  		hu->hdev->set_bdaddr = qca_set_bdaddr;

-- 
Regards
Balakrishna.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Bluetooth: hci_qca: fix in-band sleep enablement
  2019-10-11  7:21   ` Balakrishna Godavarthi
@ 2019-10-18  2:59     ` Claire Chang
  0 siblings, 0 replies; 4+ messages in thread
From: Claire Chang @ 2019-10-18  2:59 UTC (permalink / raw)
  To: Balakrishna Godavarthi
  Cc: Harish Bandi, marcel, johan.hedberg, linux-bluetooth, lkml,
	Rocky Liao, rongchi, linux-bluetooth-owner

Hi Balakrishna,

Sorry for the late reply. I was on vacation for the past few days.
The chipset we use is QCA6174A-3 and rjliao has already confirmed that
IBS won't work without RAM fw downloaded.
Please ignore this change.

Thanks,
Claire


On Fri, Oct 11, 2019 at 3:21 PM Balakrishna Godavarthi
<bgodavar@codeaurora.org> wrote:
>
> Hi Claire,
>
> This change will not work  as we need fw files to be loaded tofor IBS to
> active.
> may i know on which chipset you have this issue of IBS active even with
> out fw download.
>
> On 2019-10-11 12:31, Harish Bandi wrote:
> > ++ Balakrishna
> >
> > On 2019-10-09 14:21, Claire Chang wrote:
> >> Enabling in-band sleep when there is no patch/nvm-config found and
> >> bluetooth is running with the original fw/config.
> >>
> >> Fixes: ba8f35979002 ("Bluetooth: hci_qca: Avoid setup failure on
> >> missing rampatch")
> >> Fixes: 7dc5fe0814c3 ("Bluetooth: hci_qca: Avoid missing rampatch
> >> failure with userspace fw loader")
> >> Signed-off-by: Claire Chang <tientzu@chromium.org>
> >> ---
> >>  drivers/bluetooth/hci_qca.c | 11 +++++++----
> >>  1 file changed, 7 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> >> index e3164c200eac..367eef893a11 100644
> >> --- a/drivers/bluetooth/hci_qca.c
> >> +++ b/drivers/bluetooth/hci_qca.c
> >> @@ -1291,10 +1291,8 @@ static int qca_setup(struct hci_uart *hu)
> >>      /* Setup patch / NVM configurations */
> >>      ret = qca_uart_setup(hdev, qca_baudrate, soc_type, soc_ver,
> >>                      firmware_name);
> >> -    if (!ret) {
> >> -            set_bit(QCA_IBS_ENABLED, &qca->flags);
> >> -            qca_debugfs_init(hdev);
> >> -    } else if (ret == -ENOENT) {
> >> +
> >> +    if (ret == -ENOENT) {
> >>              /* No patch/nvm-config found, run with original fw/config */
> >>              ret = 0;
> >>      } else if (ret == -EAGAIN) {
> >> @@ -1305,6 +1303,11 @@ static int qca_setup(struct hci_uart *hu)
> >>              ret = 0;
> >>      }
> >>
> >> +    if (!ret) {
> >> +            set_bit(QCA_IBS_ENABLED, &qca->flags);
> >> +            qca_debugfs_init(hdev);
> >> +    }
> >> +
> >>      /* Setup bdaddr */
> >>      if (qca_is_wcn399x(soc_type))
> >>              hu->hdev->set_bdaddr = qca_set_bdaddr;
>
> --
> Regards
> Balakrishna.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-18  5:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-09  8:51 [PATCH] Bluetooth: hci_qca: fix in-band sleep enablement Claire Chang
2019-10-11  7:01 ` Harish Bandi
2019-10-11  7:21   ` Balakrishna Godavarthi
2019-10-18  2:59     ` Claire Chang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).