* [PATCH v1 1/3] Bluetooth: btintel_pcie: Print Firmware Sequencer information
@ 2024-05-16 12:39 Kiran K
2024-05-16 12:39 ` [PATCH v1 2/3] Bluetooth: btintel_pcie: Fix irq leak Kiran K
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Kiran K @ 2024-05-16 12:39 UTC (permalink / raw)
To: linux-bluetooth
Cc: ravishankar.srivatsa, chethan.tumkur.narayan, vijay.satija, Kiran
From: Kiran <kiran.k@intel.com>
Firmware sequencer (FSEQ) is a common code shared across Bluetooth
and Wifi. Printing FSEQ will help to debug if there is any mismatch
between Bluetooth and Wifi FSEQ.
Signed-off-by: Kiran <kiran.k@intel.com>
---
drivers/bluetooth/btintel.c | 3 ++-
drivers/bluetooth/btintel.h | 5 +++++
drivers/bluetooth/btintel_pcie.c | 2 ++
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index 0c855c3ee1c1..2c434ff9c47c 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -2713,7 +2713,7 @@ void btintel_set_msft_opcode(struct hci_dev *hdev, u8 hw_variant)
}
EXPORT_SYMBOL_GPL(btintel_set_msft_opcode);
-static void btintel_print_fseq_info(struct hci_dev *hdev)
+void btintel_print_fseq_info(struct hci_dev *hdev)
{
struct sk_buff *skb;
u8 *p;
@@ -2825,6 +2825,7 @@ static void btintel_print_fseq_info(struct hci_dev *hdev)
kfree_skb(skb);
}
+EXPORT_SYMBOL_GPL(btintel_print_fseq_info);
static int btintel_setup_combined(struct hci_dev *hdev)
{
diff --git a/drivers/bluetooth/btintel.h b/drivers/bluetooth/btintel.h
index b5fea735e260..796953547932 100644
--- a/drivers/bluetooth/btintel.h
+++ b/drivers/bluetooth/btintel.h
@@ -244,6 +244,7 @@ int btintel_bootloader_setup_tlv(struct hci_dev *hdev,
struct intel_version_tlv *ver);
int btintel_shutdown_combined(struct hci_dev *hdev);
void btintel_hw_error(struct hci_dev *hdev, u8 code);
+void btintel_print_fseq_info(struct hci_dev *hdev);
#else
static inline int btintel_check_bdaddr(struct hci_dev *hdev)
@@ -373,4 +374,8 @@ static inline int btintel_shutdown_combined(struct hci_dev *hdev)
static inline void btintel_hw_error(struct hci_dev *hdev, u8 code)
{
}
+
+static void btintel_print_fseq_info(struct hci_dev *hdev)
+{
+}
#endif
diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index 5b6805d87fcf..8d282ee2322c 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -1197,9 +1197,11 @@ static int btintel_pcie_setup(struct hci_dev *hdev)
bt_dev_err(hdev, "Unsupported Intel hw variant (%u)",
INTEL_HW_VARIANT(ver_tlv.cnvi_bt));
err = -EINVAL;
+ goto exit_error;
break;
}
+ btintel_print_fseq_info(hdev);
exit_error:
kfree_skb(skb);
--
2.40.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v1 2/3] Bluetooth: btintel_pcie: Fix irq leak
2024-05-16 12:39 [PATCH v1 1/3] Bluetooth: btintel_pcie: Print Firmware Sequencer information Kiran K
@ 2024-05-16 12:39 ` Kiran K
2024-05-16 12:39 ` [PATCH v1 3/3] Bluetooth: btintel_pcie: Fix REVERSE_INULL issue reported by coverity Kiran K
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Kiran K @ 2024-05-16 12:39 UTC (permalink / raw)
To: linux-bluetooth
Cc: ravishankar.srivatsa, chethan.tumkur.narayan, vijay.satija, Kiran
From: Kiran <kiran.k@intel.com>
Free irq before releasing irq vector.
Signed-off-by: Kiran <kiran.k@intel.com>
---
drivers/bluetooth/btintel_pcie.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index 8d282ee2322c..d8f82e0f6435 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -1329,6 +1329,12 @@ static void btintel_pcie_remove(struct pci_dev *pdev)
data = pci_get_drvdata(pdev);
btintel_pcie_reset_bt(data);
+ for (int i = 0; i < data->alloc_vecs; i++) {
+ struct msix_entry *msix_entry;
+
+ msix_entry = &data->msix_entries[i];
+ free_irq(msix_entry->vector, msix_entry);
+ }
pci_free_irq_vectors(pdev);
--
2.40.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v1 3/3] Bluetooth: btintel_pcie: Fix REVERSE_INULL issue reported by coverity
2024-05-16 12:39 [PATCH v1 1/3] Bluetooth: btintel_pcie: Print Firmware Sequencer information Kiran K
2024-05-16 12:39 ` [PATCH v1 2/3] Bluetooth: btintel_pcie: Fix irq leak Kiran K
@ 2024-05-16 12:39 ` Kiran K
2024-05-16 13:03 ` K, Kiran
2024-05-16 13:01 ` [PATCH v1 1/3] Bluetooth: btintel_pcie: Print Firmware Sequencer information Paul Menzel
2024-05-16 13:11 ` [v1,1/3] " bluez.test.bot
3 siblings, 1 reply; 7+ messages in thread
From: Kiran K @ 2024-05-16 12:39 UTC (permalink / raw)
To: linux-bluetooth
Cc: ravishankar.srivatsa, chethan.tumkur.narayan, vijay.satija,
Kiran K
From: Vijay Satija <vijay.satija@intel.com>
check pdata return of skb_pull_data, instead of data.
Signed-off-by: Vijay Satija <vijay.satija@intel.com>
Signed-off-by: Kiran K <kiran.k@intel.com>
---
drivers/bluetooth/btintel_pcie.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index d8f82e0f6435..58144c82b1cb 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -382,7 +382,7 @@ static int btintel_pcie_recv_frame(struct btintel_pcie_data *data,
/* The first 4 bytes indicates the Intel PCIe specific packet type */
pdata = skb_pull_data(skb, BTINTEL_PCIE_HCI_TYPE_LEN);
- if (!data) {
+ if (!pdata) {
bt_dev_err(hdev, "Corrupted packet received");
ret = -EILSEQ;
goto exit_error;
--
2.40.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v1 1/3] Bluetooth: btintel_pcie: Print Firmware Sequencer information
2024-05-16 12:39 [PATCH v1 1/3] Bluetooth: btintel_pcie: Print Firmware Sequencer information Kiran K
2024-05-16 12:39 ` [PATCH v1 2/3] Bluetooth: btintel_pcie: Fix irq leak Kiran K
2024-05-16 12:39 ` [PATCH v1 3/3] Bluetooth: btintel_pcie: Fix REVERSE_INULL issue reported by coverity Kiran K
@ 2024-05-16 13:01 ` Paul Menzel
2024-05-16 13:35 ` K, Kiran
2024-05-16 13:11 ` [v1,1/3] " bluez.test.bot
3 siblings, 1 reply; 7+ messages in thread
From: Paul Menzel @ 2024-05-16 13:01 UTC (permalink / raw)
To: Kiran K
Cc: ravishankar.srivatsa, chethan.tumkur.narayan, vijay.satija,
linux-bluetooth
Dear Kiran,
Am 16.05.24 um 14:39 schrieb Kiran K:
> From: Kiran <kiran.k@intel.com>
Should this be Kiran K?
> Firmware sequencer (FSEQ) is a common code shared across Bluetooth
> and Wifi. Printing FSEQ will help to debug if there is any mismatch
So, make `btintel_print_fseq_info()` public, and call it in btintel_pci.
> between Bluetooth and Wifi FSEQ.
Please paste one example message.
> Signed-off-by: Kiran <kiran.k@intel.com>
> ---
> drivers/bluetooth/btintel.c | 3 ++-
> drivers/bluetooth/btintel.h | 5 +++++
> drivers/bluetooth/btintel_pcie.c | 2 ++
> 3 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
> index 0c855c3ee1c1..2c434ff9c47c 100644
> --- a/drivers/bluetooth/btintel.c
> +++ b/drivers/bluetooth/btintel.c
> @@ -2713,7 +2713,7 @@ void btintel_set_msft_opcode(struct hci_dev *hdev, u8 hw_variant)
> }
> EXPORT_SYMBOL_GPL(btintel_set_msft_opcode);
>
> -static void btintel_print_fseq_info(struct hci_dev *hdev)
> +void btintel_print_fseq_info(struct hci_dev *hdev)
> {
> struct sk_buff *skb;
> u8 *p;
> @@ -2825,6 +2825,7 @@ static void btintel_print_fseq_info(struct hci_dev *hdev)
>
> kfree_skb(skb);
> }
> +EXPORT_SYMBOL_GPL(btintel_print_fseq_info);
>
> static int btintel_setup_combined(struct hci_dev *hdev)
> {
> diff --git a/drivers/bluetooth/btintel.h b/drivers/bluetooth/btintel.h
> index b5fea735e260..796953547932 100644
> --- a/drivers/bluetooth/btintel.h
> +++ b/drivers/bluetooth/btintel.h
> @@ -244,6 +244,7 @@ int btintel_bootloader_setup_tlv(struct hci_dev *hdev,
> struct intel_version_tlv *ver);
> int btintel_shutdown_combined(struct hci_dev *hdev);
> void btintel_hw_error(struct hci_dev *hdev, u8 code);
> +void btintel_print_fseq_info(struct hci_dev *hdev);
> #else
>
> static inline int btintel_check_bdaddr(struct hci_dev *hdev)
> @@ -373,4 +374,8 @@ static inline int btintel_shutdown_combined(struct hci_dev *hdev)
> static inline void btintel_hw_error(struct hci_dev *hdev, u8 code)
> {
> }
> +
> +static void btintel_print_fseq_info(struct hci_dev *hdev)
> +{
> +}
> #endif
> diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
> index 5b6805d87fcf..8d282ee2322c 100644
> --- a/drivers/bluetooth/btintel_pcie.c
> +++ b/drivers/bluetooth/btintel_pcie.c
> @@ -1197,9 +1197,11 @@ static int btintel_pcie_setup(struct hci_dev *hdev)
> bt_dev_err(hdev, "Unsupported Intel hw variant (%u)",
> INTEL_HW_VARIANT(ver_tlv.cnvi_bt));
> err = -EINVAL;
> + goto exit_error;
> break;
> }
>
> + btintel_print_fseq_info(hdev);
> exit_error:
> kfree_skb(skb);
>
Kind regards,
Paul
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH v1 3/3] Bluetooth: btintel_pcie: Fix REVERSE_INULL issue reported by coverity
2024-05-16 12:39 ` [PATCH v1 3/3] Bluetooth: btintel_pcie: Fix REVERSE_INULL issue reported by coverity Kiran K
@ 2024-05-16 13:03 ` K, Kiran
0 siblings, 0 replies; 7+ messages in thread
From: K, Kiran @ 2024-05-16 13:03 UTC (permalink / raw)
To: linux-bluetooth@vger.kernel.org
Cc: Srivatsa, Ravishankar, Tumkur Narayan, Chethan, Satija, Vijay
Please ignore v1 series. I have published v2 version with Fixes tag included.
Thanks,
Kiran
>-----Original Message-----
>From: K, Kiran <kiran.k@intel.com>
>Sent: Thursday, May 16, 2024 6:10 PM
>To: linux-bluetooth@vger.kernel.org
>Cc: Srivatsa, Ravishankar <ravishankar.srivatsa@intel.com>; Tumkur Narayan,
>Chethan <chethan.tumkur.narayan@intel.com>; Satija, Vijay
><vijay.satija@intel.com>; K, Kiran <kiran.k@intel.com>
>Subject: [PATCH v1 3/3] Bluetooth: btintel_pcie: Fix REVERSE_INULL issue
>reported by coverity
>
>From: Vijay Satija <vijay.satija@intel.com>
>
>check pdata return of skb_pull_data, instead of data.
>
>Signed-off-by: Vijay Satija <vijay.satija@intel.com>
>Signed-off-by: Kiran K <kiran.k@intel.com>
>---
> drivers/bluetooth/btintel_pcie.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
>index d8f82e0f6435..58144c82b1cb 100644
>--- a/drivers/bluetooth/btintel_pcie.c
>+++ b/drivers/bluetooth/btintel_pcie.c
>@@ -382,7 +382,7 @@ static int btintel_pcie_recv_frame(struct
>btintel_pcie_data *data,
>
> /* The first 4 bytes indicates the Intel PCIe specific packet type */
> pdata = skb_pull_data(skb, BTINTEL_PCIE_HCI_TYPE_LEN);
>- if (!data) {
>+ if (!pdata) {
> bt_dev_err(hdev, "Corrupted packet received");
> ret = -EILSEQ;
> goto exit_error;
>--
>2.40.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [v1,1/3] Bluetooth: btintel_pcie: Print Firmware Sequencer information
2024-05-16 12:39 [PATCH v1 1/3] Bluetooth: btintel_pcie: Print Firmware Sequencer information Kiran K
` (2 preceding siblings ...)
2024-05-16 13:01 ` [PATCH v1 1/3] Bluetooth: btintel_pcie: Print Firmware Sequencer information Paul Menzel
@ 2024-05-16 13:11 ` bluez.test.bot
3 siblings, 0 replies; 7+ messages in thread
From: bluez.test.bot @ 2024-05-16 13:11 UTC (permalink / raw)
To: linux-bluetooth, kiran.k
[-- Attachment #1: Type: text/plain, Size: 2578 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=853690
---Test result---
Test Summary:
CheckPatch PASS 2.72 seconds
GitLint PASS 0.95 seconds
SubjectPrefix PASS 0.37 seconds
BuildKernel PASS 29.32 seconds
CheckAllWarning PASS 32.26 seconds
CheckSparse PASS 37.37 seconds
CheckSmatch FAIL 34.42 seconds
BuildKernel32 PASS 29.46 seconds
TestRunnerSetup PASS 515.69 seconds
TestRunner_l2cap-tester PASS 18.17 seconds
TestRunner_iso-tester FAIL 30.40 seconds
TestRunner_bnep-tester PASS 4.75 seconds
TestRunner_mgmt-tester PASS 112.08 seconds
TestRunner_rfcomm-tester PASS 7.26 seconds
TestRunner_sco-tester PASS 14.94 seconds
TestRunner_ioctl-tester PASS 7.70 seconds
TestRunner_mesh-tester PASS 5.78 seconds
TestRunner_smp-tester PASS 6.73 seconds
TestRunner_userchan-tester PASS 4.89 seconds
IncrementalBuild PASS 35.66 seconds
Details
##############################
Test: CheckSmatch - FAIL
Desc: Run smatch tool with source
Output:
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: net/bluetooth/hci_core.o] Error 139
make[4]: *** Deleting file 'net/bluetooth/hci_core.o'
make[3]: *** [scripts/Makefile.build:485: net/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: net] Error 2
make[2]: *** Waiting for unfinished jobs....
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: drivers/bluetooth/bcm203x.o] Error 139
make[4]: *** Deleting file 'drivers/bluetooth/bcm203x.o'
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:485: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: drivers] Error 2
make[1]: *** [/github/workspace/src/src/Makefile:1919: .] Error 2
make: *** [Makefile:240: __sub-make] Error 2
##############################
Test: TestRunner_iso-tester - FAIL
Desc: Run iso-tester with test-runner
Output:
Total: 122, Passed: 117 (95.9%), Failed: 1, Not Run: 4
Failed Test Cases
ISO Connect2 Suspend - Success Failed 4.228 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH v1 1/3] Bluetooth: btintel_pcie: Print Firmware Sequencer information
2024-05-16 13:01 ` [PATCH v1 1/3] Bluetooth: btintel_pcie: Print Firmware Sequencer information Paul Menzel
@ 2024-05-16 13:35 ` K, Kiran
0 siblings, 0 replies; 7+ messages in thread
From: K, Kiran @ 2024-05-16 13:35 UTC (permalink / raw)
To: Paul Menzel
Cc: Srivatsa, Ravishankar, Tumkur Narayan, Chethan, Satija, Vijay,
linux-bluetooth@vger.kernel.org
Hi Paul,
Thanks for your comments.
>-----Original Message-----
>From: Paul Menzel <pmenzel@molgen.mpg.de>
>Sent: Thursday, May 16, 2024 6:31 PM
>To: K, Kiran <kiran.k@intel.com>
>Cc: Srivatsa, Ravishankar <ravishankar.srivatsa@intel.com>; Tumkur Narayan,
>Chethan <chethan.tumkur.narayan@intel.com>; Satija, Vijay
><vijay.satija@intel.com>; linux-bluetooth@vger.kernel.org
>Subject: Re: [PATCH v1 1/3] Bluetooth: btintel_pcie: Print Firmware Sequencer
>information
>
>Dear Kiran,
>
>
>Am 16.05.24 um 14:39 schrieb Kiran K:
>> From: Kiran <kiran.k@intel.com>
>
>Should this be Kiran K?
>
Yes. I will fix it. Looks like the machine where this fix is done is not configured properly. ☹
>> Firmware sequencer (FSEQ) is a common code shared across Bluetooth and
>> Wifi. Printing FSEQ will help to debug if there is any mismatch
>
>So, make `btintel_print_fseq_info()` public, and call it in btintel_pci.
>
>> between Bluetooth and Wifi FSEQ.
>
>Please paste one example message.
I will include commit message in v3 version.
>
>> Signed-off-by: Kiran <kiran.k@intel.com>
>> ---
>> drivers/bluetooth/btintel.c | 3 ++-
>> drivers/bluetooth/btintel.h | 5 +++++
>> drivers/bluetooth/btintel_pcie.c | 2 ++
>> 3 files changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
>> index 0c855c3ee1c1..2c434ff9c47c 100644
>> --- a/drivers/bluetooth/btintel.c
>> +++ b/drivers/bluetooth/btintel.c
>> @@ -2713,7 +2713,7 @@ void btintel_set_msft_opcode(struct hci_dev
>*hdev, u8 hw_variant)
>> }
>> EXPORT_SYMBOL_GPL(btintel_set_msft_opcode);
>>
>> -static void btintel_print_fseq_info(struct hci_dev *hdev)
>> +void btintel_print_fseq_info(struct hci_dev *hdev)
>> {
>> struct sk_buff *skb;
>> u8 *p;
>> @@ -2825,6 +2825,7 @@ static void btintel_print_fseq_info(struct
>> hci_dev *hdev)
>>
>> kfree_skb(skb);
>> }
>> +EXPORT_SYMBOL_GPL(btintel_print_fseq_info);
>>
>> static int btintel_setup_combined(struct hci_dev *hdev)
>> {
>> diff --git a/drivers/bluetooth/btintel.h b/drivers/bluetooth/btintel.h
>> index b5fea735e260..796953547932 100644
>> --- a/drivers/bluetooth/btintel.h
>> +++ b/drivers/bluetooth/btintel.h
>> @@ -244,6 +244,7 @@ int btintel_bootloader_setup_tlv(struct hci_dev
>*hdev,
>> struct intel_version_tlv *ver);
>> int btintel_shutdown_combined(struct hci_dev *hdev);
>> void btintel_hw_error(struct hci_dev *hdev, u8 code);
>> +void btintel_print_fseq_info(struct hci_dev *hdev);
>> #else
>>
>> static inline int btintel_check_bdaddr(struct hci_dev *hdev) @@
>> -373,4 +374,8 @@ static inline int btintel_shutdown_combined(struct
>hci_dev *hdev)
>> static inline void btintel_hw_error(struct hci_dev *hdev, u8 code)
>> {
>> }
>> +
>> +static void btintel_print_fseq_info(struct hci_dev *hdev) { }
>> #endif
>> diff --git a/drivers/bluetooth/btintel_pcie.c
>> b/drivers/bluetooth/btintel_pcie.c
>> index 5b6805d87fcf..8d282ee2322c 100644
>> --- a/drivers/bluetooth/btintel_pcie.c
>> +++ b/drivers/bluetooth/btintel_pcie.c
>> @@ -1197,9 +1197,11 @@ static int btintel_pcie_setup(struct hci_dev *hdev)
>> bt_dev_err(hdev, "Unsupported Intel hw variant (%u)",
>> INTEL_HW_VARIANT(ver_tlv.cnvi_bt));
>> err = -EINVAL;
>> + goto exit_error;
>> break;
>> }
>>
>> + btintel_print_fseq_info(hdev);
>> exit_error:
>> kfree_skb(skb);
>>
>
>
>Kind regards,
>
>Paul
Thanks,
Kiran
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-05-16 13:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-16 12:39 [PATCH v1 1/3] Bluetooth: btintel_pcie: Print Firmware Sequencer information Kiran K
2024-05-16 12:39 ` [PATCH v1 2/3] Bluetooth: btintel_pcie: Fix irq leak Kiran K
2024-05-16 12:39 ` [PATCH v1 3/3] Bluetooth: btintel_pcie: Fix REVERSE_INULL issue reported by coverity Kiran K
2024-05-16 13:03 ` K, Kiran
2024-05-16 13:01 ` [PATCH v1 1/3] Bluetooth: btintel_pcie: Print Firmware Sequencer information Paul Menzel
2024-05-16 13:35 ` K, Kiran
2024-05-16 13:11 ` [v1,1/3] " bluez.test.bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox