[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202108200110.HhZR2eBj-lkp@intel.com>
Date: Fri, 20 Aug 2021 01:44:58 +0800
From: kernel test robot <lkp@...el.com>
To: Koba Ko <koba.ko@...onical.com>,
Marcel Holtmann <marcel@...tmann.org>,
Johan Hedberg <johan.hedberg@...il.com>,
Luiz Augusto von Dentz <luiz.dentz@...il.com>,
linux-bluetooth@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: kbuild-all@...ts.01.org
Subject: Re: [PATCH] Bluetooth: btusb: add a reject table to disable msft
Hi Koba,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bluetooth/master]
[also build test WARNING on v5.14-rc6]
[cannot apply to bluetooth-next/master next-20210819]
[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/Koba-Ko/Bluetooth-btusb-add-a-reject-table-to-disable-msft/20210819-220108
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git master
config: m68k-buildonly-randconfig-r002-20210818 (attached as .config)
compiler: m68k-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/bbff58c00c9efb048da28df9dbc3c79c0c40763b
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Koba-Ko/Bluetooth-btusb-add-a-reject-table-to-disable-msft/20210819-220108
git checkout bbff58c00c9efb048da28df9dbc3c79c0c40763b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/bluetooth/btusb.c: In function 'btusb_setup_intel_new':
>> drivers/bluetooth/btusb.c:2917:23: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
2917 | match = usb_match_id(data->intf, msft_rej_table);
| ^
vim +/const +2917 drivers/bluetooth/btusb.c
2829
2830 static int btusb_setup_intel_new(struct hci_dev *hdev)
2831 {
2832 struct btusb_data *data = hci_get_drvdata(hdev);
2833 struct intel_version ver;
2834 struct intel_boot_params params;
2835 u32 boot_param;
2836 char ddcname[64];
2837 int err;
2838 struct intel_debug_features features;
2839 struct usb_device_id *match;
2840
2841 BT_DBG("%s", hdev->name);
2842
2843 /* Set the default boot parameter to 0x0 and it is updated to
2844 * SKU specific boot parameter after reading Intel_Write_Boot_Params
2845 * command while downloading the firmware.
2846 */
2847 boot_param = 0x00000000;
2848
2849 /* Read the Intel version information to determine if the device
2850 * is in bootloader mode or if it already has operational firmware
2851 * loaded.
2852 */
2853 err = btintel_read_version(hdev, &ver);
2854 if (err) {
2855 bt_dev_err(hdev, "Intel Read version failed (%d)", err);
2856 btintel_reset_to_bootloader(hdev);
2857 return err;
2858 }
2859
2860 err = btintel_version_info(hdev, &ver);
2861 if (err)
2862 return err;
2863
2864 err = btusb_intel_download_firmware(hdev, &ver, ¶ms, &boot_param);
2865 if (err)
2866 return err;
2867
2868 /* controller is already having an operational firmware */
2869 if (ver.fw_variant == 0x23)
2870 goto finish;
2871
2872 err = btusb_intel_boot(hdev, boot_param);
2873 if (err)
2874 return err;
2875
2876 clear_bit(BTUSB_BOOTLOADER, &data->flags);
2877
2878 err = btusb_setup_intel_new_get_fw_name(&ver, ¶ms, ddcname,
2879 sizeof(ddcname), "ddc");
2880
2881 if (err < 0) {
2882 bt_dev_err(hdev, "Unsupported Intel firmware naming");
2883 } else {
2884 /* Once the device is running in operational mode, it needs to
2885 * apply the device configuration (DDC) parameters.
2886 *
2887 * The device can work without DDC parameters, so even if it
2888 * fails to load the file, no need to fail the setup.
2889 */
2890 btintel_load_ddc_config(hdev, ddcname);
2891 }
2892
2893 /* Read the Intel supported features and if new exception formats
2894 * supported, need to load the additional DDC config to enable.
2895 */
2896 btintel_read_debug_features(hdev, &features);
2897
2898 /* Set DDC mask for available debug features */
2899 btintel_set_debug_features(hdev, &features);
2900
2901 /* Read the Intel version information after loading the FW */
2902 err = btintel_read_version(hdev, &ver);
2903 if (err)
2904 return err;
2905
2906 btintel_version_info(hdev, &ver);
2907
2908 finish:
2909 /* All Intel controllers that support the Microsoft vendor
2910 * extension are using 0xFC1E for VsMsftOpCode.
2911 */
2912 switch (ver.hw_variant) {
2913 case 0x11: /* JfP */
2914 case 0x12: /* ThP */
2915 case 0x13: /* HrP */
2916 case 0x14: /* CcP */
> 2917 match = usb_match_id(data->intf, msft_rej_table);
2918 if (!match)
2919 hci_set_msft_opcode(hdev, 0xFC1E);
2920 break;
2921 }
2922
2923 /* Set the event mask for Intel specific vendor events. This enables
2924 * a few extra events that are useful during general operation. It
2925 * does not enable any debugging related events.
2926 *
2927 * The device will function correctly without these events enabled
2928 * and thus no need to fail the setup.
2929 */
2930 btintel_set_event_mask(hdev, false);
2931
2932 return 0;
2933 }
2934
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (27276 bytes)
Powered by blists - more mailing lists