* [PATCH] Bluetooth: btqca: sequential validation
@ 2021-12-08 8:26 Sai Teja Aluvala
2021-12-08 13:27 ` kernel test robot
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Sai Teja Aluvala @ 2021-12-08 8:26 UTC (permalink / raw)
To: marcel, johan.hedberg
Cc: mka, linux-kernel, linux-bluetooth, quic_hemantg, linux-arm-msm,
quic_bgodavar, rjliao, hbandi, abhishekpandit, mcchou,
quic_pharish, Sai Teja Aluvala
This change will have sequential validation support
& patch config command is added
Signed-off-by: Sai Teja Aluvala <quic_saluvala@quicinc.com>
---
drivers/bluetooth/btqca.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
drivers/bluetooth/btqca.h | 3 +++
2 files changed, 48 insertions(+)
diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c
index be04d74..9a2fd17 100644
--- a/drivers/bluetooth/btqca.c
+++ b/drivers/bluetooth/btqca.c
@@ -141,6 +141,49 @@ static int qca_read_fw_build_info(struct hci_dev *hdev)
return err;
}
+int qca_send_patch_config_cmd(struct hci_dev *hdev, enum qca_btsoc_type soc_type)
+{
+ struct sk_buff *skb;
+ int err = 0;
+ u8 cmd[5] = {EDL_PATCH_CONFIG_CMD, 0x01, 0, 0, 0};
+ u8 rlen = 0x02;
+ struct edl_event_hdr *edl;
+ u8 rtype = EDL_PATCH_CONFIG_CMD;
+
+ bt_dev_dbg(hdev, "QCA Patch config");
+
+ skb = __hci_cmd_sync_ev(hdev, EDL_PATCH_CMD_OPCODE, EDL_PATCH_CONFIG_CMD_LEN,
+ cmd, HCI_EV_VENDOR, HCI_INIT_TIMEOUT);
+ if (IS_ERR(skb)) {
+ err = PTR_ERR(skb);
+ bt_dev_err(hdev, "Sending QCA Patch config failed (%d)", err);
+ return err;
+ }
+ if (skb->len != rlen) {
+ bt_dev_err(hdev, "QCA Patch config cmd size mismatch len %d", skb->len);
+ err = -EILSEQ;
+ goto out;
+ }
+ edl = (struct edl_event_hdr *)(skb->data);
+ if (!edl) {
+ bt_dev_err(hdev, "QCA Patch config with no header");
+ err = -EILSEQ;
+ goto out;
+ }
+ if (edl->cresp != EDL_PATCH_CONFIG_RES_EVT || edl->rtype != rtype) {
+ bt_dev_err(hdev, "QCA Wrong packet received %d %d", edl->cresp,
+ edl->rtype);
+ err = -EIO;
+ goto out;
+ }
+out:
+ kfree(skb);
+ if (err)
+ bt_dev_err(hdev, "QCA Patch config cmd failed (%d)", err);
+
+ return err;
+}
+
static int qca_send_reset(struct hci_dev *hdev)
{
struct sk_buff *skb;
@@ -551,6 +594,8 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
*/
rom_ver = ((soc_ver & 0x00000f00) >> 0x04) | (soc_ver & 0x0000000f);
+ if (soc_type == QCA_WCN6750)
+ qca_send_patch_config_cmd(hdev, soc_type);
/* Download rampatch file */
config.type = TLV_TYPE_PATCH;
if (qca_is_wcn399x(soc_type)) {
diff --git a/drivers/bluetooth/btqca.h b/drivers/bluetooth/btqca.h
index 30afa77..8fbb4c7 100644
--- a/drivers/bluetooth/btqca.h
+++ b/drivers/bluetooth/btqca.h
@@ -13,6 +13,8 @@
#define EDL_PATCH_TLV_REQ_CMD (0x1E)
#define EDL_GET_BUILD_INFO_CMD (0x20)
#define EDL_NVM_ACCESS_SET_REQ_CMD (0x01)
+#define EDL_PATCH_CONFIG_CMD_LEN (0x05)
+#define EDL_PATCH_CONFIG_CMD (0x28)
#define MAX_SIZE_PER_TLV_SEGMENT (243)
#define QCA_PRE_SHUTDOWN_CMD (0xFC08)
#define QCA_DISABLE_LOGGING (0xFC17)
@@ -24,6 +26,7 @@
#define EDL_CMD_EXE_STATUS_EVT (0x00)
#define EDL_SET_BAUDRATE_RSP_EVT (0x92)
#define EDL_NVM_ACCESS_CODE_EVT (0x0B)
+#define EDL_PATCH_CONFIG_RES_EVT (0x00)
#define QCA_DISABLE_LOGGING_SUB_OP (0x14)
#define EDL_TAG_ID_HCI (17)
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc.
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] Bluetooth: btqca: sequential validation
2021-12-08 8:26 Sai Teja Aluvala
@ 2021-12-08 13:27 ` kernel test robot
2021-12-08 13:50 ` kernel test robot
2021-12-08 14:48 ` Marcel Holtmann
2 siblings, 0 replies; 10+ messages in thread
From: kernel test robot @ 2021-12-08 13:27 UTC (permalink / raw)
To: Sai Teja Aluvala, marcel, johan.hedberg
Cc: kbuild-all, mka, linux-kernel, linux-bluetooth, quic_hemantg,
linux-arm-msm, quic_bgodavar, rjliao, hbandi
Hi Sai,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on linux/master linus/master v5.16-rc4 next-20211208]
[cannot apply to bluetooth/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Sai-Teja-Aluvala/Bluetooth-btqca-sequential-validation/20211208-162834
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: nds32-allyesconfig (https://download.01.org/0day-ci/archive/20211208/202112082154.jFxxuDI4-lkp@intel.com/config)
compiler: nds32le-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/1d58d86c5374c4c82aa1ec8638036667c114f83e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sai-Teja-Aluvala/Bluetooth-btqca-sequential-validation/20211208-162834
git checkout 1d58d86c5374c4c82aa1ec8638036667c114f83e
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nds32 SHELL=/bin/bash drivers/bluetooth/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/bluetooth/btqca.c:144:5: warning: no previous prototype for 'qca_send_patch_config_cmd' [-Wmissing-prototypes]
144 | int qca_send_patch_config_cmd(struct hci_dev *hdev, enum qca_btsoc_type soc_type)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
vim +/qca_send_patch_config_cmd +144 drivers/bluetooth/btqca.c
143
> 144 int qca_send_patch_config_cmd(struct hci_dev *hdev, enum qca_btsoc_type soc_type)
145 {
146 struct sk_buff *skb;
147 int err = 0;
148 u8 cmd[5] = {EDL_PATCH_CONFIG_CMD, 0x01, 0, 0, 0};
149 u8 rlen = 0x02;
150 struct edl_event_hdr *edl;
151 u8 rtype = EDL_PATCH_CONFIG_CMD;
152
153 bt_dev_dbg(hdev, "QCA Patch config");
154
155 skb = __hci_cmd_sync_ev(hdev, EDL_PATCH_CMD_OPCODE, EDL_PATCH_CONFIG_CMD_LEN,
156 cmd, HCI_EV_VENDOR, HCI_INIT_TIMEOUT);
157 if (IS_ERR(skb)) {
158 err = PTR_ERR(skb);
159 bt_dev_err(hdev, "Sending QCA Patch config failed (%d)", err);
160 return err;
161 }
162 if (skb->len != rlen) {
163 bt_dev_err(hdev, "QCA Patch config cmd size mismatch len %d", skb->len);
164 err = -EILSEQ;
165 goto out;
166 }
167 edl = (struct edl_event_hdr *)(skb->data);
168 if (!edl) {
169 bt_dev_err(hdev, "QCA Patch config with no header");
170 err = -EILSEQ;
171 goto out;
172 }
173 if (edl->cresp != EDL_PATCH_CONFIG_RES_EVT || edl->rtype != rtype) {
174 bt_dev_err(hdev, "QCA Wrong packet received %d %d", edl->cresp,
175 edl->rtype);
176 err = -EIO;
177 goto out;
178 }
179 out:
180 kfree(skb);
181 if (err)
182 bt_dev_err(hdev, "QCA Patch config cmd failed (%d)", err);
183
184 return err;
185 }
186
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Bluetooth: btqca: sequential validation
@ 2021-12-08 13:27 ` kernel test robot
0 siblings, 0 replies; 10+ messages in thread
From: kernel test robot @ 2021-12-08 13:27 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3588 bytes --]
Hi Sai,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on linux/master linus/master v5.16-rc4 next-20211208]
[cannot apply to bluetooth/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Sai-Teja-Aluvala/Bluetooth-btqca-sequential-validation/20211208-162834
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: nds32-allyesconfig (https://download.01.org/0day-ci/archive/20211208/202112082154.jFxxuDI4-lkp(a)intel.com/config)
compiler: nds32le-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/1d58d86c5374c4c82aa1ec8638036667c114f83e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sai-Teja-Aluvala/Bluetooth-btqca-sequential-validation/20211208-162834
git checkout 1d58d86c5374c4c82aa1ec8638036667c114f83e
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nds32 SHELL=/bin/bash drivers/bluetooth/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/bluetooth/btqca.c:144:5: warning: no previous prototype for 'qca_send_patch_config_cmd' [-Wmissing-prototypes]
144 | int qca_send_patch_config_cmd(struct hci_dev *hdev, enum qca_btsoc_type soc_type)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
vim +/qca_send_patch_config_cmd +144 drivers/bluetooth/btqca.c
143
> 144 int qca_send_patch_config_cmd(struct hci_dev *hdev, enum qca_btsoc_type soc_type)
145 {
146 struct sk_buff *skb;
147 int err = 0;
148 u8 cmd[5] = {EDL_PATCH_CONFIG_CMD, 0x01, 0, 0, 0};
149 u8 rlen = 0x02;
150 struct edl_event_hdr *edl;
151 u8 rtype = EDL_PATCH_CONFIG_CMD;
152
153 bt_dev_dbg(hdev, "QCA Patch config");
154
155 skb = __hci_cmd_sync_ev(hdev, EDL_PATCH_CMD_OPCODE, EDL_PATCH_CONFIG_CMD_LEN,
156 cmd, HCI_EV_VENDOR, HCI_INIT_TIMEOUT);
157 if (IS_ERR(skb)) {
158 err = PTR_ERR(skb);
159 bt_dev_err(hdev, "Sending QCA Patch config failed (%d)", err);
160 return err;
161 }
162 if (skb->len != rlen) {
163 bt_dev_err(hdev, "QCA Patch config cmd size mismatch len %d", skb->len);
164 err = -EILSEQ;
165 goto out;
166 }
167 edl = (struct edl_event_hdr *)(skb->data);
168 if (!edl) {
169 bt_dev_err(hdev, "QCA Patch config with no header");
170 err = -EILSEQ;
171 goto out;
172 }
173 if (edl->cresp != EDL_PATCH_CONFIG_RES_EVT || edl->rtype != rtype) {
174 bt_dev_err(hdev, "QCA Wrong packet received %d %d", edl->cresp,
175 edl->rtype);
176 err = -EIO;
177 goto out;
178 }
179 out:
180 kfree(skb);
181 if (err)
182 bt_dev_err(hdev, "QCA Patch config cmd failed (%d)", err);
183
184 return err;
185 }
186
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Bluetooth: btqca: sequential validation
2021-12-08 8:26 Sai Teja Aluvala
@ 2021-12-08 13:50 ` kernel test robot
2021-12-08 13:50 ` kernel test robot
2021-12-08 14:48 ` Marcel Holtmann
2 siblings, 0 replies; 10+ messages in thread
From: kernel test robot @ 2021-12-08 13:50 UTC (permalink / raw)
To: Sai Teja Aluvala, marcel, johan.hedberg
Cc: llvm, kbuild-all, mka, linux-kernel, linux-bluetooth,
quic_hemantg, linux-arm-msm, quic_bgodavar, rjliao, hbandi
Hi Sai,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on linux/master linus/master v5.16-rc4 next-20211208]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Sai-Teja-Aluvala/Bluetooth-btqca-sequential-validation/20211208-162834
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: x86_64-randconfig-a015-20211207 (https://download.01.org/0day-ci/archive/20211208/202112082116.coCA1rOT-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 097a1cb1d5ebb3a0ec4bcaed8ba3ff6a8e33c00a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/1d58d86c5374c4c82aa1ec8638036667c114f83e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sai-Teja-Aluvala/Bluetooth-btqca-sequential-validation/20211208-162834
git checkout 1d58d86c5374c4c82aa1ec8638036667c114f83e
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/bluetooth/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/bluetooth/btqca.c:144:5: warning: no previous prototype for function 'qca_send_patch_config_cmd' [-Wmissing-prototypes]
int qca_send_patch_config_cmd(struct hci_dev *hdev, enum qca_btsoc_type soc_type)
^
drivers/bluetooth/btqca.c:144:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int qca_send_patch_config_cmd(struct hci_dev *hdev, enum qca_btsoc_type soc_type)
^
static
1 warning generated.
vim +/qca_send_patch_config_cmd +144 drivers/bluetooth/btqca.c
143
> 144 int qca_send_patch_config_cmd(struct hci_dev *hdev, enum qca_btsoc_type soc_type)
145 {
146 struct sk_buff *skb;
147 int err = 0;
148 u8 cmd[5] = {EDL_PATCH_CONFIG_CMD, 0x01, 0, 0, 0};
149 u8 rlen = 0x02;
150 struct edl_event_hdr *edl;
151 u8 rtype = EDL_PATCH_CONFIG_CMD;
152
153 bt_dev_dbg(hdev, "QCA Patch config");
154
155 skb = __hci_cmd_sync_ev(hdev, EDL_PATCH_CMD_OPCODE, EDL_PATCH_CONFIG_CMD_LEN,
156 cmd, HCI_EV_VENDOR, HCI_INIT_TIMEOUT);
157 if (IS_ERR(skb)) {
158 err = PTR_ERR(skb);
159 bt_dev_err(hdev, "Sending QCA Patch config failed (%d)", err);
160 return err;
161 }
162 if (skb->len != rlen) {
163 bt_dev_err(hdev, "QCA Patch config cmd size mismatch len %d", skb->len);
164 err = -EILSEQ;
165 goto out;
166 }
167 edl = (struct edl_event_hdr *)(skb->data);
168 if (!edl) {
169 bt_dev_err(hdev, "QCA Patch config with no header");
170 err = -EILSEQ;
171 goto out;
172 }
173 if (edl->cresp != EDL_PATCH_CONFIG_RES_EVT || edl->rtype != rtype) {
174 bt_dev_err(hdev, "QCA Wrong packet received %d %d", edl->cresp,
175 edl->rtype);
176 err = -EIO;
177 goto out;
178 }
179 out:
180 kfree(skb);
181 if (err)
182 bt_dev_err(hdev, "QCA Patch config cmd failed (%d)", err);
183
184 return err;
185 }
186
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Bluetooth: btqca: sequential validation
@ 2021-12-08 13:50 ` kernel test robot
0 siblings, 0 replies; 10+ messages in thread
From: kernel test robot @ 2021-12-08 13:50 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3869 bytes --]
Hi Sai,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on linux/master linus/master v5.16-rc4 next-20211208]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Sai-Teja-Aluvala/Bluetooth-btqca-sequential-validation/20211208-162834
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: x86_64-randconfig-a015-20211207 (https://download.01.org/0day-ci/archive/20211208/202112082116.coCA1rOT-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 097a1cb1d5ebb3a0ec4bcaed8ba3ff6a8e33c00a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/1d58d86c5374c4c82aa1ec8638036667c114f83e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sai-Teja-Aluvala/Bluetooth-btqca-sequential-validation/20211208-162834
git checkout 1d58d86c5374c4c82aa1ec8638036667c114f83e
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/bluetooth/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/bluetooth/btqca.c:144:5: warning: no previous prototype for function 'qca_send_patch_config_cmd' [-Wmissing-prototypes]
int qca_send_patch_config_cmd(struct hci_dev *hdev, enum qca_btsoc_type soc_type)
^
drivers/bluetooth/btqca.c:144:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int qca_send_patch_config_cmd(struct hci_dev *hdev, enum qca_btsoc_type soc_type)
^
static
1 warning generated.
vim +/qca_send_patch_config_cmd +144 drivers/bluetooth/btqca.c
143
> 144 int qca_send_patch_config_cmd(struct hci_dev *hdev, enum qca_btsoc_type soc_type)
145 {
146 struct sk_buff *skb;
147 int err = 0;
148 u8 cmd[5] = {EDL_PATCH_CONFIG_CMD, 0x01, 0, 0, 0};
149 u8 rlen = 0x02;
150 struct edl_event_hdr *edl;
151 u8 rtype = EDL_PATCH_CONFIG_CMD;
152
153 bt_dev_dbg(hdev, "QCA Patch config");
154
155 skb = __hci_cmd_sync_ev(hdev, EDL_PATCH_CMD_OPCODE, EDL_PATCH_CONFIG_CMD_LEN,
156 cmd, HCI_EV_VENDOR, HCI_INIT_TIMEOUT);
157 if (IS_ERR(skb)) {
158 err = PTR_ERR(skb);
159 bt_dev_err(hdev, "Sending QCA Patch config failed (%d)", err);
160 return err;
161 }
162 if (skb->len != rlen) {
163 bt_dev_err(hdev, "QCA Patch config cmd size mismatch len %d", skb->len);
164 err = -EILSEQ;
165 goto out;
166 }
167 edl = (struct edl_event_hdr *)(skb->data);
168 if (!edl) {
169 bt_dev_err(hdev, "QCA Patch config with no header");
170 err = -EILSEQ;
171 goto out;
172 }
173 if (edl->cresp != EDL_PATCH_CONFIG_RES_EVT || edl->rtype != rtype) {
174 bt_dev_err(hdev, "QCA Wrong packet received %d %d", edl->cresp,
175 edl->rtype);
176 err = -EIO;
177 goto out;
178 }
179 out:
180 kfree(skb);
181 if (err)
182 bt_dev_err(hdev, "QCA Patch config cmd failed (%d)", err);
183
184 return err;
185 }
186
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Bluetooth: btqca: sequential validation
2021-12-08 8:26 Sai Teja Aluvala
2021-12-08 13:27 ` kernel test robot
2021-12-08 13:50 ` kernel test robot
@ 2021-12-08 14:48 ` Marcel Holtmann
2021-12-09 5:23 ` Sai Teja Aluvala (Temp) (QUIC)
2 siblings, 1 reply; 10+ messages in thread
From: Marcel Holtmann @ 2021-12-08 14:48 UTC (permalink / raw)
To: Sai Teja Aluvala
Cc: Johan Hedberg, Matthias Kaehlcke, Linux Kernel Mailing List,
linux-bluetooth, quic_hemantg, MSM, quic_bgodavar, Rocky Liao,
hbandi, Abhishek Pandit-Subedi, Miao-chen Chou, quic_pharish
Hi Sai,
> This change will have sequential validation support
> & patch config command is added
>
> Signed-off-by: Sai Teja Aluvala <quic_saluvala@quicinc.com>
> ---
> drivers/bluetooth/btqca.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
> drivers/bluetooth/btqca.h | 3 +++
> 2 files changed, 48 insertions(+)
>
> diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c
> index be04d74..9a2fd17 100644
> --- a/drivers/bluetooth/btqca.c
> +++ b/drivers/bluetooth/btqca.c
> @@ -141,6 +141,49 @@ static int qca_read_fw_build_info(struct hci_dev *hdev)
> return err;
> }
>
> +int qca_send_patch_config_cmd(struct hci_dev *hdev, enum qca_btsoc_type soc_type)
> +{
look, I have limited understanding for people ignoring warnings. The missing static declaration is obvious and when you compile the code it will actually tell you about it.
> + struct sk_buff *skb;
> + int err = 0;
> + u8 cmd[5] = {EDL_PATCH_CONFIG_CMD, 0x01, 0, 0, 0};
const u8 cmd[] = { EDL.., .., 0 };
> + u8 rlen = 0x02;
> + struct edl_event_hdr *edl;
> + u8 rtype = EDL_PATCH_CONFIG_CMD;
> +
> + bt_dev_dbg(hdev, "QCA Patch config");
> +
> + skb = __hci_cmd_sync_ev(hdev, EDL_PATCH_CMD_OPCODE, EDL_PATCH_CONFIG_CMD_LEN,
sizeof(cmd)
> + cmd, HCI_EV_VENDOR, HCI_INIT_TIMEOUT);
Indentation is wrong.
> + if (IS_ERR(skb)) {
> + err = PTR_ERR(skb);
> + bt_dev_err(hdev, "Sending QCA Patch config failed (%d)", err);
> + return err;
> + }
> + if (skb->len != rlen) {
> + bt_dev_err(hdev, "QCA Patch config cmd size mismatch len %d", skb->len);
> + err = -EILSEQ;
> + goto out;
> + }
Extra empty line,
> + edl = (struct edl_event_hdr *)(skb->data);
> + if (!edl) {
> + bt_dev_err(hdev, "QCA Patch config with no header");
> + err = -EILSEQ;
> + goto out;
> + }
Here as well.
> + if (edl->cresp != EDL_PATCH_CONFIG_RES_EVT || edl->rtype != rtype) {
> + bt_dev_err(hdev, "QCA Wrong packet received %d %d", edl->cresp,
> + edl->rtype);
Wrong indentation.
> + err = -EIO;
> + goto out;
> + }
> +out:
> + kfree(skb);
> + if (err)
> + bt_dev_err(hdev, "QCA Patch config cmd failed (%d)", err);
> +
> + return err;
> +}
> +
> static int qca_send_reset(struct hci_dev *hdev)
> {
> struct sk_buff *skb;
> @@ -551,6 +594,8 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
> */
> rom_ver = ((soc_ver & 0x00000f00) >> 0x04) | (soc_ver & 0x0000000f);
>
> + if (soc_type == QCA_WCN6750)
> + qca_send_patch_config_cmd(hdev, soc_type);
Extra empty line.
If you are not using the soc_type, then don’t add it as parameter.
> /* Download rampatch file */
> config.type = TLV_TYPE_PATCH;
> if (qca_is_wcn399x(soc_type)) {
> diff --git a/drivers/bluetooth/btqca.h b/drivers/bluetooth/btqca.h
> index 30afa77..8fbb4c7 100644
> --- a/drivers/bluetooth/btqca.h
> +++ b/drivers/bluetooth/btqca.h
> @@ -13,6 +13,8 @@
> #define EDL_PATCH_TLV_REQ_CMD (0x1E)
> #define EDL_GET_BUILD_INFO_CMD (0x20)
> #define EDL_NVM_ACCESS_SET_REQ_CMD (0x01)
> +#define EDL_PATCH_CONFIG_CMD_LEN (0x05)
Not needed.
> +#define EDL_PATCH_CONFIG_CMD (0x28)
> #define MAX_SIZE_PER_TLV_SEGMENT (243)
> #define QCA_PRE_SHUTDOWN_CMD (0xFC08)
> #define QCA_DISABLE_LOGGING (0xFC17)
> @@ -24,6 +26,7 @@
> #define EDL_CMD_EXE_STATUS_EVT (0x00)
> #define EDL_SET_BAUDRATE_RSP_EVT (0x92)
> #define EDL_NVM_ACCESS_CODE_EVT (0x0B)
> +#define EDL_PATCH_CONFIG_RES_EVT (0x00)
> #define QCA_DISABLE_LOGGING_SUB_OP (0x14)
>
> #define EDL_TAG_ID_HCI (17)
Regards
Marcel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Bluetooth: btqca: sequential validation
2021-12-08 8:26 Sai Teja Aluvala
2021-12-08 13:27 ` kernel test robot
@ 2021-12-09 13:30 ` Dan Carpenter
2021-12-08 14:48 ` Marcel Holtmann
2 siblings, 0 replies; 10+ messages in thread
From: kernel test robot @ 2021-12-08 19:38 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 5949 bytes --]
CC: kbuild-all(a)lists.01.org
In-Reply-To: <1638952007-32222-1-git-send-email-quic_saluvala@quicinc.com>
References: <1638952007-32222-1-git-send-email-quic_saluvala@quicinc.com>
TO: Sai Teja Aluvala <quic_saluvala@quicinc.com>
TO: marcel(a)holtmann.org
TO: johan.hedberg(a)gmail.com
CC: mka(a)chromium.org
CC: linux-kernel(a)vger.kernel.org
CC: linux-bluetooth(a)vger.kernel.org
CC: quic_hemantg(a)quicinc.com
CC: linux-arm-msm(a)vger.kernel.org
CC: quic_bgodavar(a)quicinc.com
CC: rjliao(a)codeaurora.org
CC: hbandi(a)codeaurora.org
Hi Sai,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on linux/master linus/master v5.16-rc4 next-20211208]
[cannot apply to bluetooth/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Sai-Teja-Aluvala/Bluetooth-btqca-sequential-validation/20211208-162834
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
:::::: branch date: 11 hours ago
:::::: commit date: 11 hours ago
config: arc-randconfig-m031-20211207 (https://download.01.org/0day-ci/archive/20211209/202112090340.ohuHwTLx-lkp(a)intel.com/config)
compiler: arceb-elf-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/bluetooth/btqca.c:180 qca_send_patch_config_cmd() error: use kfree_skb() here instead of kfree(skb)
Old smatch warnings:
drivers/bluetooth/btqca.c:134 qca_read_fw_build_info() warn: potential spectre issue 'build_label' [w] (local cap)
vim +180 drivers/bluetooth/btqca.c
c0187b0bd3e94c Venkata Lakshmi Narayana Gubba 2020-12-08 143
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 144 int qca_send_patch_config_cmd(struct hci_dev *hdev, enum qca_btsoc_type soc_type)
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 145 {
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 146 struct sk_buff *skb;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 147 int err = 0;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 148 u8 cmd[5] = {EDL_PATCH_CONFIG_CMD, 0x01, 0, 0, 0};
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 149 u8 rlen = 0x02;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 150 struct edl_event_hdr *edl;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 151 u8 rtype = EDL_PATCH_CONFIG_CMD;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 152
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 153 bt_dev_dbg(hdev, "QCA Patch config");
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 154
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 155 skb = __hci_cmd_sync_ev(hdev, EDL_PATCH_CMD_OPCODE, EDL_PATCH_CONFIG_CMD_LEN,
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 156 cmd, HCI_EV_VENDOR, HCI_INIT_TIMEOUT);
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 157 if (IS_ERR(skb)) {
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 158 err = PTR_ERR(skb);
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 159 bt_dev_err(hdev, "Sending QCA Patch config failed (%d)", err);
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 160 return err;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 161 }
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 162 if (skb->len != rlen) {
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 163 bt_dev_err(hdev, "QCA Patch config cmd size mismatch len %d", skb->len);
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 164 err = -EILSEQ;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 165 goto out;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 166 }
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 167 edl = (struct edl_event_hdr *)(skb->data);
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 168 if (!edl) {
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 169 bt_dev_err(hdev, "QCA Patch config with no header");
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 170 err = -EILSEQ;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 171 goto out;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 172 }
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 173 if (edl->cresp != EDL_PATCH_CONFIG_RES_EVT || edl->rtype != rtype) {
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 174 bt_dev_err(hdev, "QCA Wrong packet received %d %d", edl->cresp,
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 175 edl->rtype);
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 176 err = -EIO;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 177 goto out;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 178 }
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 179 out:
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 @180 kfree(skb);
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 181 if (err)
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 182 bt_dev_err(hdev, "QCA Patch config cmd failed (%d)", err);
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 183
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 184 return err;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 185 }
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 186
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] Bluetooth: btqca: sequential validation
2021-12-08 14:48 ` Marcel Holtmann
@ 2021-12-09 5:23 ` Sai Teja Aluvala (Temp) (QUIC)
0 siblings, 0 replies; 10+ messages in thread
From: Sai Teja Aluvala (Temp) (QUIC) @ 2021-12-09 5:23 UTC (permalink / raw)
To: Marcel Holtmann, Sai Teja Aluvala (Temp) (QUIC)
Cc: Johan Hedberg, Matthias Kaehlcke, Linux Kernel Mailing List,
linux-bluetooth, Hemant Gupta (QUIC),
MSM, quic_bgodavar, Rocky Liao, hbandi, Abhishek Pandit-Subedi,
Miao-chen Chou, PANICKER HARISH (Temp) (QUIC)
-----Original Message-----
From: Marcel Holtmann <marcel@holtmann.org>
Sent: Wednesday, December 8, 2021 8:18 PM
To: Sai Teja Aluvala (Temp) (QUIC) <quic_saluvala@quicinc.com>
Cc: Johan Hedberg <johan.hedberg@gmail.com>; Matthias Kaehlcke <mka@chromium.org>; Linux Kernel Mailing List <linux-kernel@vger.kernel.org>; linux-bluetooth <linux-bluetooth@vger.kernel.org>; Hemant Gupta (QUIC) <quic_hemantg@quicinc.com>; MSM <linux-arm-msm@vger.kernel.org>; quic_bgodavar <quic_bgodavar@quicinc.com>; Rocky Liao <rjliao@codeaurora.org>; hbandi@codeaurora.org; Abhishek Pandit-Subedi <abhishekpandit@chromium.org>; Miao-chen Chou <mcchou@chromium.org>; PANICKER HARISH (Temp) (QUIC) <quic_pharish@quicinc.com>
Subject: Re: [PATCH] Bluetooth: btqca: sequential validation
Hi Sai,
> This change will have sequential validation support & patch config
> command is added
>
> Signed-off-by: Sai Teja Aluvala <quic_saluvala@quicinc.com>
> ---
> drivers/bluetooth/btqca.c | 45
> +++++++++++++++++++++++++++++++++++++++++++++
> drivers/bluetooth/btqca.h | 3 +++
> 2 files changed, 48 insertions(+)
>
> diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c
> index be04d74..9a2fd17 100644
> --- a/drivers/bluetooth/btqca.c
> +++ b/drivers/bluetooth/btqca.c
> @@ -141,6 +141,49 @@ static int qca_read_fw_build_info(struct hci_dev *hdev)
> return err;
> }
>
> +int qca_send_patch_config_cmd(struct hci_dev *hdev, enum
> +qca_btsoc_type soc_type) {
look, I have limited understanding for people ignoring warnings. The missing static declaration is obvious and when you compile the code it will actually tell you about it.
[Sai] : will update in next patch
> + struct sk_buff *skb;
> + int err = 0;
> + u8 cmd[5] = {EDL_PATCH_CONFIG_CMD, 0x01, 0, 0, 0};
const u8 cmd[] = { EDL.., .., 0 };
[sai]: will update in next patch
> + u8 rlen = 0x02;
> + struct edl_event_hdr *edl;
> + u8 rtype = EDL_PATCH_CONFIG_CMD;
> +
> + bt_dev_dbg(hdev, "QCA Patch config");
> +
> + skb = __hci_cmd_sync_ev(hdev, EDL_PATCH_CMD_OPCODE,
> +EDL_PATCH_CONFIG_CMD_LEN,
sizeof(cmd)
[sai]: will update in next patch
> + cmd, HCI_EV_VENDOR, HCI_INIT_TIMEOUT);
Indentation is wrong.
[sai] : will update in next patch
> + if (IS_ERR(skb)) {
> + err = PTR_ERR(skb);
> + bt_dev_err(hdev, "Sending QCA Patch config failed (%d)", err);
> + return err;
> + }
> + if (skb->len != rlen) {
> + bt_dev_err(hdev, "QCA Patch config cmd size mismatch len %d", skb->len);
> + err = -EILSEQ;
> + goto out;
> + }
Extra empty line,
[Sai]: will remove extra line in next patch
> + edl = (struct edl_event_hdr *)(skb->data);
> + if (!edl) {
> + bt_dev_err(hdev, "QCA Patch config with no header");
> + err = -EILSEQ;
> + goto out;
> + }
Here as well.
[Sai]: will remove in next patch
> + if (edl->cresp != EDL_PATCH_CONFIG_RES_EVT || edl->rtype != rtype) {
> + bt_dev_err(hdev, "QCA Wrong packet received %d %d", edl->cresp,
> + edl->rtype);
Wrong indentation.
[Sai] : will update in next patch.
> + err = -EIO;
> + goto out;
> + }
> +out:
> + kfree(skb);
> + if (err)
> + bt_dev_err(hdev, "QCA Patch config cmd failed (%d)", err);
> +
> + return err;
> +}
> +
> static int qca_send_reset(struct hci_dev *hdev) {
> struct sk_buff *skb;
> @@ -551,6 +594,8 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
> */
> rom_ver = ((soc_ver & 0x00000f00) >> 0x04) | (soc_ver & 0x0000000f);
>
> + if (soc_type == QCA_WCN6750)
> + qca_send_patch_config_cmd(hdev, soc_type);
Extra empty line.
If you are not using the soc_type, then don’t add it as parameter.
[Sai] : will remove in next patch.
> /* Download rampatch file */
> config.type = TLV_TYPE_PATCH;
> if (qca_is_wcn399x(soc_type)) {
> diff --git a/drivers/bluetooth/btqca.h b/drivers/bluetooth/btqca.h
> index 30afa77..8fbb4c7 100644
> --- a/drivers/bluetooth/btqca.h
> +++ b/drivers/bluetooth/btqca.h
> @@ -13,6 +13,8 @@
> #define EDL_PATCH_TLV_REQ_CMD (0x1E)
> #define EDL_GET_BUILD_INFO_CMD (0x20)
> #define EDL_NVM_ACCESS_SET_REQ_CMD (0x01)
> +#define EDL_PATCH_CONFIG_CMD_LEN (0x05)
Not needed.
[Sai] : will remove in next patch.
> +#define EDL_PATCH_CONFIG_CMD (0x28)
> #define MAX_SIZE_PER_TLV_SEGMENT (243)
> #define QCA_PRE_SHUTDOWN_CMD (0xFC08)
> #define QCA_DISABLE_LOGGING (0xFC17)
> @@ -24,6 +26,7 @@
> #define EDL_CMD_EXE_STATUS_EVT (0x00)
> #define EDL_SET_BAUDRATE_RSP_EVT (0x92)
> #define EDL_NVM_ACCESS_CODE_EVT (0x0B)
> +#define EDL_PATCH_CONFIG_RES_EVT (0x00)
> #define QCA_DISABLE_LOGGING_SUB_OP (0x14)
>
> #define EDL_TAG_ID_HCI (17)
Regards
Marcel
^ permalink raw reply [flat|nested] 10+ messages in thread
* [kbuild] Re: [PATCH] Bluetooth: btqca: sequential validation
@ 2021-12-09 13:30 ` Dan Carpenter
0 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2021-12-09 13:30 UTC (permalink / raw)
To: kbuild, Sai Teja Aluvala, marcel, johan.hedberg
Cc: lkp, kbuild-all, mka, linux-kernel, linux-bluetooth,
quic_hemantg, linux-arm-msm, quic_bgodavar, rjliao, hbandi
Hi Sai,
url: https://github.com/0day-ci/linux/commits/Sai-Teja-Aluvala/Bluetooth-btqca-sequential-validation/20211208-162834
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: arc-randconfig-m031-20211207 (https://download.01.org/0day-ci/archive/20211209/202112090340.ohuHwTLx-lkp@intel.com/config )
compiler: arceb-elf-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/bluetooth/btqca.c:180 qca_send_patch_config_cmd() error: use kfree_skb() here instead of kfree(skb)
vim +180 drivers/bluetooth/btqca.c
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 144 int qca_send_patch_config_cmd(struct hci_dev *hdev, enum qca_btsoc_type soc_type)
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 145 {
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 146 struct sk_buff *skb;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 147 int err = 0;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 148 u8 cmd[5] = {EDL_PATCH_CONFIG_CMD, 0x01, 0, 0, 0};
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 149 u8 rlen = 0x02;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 150 struct edl_event_hdr *edl;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 151 u8 rtype = EDL_PATCH_CONFIG_CMD;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 152
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 153 bt_dev_dbg(hdev, "QCA Patch config");
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 154
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 155 skb = __hci_cmd_sync_ev(hdev, EDL_PATCH_CMD_OPCODE, EDL_PATCH_CONFIG_CMD_LEN,
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 156 cmd, HCI_EV_VENDOR, HCI_INIT_TIMEOUT);
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 157 if (IS_ERR(skb)) {
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 158 err = PTR_ERR(skb);
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 159 bt_dev_err(hdev, "Sending QCA Patch config failed (%d)", err);
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 160 return err;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 161 }
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 162 if (skb->len != rlen) {
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 163 bt_dev_err(hdev, "QCA Patch config cmd size mismatch len %d", skb->len);
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 164 err = -EILSEQ;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 165 goto out;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 166 }
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 167 edl = (struct edl_event_hdr *)(skb->data);
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 168 if (!edl) {
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 169 bt_dev_err(hdev, "QCA Patch config with no header");
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 170 err = -EILSEQ;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 171 goto out;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 172 }
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 173 if (edl->cresp != EDL_PATCH_CONFIG_RES_EVT || edl->rtype != rtype) {
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 174 bt_dev_err(hdev, "QCA Wrong packet received %d %d", edl->cresp,
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 175 edl->rtype);
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 176 err = -EIO;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 177 goto out;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 178 }
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 179 out:
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 @180 kfree(skb);
^^^^^^^^^^
kfree_skb(skb);
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 181 if (err)
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 182 bt_dev_err(hdev, "QCA Patch config cmd failed (%d)", err);
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 183
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 184 return err;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 185 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org
^ permalink raw reply [flat|nested] 10+ messages in thread
* [kbuild] Re: [PATCH] Bluetooth: btqca: sequential validation
@ 2021-12-09 13:30 ` Dan Carpenter
0 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2021-12-09 13:30 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4900 bytes --]
Hi Sai,
url: https://github.com/0day-ci/linux/commits/Sai-Teja-Aluvala/Bluetooth-btqca-sequential-validation/20211208-162834
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: arc-randconfig-m031-20211207 (https://download.01.org/0day-ci/archive/20211209/202112090340.ohuHwTLx-lkp(a)intel.com/config )
compiler: arceb-elf-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/bluetooth/btqca.c:180 qca_send_patch_config_cmd() error: use kfree_skb() here instead of kfree(skb)
vim +180 drivers/bluetooth/btqca.c
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 144 int qca_send_patch_config_cmd(struct hci_dev *hdev, enum qca_btsoc_type soc_type)
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 145 {
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 146 struct sk_buff *skb;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 147 int err = 0;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 148 u8 cmd[5] = {EDL_PATCH_CONFIG_CMD, 0x01, 0, 0, 0};
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 149 u8 rlen = 0x02;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 150 struct edl_event_hdr *edl;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 151 u8 rtype = EDL_PATCH_CONFIG_CMD;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 152
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 153 bt_dev_dbg(hdev, "QCA Patch config");
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 154
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 155 skb = __hci_cmd_sync_ev(hdev, EDL_PATCH_CMD_OPCODE, EDL_PATCH_CONFIG_CMD_LEN,
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 156 cmd, HCI_EV_VENDOR, HCI_INIT_TIMEOUT);
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 157 if (IS_ERR(skb)) {
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 158 err = PTR_ERR(skb);
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 159 bt_dev_err(hdev, "Sending QCA Patch config failed (%d)", err);
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 160 return err;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 161 }
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 162 if (skb->len != rlen) {
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 163 bt_dev_err(hdev, "QCA Patch config cmd size mismatch len %d", skb->len);
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 164 err = -EILSEQ;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 165 goto out;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 166 }
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 167 edl = (struct edl_event_hdr *)(skb->data);
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 168 if (!edl) {
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 169 bt_dev_err(hdev, "QCA Patch config with no header");
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 170 err = -EILSEQ;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 171 goto out;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 172 }
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 173 if (edl->cresp != EDL_PATCH_CONFIG_RES_EVT || edl->rtype != rtype) {
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 174 bt_dev_err(hdev, "QCA Wrong packet received %d %d", edl->cresp,
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 175 edl->rtype);
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 176 err = -EIO;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 177 goto out;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 178 }
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 179 out:
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 @180 kfree(skb);
^^^^^^^^^^
kfree_skb(skb);
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 181 if (err)
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 182 bt_dev_err(hdev, "QCA Patch config cmd failed (%d)", err);
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 183
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 184 return err;
1d58d86c5374c4 Sai Teja Aluvala 2021-12-08 185 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2021-12-09 13:30 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-08 19:38 [PATCH] Bluetooth: btqca: sequential validation kernel test robot
2021-12-09 13:30 ` [kbuild] " Dan Carpenter
2021-12-09 13:30 ` Dan Carpenter
-- strict thread matches above, loose matches on Subject: below --
2021-12-08 8:26 Sai Teja Aluvala
2021-12-08 13:27 ` kernel test robot
2021-12-08 13:27 ` kernel test robot
2021-12-08 13:50 ` kernel test robot
2021-12-08 13:50 ` kernel test robot
2021-12-08 14:48 ` Marcel Holtmann
2021-12-09 5:23 ` Sai Teja Aluvala (Temp) (QUIC)
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.