From: kernel test robot <lkp@intel.com>
To: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>,
marcel@holtmann.org, luiz.dentz@gmail.com
Cc: oe-kbuild-all@lists.linux.dev, linux-bluetooth@vger.kernel.org,
linux-kernel@vger.kernel.org, amitkumar.karwar@nxp.com,
neeraj.sanjaykale@nxp.com
Subject: Re: [PATCH v2 2/3] Bluetooth: btnxpuart: Handle bootloader error during cmd5 and cmd7
Date: Sun, 9 Mar 2025 19:16:38 +0800 [thread overview]
Message-ID: <202503091936.x9Evtskg-lkp@intel.com> (raw)
In-Reply-To: <20250306180931.57705-2-neeraj.sanjaykale@nxp.com>
Hi Neeraj,
kernel test robot noticed the following build warnings:
[auto build test WARNING on bluetooth/master]
[also build test WARNING on linus/master v6.14-rc5 next-20250307]
[cannot apply to bluetooth-next/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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Neeraj-Sanjay-Kale/Bluetooth-btnxpuart-Handle-bootloader-error-during-cmd5-and-cmd7/20250307-021228
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git master
patch link: https://lore.kernel.org/r/20250306180931.57705-2-neeraj.sanjaykale%40nxp.com
patch subject: [PATCH v2 2/3] Bluetooth: btnxpuart: Handle bootloader error during cmd5 and cmd7
config: microblaze-randconfig-r123-20250309 (https://download.01.org/0day-ci/archive/20250309/202503091936.x9Evtskg-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 14.2.0
reproduce: (https://download.01.org/0day-ci/archive/20250309/202503091936.x9Evtskg-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503091936.x9Evtskg-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/bluetooth/btnxpuart.c:1113:24: sparse: sparse: restricted __le16 degrades to integer
drivers/bluetooth/btnxpuart.c:1119:24: sparse: sparse: restricted __le16 degrades to integer
vim +1113 drivers/bluetooth/btnxpuart.c
1089
1090 static int nxp_recv_fw_req_v3(struct hci_dev *hdev, struct sk_buff *skb)
1091 {
1092 struct btnxpuart_dev *nxpdev = hci_get_drvdata(hdev);
1093 struct v3_data_req *req;
1094 __u16 len = 0;
1095 __u32 offset;
1096
1097 if (!process_boot_signature(nxpdev))
1098 goto free_skb;
1099
1100 req = skb_pull_data(skb, sizeof(*req));
1101 if (!req || !nxpdev->fw)
1102 goto free_skb;
1103
1104 if (!req->error) {
1105 nxp_send_ack(NXP_ACK_V3, hdev);
1106 if (nxpdev->timeout_changed == cmd_sent)
1107 nxpdev->timeout_changed = changed;
1108 if (nxpdev->baudrate_changed == cmd_sent)
1109 nxpdev->baudrate_changed = changed;
1110 } else {
1111 nxp_handle_fw_download_error(hdev, req);
1112 if (nxpdev->timeout_changed == cmd_sent &&
> 1113 req->error == NXP_CRC_RX_ERROR) {
1114 nxpdev->fw_v3_offset_correction -= nxpdev->fw_v3_prev_sent;
1115 nxpdev->timeout_changed = not_changed;
1116 }
1117 /* After baudrate change, it is normal to get ACK Timeout error */
1118 if (nxpdev->baudrate_changed == cmd_sent &&
1119 req->error == NXP_CRC_RX_ERROR) {
1120 nxpdev->fw_v3_offset_correction -= nxpdev->fw_v3_prev_sent;
1121 nxpdev->baudrate_changed = not_changed;
1122 }
1123 goto free_skb;
1124 }
1125
1126 len = __le16_to_cpu(req->len);
1127
1128 if (nxpdev->timeout_changed != changed) {
1129 nxp_fw_change_timeout(hdev, len);
1130 nxpdev->timeout_changed = cmd_sent;
1131 goto free_skb;
1132 }
1133
1134 if (nxpdev->baudrate_changed != changed) {
1135 if (nxp_fw_change_baudrate(hdev, len)) {
1136 nxpdev->baudrate_changed = cmd_sent;
1137 serdev_device_set_baudrate(nxpdev->serdev,
1138 HCI_NXP_SEC_BAUDRATE);
1139 serdev_device_set_flow_control(nxpdev->serdev, true);
1140 nxpdev->current_baudrate = HCI_NXP_SEC_BAUDRATE;
1141 }
1142 goto free_skb;
1143 }
1144
1145 if (req->len == 0) {
1146 bt_dev_info(hdev, "FW Download Complete: %zu bytes",
1147 nxpdev->fw->size);
1148 clear_bit(BTNXPUART_FW_DOWNLOADING, &nxpdev->tx_state);
1149 wake_up_interruptible(&nxpdev->fw_dnld_done_wait_q);
1150 goto free_skb;
1151 }
1152
1153 offset = __le32_to_cpu(req->offset);
1154 if (offset < nxpdev->fw_v3_offset_correction) {
1155 /* This scenario should ideally never occur. But if it ever does,
1156 * FW is out of sync and needs a power cycle.
1157 */
1158 bt_dev_err(hdev, "Something went wrong during FW download");
1159 bt_dev_err(hdev, "Please power cycle and try again");
1160 goto free_skb;
1161 }
1162
1163 nxpdev->fw_dnld_v3_offset = offset - nxpdev->fw_v3_offset_correction;
1164 serdev_device_write_buf(nxpdev->serdev, nxpdev->fw->data +
1165 nxpdev->fw_dnld_v3_offset, len);
1166
1167 free_skb:
1168 nxpdev->fw_v3_prev_sent = len;
1169 kfree_skb(skb);
1170 return 0;
1171 }
1172
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-03-09 11:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-06 18:09 [PATCH v2 1/3] Bluetooth: btnxpuart: Add correct bootloader error codes Neeraj Sanjay Kale
2025-03-06 18:09 ` [PATCH v2 2/3] Bluetooth: btnxpuart: Handle bootloader error during cmd5 and cmd7 Neeraj Sanjay Kale
2025-03-09 11:16 ` kernel test robot [this message]
2025-03-06 18:09 ` [PATCH v2 3/3] Bluetooth: btnxpuart: Fix kernel panic during FW release Neeraj Sanjay Kale
2025-03-06 19:03 ` [v2,1/3] Bluetooth: btnxpuart: Add correct bootloader error codes bluez.test.bot
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=202503091936.x9Evtskg-lkp@intel.com \
--to=lkp@intel.com \
--cc=amitkumar.karwar@nxp.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=neeraj.sanjaykale@nxp.com \
--cc=oe-kbuild-all@lists.linux.dev \
/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