From: Jes Sorensen <Jes.Sorensen@redhat.com>
To: Colin King <colin.king@canonical.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Bhaktipriya Shridhar <bhaktipriya96@gmail.com>,
Bhumika Goyal <bhumirks@gmail.com>,
Amitoj Kaur Chawla <amitoj1606@gmail.com>,
Shivani Bhardwaj <shivanib134@gmail.com>,
Daniil Leshchev <meleodr@gmail.com>,
Ksenija Stanojevic <ksenija.stanojevic@gmail.com>,
linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723au: hal: check BT_Active and BT_State with correct bit pattern
Date: Wed, 20 Jul 2016 07:36:05 -0400 [thread overview]
Message-ID: <wrfj8twwsfru.fsf@redhat.com> (raw)
In-Reply-To: <1468491688-17225-1-git-send-email-colin.king@canonical.com> (Colin King's message of "Thu, 14 Jul 2016 11:21:28 +0100")
Colin King <colin.king@canonical.com> writes:
> From: Colin Ian King <colin.king@canonical.com>
>
> BT_Active and BT_State are being masked with 0x00ffffff so it the subsequent
> comparisons with 0xffffffff are therefore a buggy check. Instead, check them
> against 0x00ffffff.
>
> Unfortunately I couldn't find a datasheet or hardware to see if 0xffffffff
> is an expected invalid bit pattern that should be checked before BT_Active and
> BT_State are masked with 0x00ffffff, so for now, this fix seems like the least
> risky approach.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
I don't really know about the BT parts here, since I never did anything
with that part of the chip. Larry probably knows more.
The only question is whether fixing this bug changes behavior that has
unexpected side effects?
Cheers,
Jes
>
> diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
> index bfcbd7a..6989580 100644
> --- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
> +++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
> @@ -9824,7 +9824,7 @@ void BTDM_CheckBTIdleChange1Ant(struct rtw_adapter *padapter)
> BT_Polling = rtl8723au_read32(padapter, regBTPolling);
> RTPRINT(FBT, BT_TRACE, ("[DM][BT], BT_Polling(0x%x) =%x\n", regBTPolling, BT_Polling));
>
> - if (BT_Active == 0xffffffff && BT_State == 0xffffffff && BT_Polling == 0xffffffff)
> + if (BT_Active == 0x00ffffff && BT_State == 0x00ffffff && BT_Polling == 0xffffffff)
> return;
> if (BT_Polling == 0)
> return;
prev parent reply other threads:[~2016-07-20 11:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-14 10:21 Colin King
2016-07-20 11:36 ` Jes Sorensen [this message]
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=wrfj8twwsfru.fsf@redhat.com \
--to=jes.sorensen@redhat.com \
--cc=Larry.Finger@lwfinger.net \
--cc=amitoj1606@gmail.com \
--cc=bhaktipriya96@gmail.com \
--cc=bhumirks@gmail.com \
--cc=colin.king@canonical.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=ksenija.stanojevic@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=meleodr@gmail.com \
--cc=shivanib134@gmail.com \
/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
Powered by JetHome