[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201912261030.mn4fqtjt%lkp@intel.com>
Date: Thu, 26 Dec 2019 11:04:23 +0800
From: kbuild test robot <lkp@...el.com>
To: Rocky Liao <rjliao@...eaurora.org>
Cc: kbuild-all@...ts.01.org, marcel@...tmann.org,
johan.hedberg@...il.com, linux-kernel@...r.kernel.org,
linux-bluetooth@...r.kernel.org, linux-arm-msm@...r.kernel.org,
Rocky Liao <rjliao@...eaurora.org>
Subject: Re: [PATCH v1 4/4] Bluetooth: hci_qca: Add HCI command timeout
handling
Hi Rocky,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on bluetooth-next/master]
[also build test ERROR on linux/master linus/master v5.5-rc3 next-20191220]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Rocky-Liao/Bluetooth-hci_qca-Add-QCA-Rome-power-off-support-to-the-qca_power_off/20191226-050217
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: nds32-allyesconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=9.2.0 make.cross ARCH=nds32
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
drivers/bluetooth/hci_qca.c: In function 'qca_setup':
>> drivers/bluetooth/hci_qca.c:1346:21: error: assignment to 'void (*)(struct hci_dev *)' from incompatible pointer type 'void (*)(struct hci_uart *)' [-Werror=incompatible-pointer-types]
1346 | hdev->cmd_timeout = qca_cmd_timeout;
| ^
drivers/bluetooth/hci_qca.c:1347:6: error: 'struct qca_data' has no member named 'cmd_timeout_cnt'
1347 | qca->cmd_timeout_cnt = 0;
| ^~
In file included from drivers/bluetooth/hci_qca.c:33:
drivers/bluetooth/hci_qca.c: In function 'qca_cmd_timeout':
drivers/bluetooth/hci_qca.c:1504:54: error: 'struct qca_data' has no member named 'cmd_timeout_cnt'
1504 | BT_ERR("hu %p hci cmd timeout count=0x%x", hu, ++qca->cmd_timeout_cnt);
| ^~
include/net/bluetooth/bluetooth.h:138:45: note: in definition of macro 'BT_ERR'
138 | #define BT_ERR(fmt, ...) bt_err(fmt "\n", ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/bluetooth/hci_qca.c:1506:9: error: 'struct qca_data' has no member named 'cmd_timeout_cnt'
1506 | if (qca->cmd_timeout_cnt >= QCA_MAX_CMD_TIMEOUT_COUNT)
| ^~
cc1: some warnings being treated as errors
vim +1346 drivers/bluetooth/hci_qca.c
1264
1265 static int qca_setup(struct hci_uart *hu)
1266 {
1267 struct hci_dev *hdev = hu->hdev;
1268 struct qca_data *qca = hu->priv;
1269 struct qca_serdev *qcadev;
1270 unsigned int speed, qca_baudrate = QCA_BAUDRATE_115200;
1271 unsigned int init_retry_count = 0;
1272 enum qca_btsoc_type soc_type = qca_soc_type(hu);
1273 const char *firmware_name = qca_get_firmware_name(hu);
1274 int ret;
1275 int soc_ver = 0;
1276
1277 ret = qca_check_speeds(hu);
1278 if (ret)
1279 return ret;
1280
1281 /* Patch downloading has to be done without IBS mode */
1282 clear_bit(QCA_IBS_ENABLED, &qca->flags);
1283
1284 /* Enable controller to do both LE scan and BR/EDR inquiry
1285 * simultaneously.
1286 */
1287 set_bit(HCI_QUIRK_SIMULTANEOUS_DISCOVERY, &hdev->quirks);
1288
1289 retry:
1290 if (qca_is_wcn399x(soc_type)) {
1291 bt_dev_info(hdev, "setting up wcn3990");
1292
1293 /* Enable NON_PERSISTENT_SETUP QUIRK to ensure to execute
1294 * setup for every hci up.
1295 */
1296 set_bit(HCI_QUIRK_NON_PERSISTENT_SETUP, &hdev->quirks);
1297 set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks);
1298 hu->hdev->shutdown = qca_power_off;
1299 ret = qca_wcn3990_init(hu);
1300 if (ret)
1301 return ret;
1302
1303 ret = qca_read_soc_version(hdev, &soc_ver, soc_type);
1304 if (ret)
1305 return ret;
1306 } else {
1307 bt_dev_info(hdev, "ROME setup");
1308 if (hu->serdev) {
1309 /* Enable NON_PERSISTENT_SETUP QUIRK to ensure to
1310 * execute setup for every hci up.
1311 */
1312 set_bit(HCI_QUIRK_NON_PERSISTENT_SETUP, &hdev->quirks);
1313 hu->hdev->shutdown = qca_power_off;
1314 qcadev = serdev_device_get_drvdata(hu->serdev);
1315 gpiod_set_value_cansleep(qcadev->bt_en, 1);
1316 /* Controller needs time to bootup. */
1317 msleep(150);
1318 }
1319 qca_set_speed(hu, QCA_INIT_SPEED);
1320 }
1321
1322 /* Setup user speed if needed */
1323 speed = qca_get_speed(hu, QCA_OPER_SPEED);
1324 if (speed) {
1325 ret = qca_set_speed(hu, QCA_OPER_SPEED);
1326 if (ret)
1327 return ret;
1328
1329 qca_baudrate = qca_get_baudrate_value(speed);
1330 }
1331
1332 if (!qca_is_wcn399x(soc_type)) {
1333 /* Get QCA version information */
1334 ret = qca_read_soc_version(hdev, &soc_ver, soc_type);
1335 if (ret)
1336 return ret;
1337 }
1338
1339 bt_dev_info(hdev, "QCA controller version 0x%08x", soc_ver);
1340 /* Setup patch / NVM configurations */
1341 ret = qca_uart_setup(hdev, qca_baudrate, soc_type, soc_ver,
1342 firmware_name);
1343 if (!ret) {
1344 set_bit(QCA_IBS_ENABLED, &qca->flags);
1345 qca_debugfs_init(hdev);
> 1346 hdev->cmd_timeout = qca_cmd_timeout;
1347 qca->cmd_timeout_cnt = 0;
1348 } else if (ret == -ENOENT) {
1349 /* No patch/nvm-config found, run with original fw/config */
1350 ret = 0;
1351 } else if (ret == -EAGAIN) {
1352 /*
1353 * Userspace firmware loader will return -EAGAIN in case no
1354 * patch/nvm-config is found, so run with original fw/config.
1355 */
1356 ret = 0;
1357 } else {
1358 if (init_retry_count < QCA_MAX_INIT_RETRY_COUNT) {
1359 qca_power_off(hdev);
1360 if (hu->serdev) {
1361 serdev_device_close(hu->serdev);
1362 ret = serdev_device_open(hu->serdev);
1363 if (ret) {
1364 bt_dev_err(hu->hdev, "open port fail");
1365 return ret;
1366 }
1367 }
1368 init_retry_count++;
1369 goto retry;
1370 }
1371 }
1372
1373 /* Setup bdaddr */
1374 if (qca_is_wcn399x(soc_type))
1375 hu->hdev->set_bdaddr = qca_set_bdaddr;
1376 else
1377 hu->hdev->set_bdaddr = qca_set_bdaddr_rome;
1378
1379 return ret;
1380 }
1381
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (54011 bytes)
Powered by blists - more mailing lists