Re: [PATCH v1 2/2] Bluetooth: Support the vendor specific debug events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Joseph,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on bluetooth-next/master]
[also build test ERROR on v5.12-rc7 next-20210409]
[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/Joseph-Hwang/Bluetooth-btusb-support-link-statistics-telemetry-events/20210412-152954
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: alpha-randconfig-s031-20210412 (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-280-g2cd6d34e-dirty
        # https://github.com/0day-ci/linux/commit/d3bd96f611be6b3248ca68c2bc628c29e5419b92
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Joseph-Hwang/Bluetooth-btusb-support-link-statistics-telemetry-events/20210412-152954
        git checkout d3bd96f611be6b3248ca68c2bc628c29e5419b92
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=alpha 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   drivers/bluetooth/btusb.c: In function 'btusb_setup_intel_newgen':
>> drivers/bluetooth/btusb.c:2963:2: error: implicit declaration of function 'btintel_read_debug_features' [-Werror=implicit-function-declaration]
    2963 |  btintel_read_debug_features(hdev, &features);
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/bluetooth/btusb.c:2966:2: error: implicit declaration of function 'btintel_set_debug_features' [-Werror=implicit-function-declaration]
    2966 |  btintel_set_debug_features(hdev, &features);
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/btintel_read_debug_features +2963 drivers/bluetooth/btusb.c

cda0dd7809f89e Marcel Holtmann        2015-01-26  2903  
0a3c1d45eca09c Kiran K                2020-11-19  2904  static int btusb_setup_intel_newgen(struct hci_dev *hdev)
0a3c1d45eca09c Kiran K                2020-11-19  2905  {
0a3c1d45eca09c Kiran K                2020-11-19  2906  	struct btusb_data *data = hci_get_drvdata(hdev);
0a3c1d45eca09c Kiran K                2020-11-19  2907  	u32 boot_param;
0a3c1d45eca09c Kiran K                2020-11-19  2908  	char ddcname[64];
0a3c1d45eca09c Kiran K                2020-11-19  2909  	int err;
0a3c1d45eca09c Kiran K                2020-11-19  2910  	struct intel_debug_features features;
0a3c1d45eca09c Kiran K                2020-11-19  2911  	struct intel_version_tlv version;
0a3c1d45eca09c Kiran K                2020-11-19  2912  
0a3c1d45eca09c Kiran K                2020-11-19  2913  	bt_dev_dbg(hdev, "");
0a3c1d45eca09c Kiran K                2020-11-19  2914  
0a3c1d45eca09c Kiran K                2020-11-19  2915  	/* Set the default boot parameter to 0x0 and it is updated to
0a3c1d45eca09c Kiran K                2020-11-19  2916  	 * SKU specific boot parameter after reading Intel_Write_Boot_Params
0a3c1d45eca09c Kiran K                2020-11-19  2917  	 * command while downloading the firmware.
0a3c1d45eca09c Kiran K                2020-11-19  2918  	 */
0a3c1d45eca09c Kiran K                2020-11-19  2919  	boot_param = 0x00000000;
0a3c1d45eca09c Kiran K                2020-11-19  2920  
0a3c1d45eca09c Kiran K                2020-11-19  2921  	/* Read the Intel version information to determine if the device
0a3c1d45eca09c Kiran K                2020-11-19  2922  	 * is in bootloader mode or if it already has operational firmware
0a3c1d45eca09c Kiran K                2020-11-19  2923  	 * loaded.
0a3c1d45eca09c Kiran K                2020-11-19  2924  	 */
0a3c1d45eca09c Kiran K                2020-11-19  2925  	err = btintel_read_version_tlv(hdev, &version);
0a3c1d45eca09c Kiran K                2020-11-19  2926  	if (err) {
0a3c1d45eca09c Kiran K                2020-11-19  2927  		bt_dev_err(hdev, "Intel Read version failed (%d)", err);
0a3c1d45eca09c Kiran K                2020-11-19  2928  		btintel_reset_to_bootloader(hdev);
0a3c1d45eca09c Kiran K                2020-11-19  2929  		return err;
0a3c1d45eca09c Kiran K                2020-11-19  2930  	}
0a3c1d45eca09c Kiran K                2020-11-19  2931  
0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23  2932  	err = btintel_version_info_tlv(hdev, &version);
0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23  2933  	if (err)
0a460d8fe2db68 Luiz Augusto von Dentz 2021-03-23  2934  		return err;
0a3c1d45eca09c Kiran K                2020-11-19  2935  
3f43a37838d5b5 Kiran K                2020-11-19  2936  	err = btusb_intel_download_firmware_newgen(hdev, &version, &boot_param);
3f43a37838d5b5 Kiran K                2020-11-19  2937  	if (err)
3f43a37838d5b5 Kiran K                2020-11-19  2938  		return err;
3f43a37838d5b5 Kiran K                2020-11-19  2939  
0a3c1d45eca09c Kiran K                2020-11-19  2940  	/* check if controller is already having an operational firmware */
0a3c1d45eca09c Kiran K                2020-11-19  2941  	if (version.img_type == 0x03)
0a3c1d45eca09c Kiran K                2020-11-19  2942  		goto finish;
0a3c1d45eca09c Kiran K                2020-11-19  2943  
604b3cf87fd217 Luiz Augusto von Dentz 2021-03-23  2944  	err = btusb_intel_boot(hdev, boot_param);
604b3cf87fd217 Luiz Augusto von Dentz 2021-03-23  2945  	if (err)
0a3c1d45eca09c Kiran K                2020-11-19  2946  		return err;
0a3c1d45eca09c Kiran K                2020-11-19  2947  
0a3c1d45eca09c Kiran K                2020-11-19  2948  	clear_bit(BTUSB_BOOTLOADER, &data->flags);
0a3c1d45eca09c Kiran K                2020-11-19  2949  
9a93b8b8eee4ac Kiran K                2020-11-19  2950  	btusb_setup_intel_newgen_get_fw_name(&version, ddcname, sizeof(ddcname),
9a93b8b8eee4ac Kiran K                2020-11-19  2951  					     "ddc");
0a3c1d45eca09c Kiran K                2020-11-19  2952  	/* Once the device is running in operational mode, it needs to
0a3c1d45eca09c Kiran K                2020-11-19  2953  	 * apply the device configuration (DDC) parameters.
0a3c1d45eca09c Kiran K                2020-11-19  2954  	 *
0a3c1d45eca09c Kiran K                2020-11-19  2955  	 * The device can work without DDC parameters, so even if it
0a3c1d45eca09c Kiran K                2020-11-19  2956  	 * fails to load the file, no need to fail the setup.
0a3c1d45eca09c Kiran K                2020-11-19  2957  	 */
0a3c1d45eca09c Kiran K                2020-11-19  2958  	btintel_load_ddc_config(hdev, ddcname);
0a3c1d45eca09c Kiran K                2020-11-19  2959  
0a3c1d45eca09c Kiran K                2020-11-19  2960  	/* Read the Intel supported features and if new exception formats
0a3c1d45eca09c Kiran K                2020-11-19  2961  	 * supported, need to load the additional DDC config to enable.
0a3c1d45eca09c Kiran K                2020-11-19  2962  	 */
0a3c1d45eca09c Kiran K                2020-11-19 @2963  	btintel_read_debug_features(hdev, &features);
0a3c1d45eca09c Kiran K                2020-11-19  2964  
0a3c1d45eca09c Kiran K                2020-11-19  2965  	/* Set DDC mask for available debug features */
0a3c1d45eca09c Kiran K                2020-11-19 @2966  	btintel_set_debug_features(hdev, &features);
0a3c1d45eca09c Kiran K                2020-11-19  2967  
0a3c1d45eca09c Kiran K                2020-11-19  2968  	/* Read the Intel version information after loading the FW  */
0a3c1d45eca09c Kiran K                2020-11-19  2969  	err = btintel_read_version_tlv(hdev, &version);
0a3c1d45eca09c Kiran K                2020-11-19  2970  	if (err)
0a3c1d45eca09c Kiran K                2020-11-19  2971  		return err;
0a3c1d45eca09c Kiran K                2020-11-19  2972  
0a3c1d45eca09c Kiran K                2020-11-19  2973  	btintel_version_info_tlv(hdev, &version);
0a3c1d45eca09c Kiran K                2020-11-19  2974  
0a3c1d45eca09c Kiran K                2020-11-19  2975  finish:
0a3c1d45eca09c Kiran K                2020-11-19  2976  	/* Set the event mask for Intel specific vendor events. This enables
0a3c1d45eca09c Kiran K                2020-11-19  2977  	 * a few extra events that are useful during general operation. It
0a3c1d45eca09c Kiran K                2020-11-19  2978  	 * does not enable any debugging related events.
0a3c1d45eca09c Kiran K                2020-11-19  2979  	 *
0a3c1d45eca09c Kiran K                2020-11-19  2980  	 * The device will function correctly without these events enabled
0a3c1d45eca09c Kiran K                2020-11-19  2981  	 * and thus no need to fail the setup.
0a3c1d45eca09c Kiran K                2020-11-19  2982  	 */
0a3c1d45eca09c Kiran K                2020-11-19  2983  	btintel_set_event_mask(hdev, false);
0a3c1d45eca09c Kiran K                2020-11-19  2984  
0a3c1d45eca09c Kiran K                2020-11-19  2985  	return 0;
0a3c1d45eca09c Kiran K                2020-11-19  2986  }
bfbd45e9acd2ef Tedd Ho-Jeong An       2015-02-13  2987  static int btusb_shutdown_intel(struct hci_dev *hdev)
bfbd45e9acd2ef Tedd Ho-Jeong An       2015-02-13  2988  {
bfbd45e9acd2ef Tedd Ho-Jeong An       2015-02-13  2989  	struct sk_buff *skb;
bfbd45e9acd2ef Tedd Ho-Jeong An       2015-02-13  2990  	long ret;
bfbd45e9acd2ef Tedd Ho-Jeong An       2015-02-13  2991  
1313bccf00f6df Amit K Bag             2018-08-03  2992  	/* In the shutdown sequence where Bluetooth is turned off followed
1313bccf00f6df Amit K Bag             2018-08-03  2993  	 * by WiFi being turned off, turning WiFi back on causes issue with
1313bccf00f6df Amit K Bag             2018-08-03  2994  	 * the RF calibration.
1313bccf00f6df Amit K Bag             2018-08-03  2995  	 *
1313bccf00f6df Amit K Bag             2018-08-03  2996  	 * To ensure that any RF activity has been stopped, issue HCI Reset
1313bccf00f6df Amit K Bag             2018-08-03  2997  	 * command to clear all ongoing activity including advertising,
1313bccf00f6df Amit K Bag             2018-08-03  2998  	 * scanning etc.
1313bccf00f6df Amit K Bag             2018-08-03  2999  	 */
1313bccf00f6df Amit K Bag             2018-08-03  3000  	skb = __hci_cmd_sync(hdev, HCI_OP_RESET, 0, NULL, HCI_INIT_TIMEOUT);
1313bccf00f6df Amit K Bag             2018-08-03  3001  	if (IS_ERR(skb)) {
1313bccf00f6df Amit K Bag             2018-08-03  3002  		ret = PTR_ERR(skb);
1313bccf00f6df Amit K Bag             2018-08-03  3003  		bt_dev_err(hdev, "HCI reset during shutdown failed");
1313bccf00f6df Amit K Bag             2018-08-03  3004  		return ret;
1313bccf00f6df Amit K Bag             2018-08-03  3005  	}
1313bccf00f6df Amit K Bag             2018-08-03  3006  	kfree_skb(skb);
1313bccf00f6df Amit K Bag             2018-08-03  3007  
bfbd45e9acd2ef Tedd Ho-Jeong An       2015-02-13  3008  	/* Some platforms have an issue with BT LED when the interface is
bfbd45e9acd2ef Tedd Ho-Jeong An       2015-02-13  3009  	 * down or BT radio is turned off, which takes 5 seconds to BT LED
bfbd45e9acd2ef Tedd Ho-Jeong An       2015-02-13  3010  	 * goes off. This command turns off the BT LED immediately.
bfbd45e9acd2ef Tedd Ho-Jeong An       2015-02-13  3011  	 */
bfbd45e9acd2ef Tedd Ho-Jeong An       2015-02-13  3012  	skb = __hci_cmd_sync(hdev, 0xfc3f, 0, NULL, HCI_INIT_TIMEOUT);
bfbd45e9acd2ef Tedd Ho-Jeong An       2015-02-13  3013  	if (IS_ERR(skb)) {
bfbd45e9acd2ef Tedd Ho-Jeong An       2015-02-13  3014  		ret = PTR_ERR(skb);
85418feff6faa9 Marcel Holtmann        2018-08-03  3015  		bt_dev_err(hdev, "turning off Intel device LED failed");
bfbd45e9acd2ef Tedd Ho-Jeong An       2015-02-13  3016  		return ret;
bfbd45e9acd2ef Tedd Ho-Jeong An       2015-02-13  3017  	}
bfbd45e9acd2ef Tedd Ho-Jeong An       2015-02-13  3018  	kfree_skb(skb);
bfbd45e9acd2ef Tedd Ho-Jeong An       2015-02-13  3019  
bfbd45e9acd2ef Tedd Ho-Jeong An       2015-02-13  3020  	return 0;
bfbd45e9acd2ef Tedd Ho-Jeong An       2015-02-13  3021  }
bfbd45e9acd2ef Tedd Ho-Jeong An       2015-02-13  3022  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux