lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202307292011.c34ZumSF-lkp@intel.com>
Date:   Sat, 29 Jul 2023 20:50:32 +0800
From:   kernel test robot <lkp@...el.com>
To:     Aleksa Savic <savicaleksa83@...il.com>, linux-hwmon@...r.kernel.org
Cc:     oe-kbuild-all@...ts.linux.dev,
        Aleksa Savic <savicaleksa83@...il.com>, stable@...r.kernel.org,
        Jack Doan <me@...kdoan.com>, Jean Delvare <jdelvare@...e.com>,
        Guenter Roeck <linux@...ck-us.net>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] hwmon: (aquacomputer_d5next) Add selective 200ms delay
 after sending ctrl report

Hi Aleksa,

kernel test robot noticed the following build errors:

[auto build test ERROR on groeck-staging/hwmon-next]
[also build test ERROR on linus/master v6.5-rc3 next-20230728]
[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/Aleksa-Savic/hwmon-aquacomputer_d5next-Add-selective-200ms-delay-after-sending-ctrl-report/20230729-193038
base:   https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
patch link:    https://lore.kernel.org/r/20230729112732.5516-1-savicaleksa83%40gmail.com
patch subject: [PATCH] hwmon: (aquacomputer_d5next) Add selective 200ms delay after sending ctrl report
config: arm-randconfig-r005-20230729 (https://download.01.org/0day-ci/archive/20230729/202307292011.c34ZumSF-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230729/202307292011.c34ZumSF-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307292011.c34ZumSF-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/hwmon/aquacomputer_d5next.c: In function 'aqc_send_ctrl_data':
>> drivers/hwmon/aquacomputer_d5next.c:674:17: error: implicit declaration of function 'msleep' [-Werror=implicit-function-declaration]
     674 |                 msleep(200);
         |                 ^~~~~~
   cc1: some warnings being treated as errors


vim +/msleep +674 drivers/hwmon/aquacomputer_d5next.c

   627	
   628	/* Expects the mutex to be locked */
   629	static int aqc_send_ctrl_data(struct aqc_data *priv)
   630	{
   631		int ret;
   632		u16 checksum;
   633	
   634		/* Checksum is not needed for Aquaero */
   635		if (priv->kind != aquaero) {
   636			/* Init and xorout value for CRC-16/USB is 0xffff */
   637			checksum = crc16(0xffff, priv->buffer + priv->checksum_start,
   638					 priv->checksum_length);
   639			checksum ^= 0xffff;
   640	
   641			/* Place the new checksum at the end of the report */
   642			put_unaligned_be16(checksum, priv->buffer + priv->checksum_offset);
   643		}
   644	
   645		/* Send the patched up report back to the device */
   646		ret = hid_hw_raw_request(priv->hdev, priv->ctrl_report_id, priv->buffer, priv->buffer_size,
   647					 HID_FEATURE_REPORT, HID_REQ_SET_REPORT);
   648		if (ret < 0)
   649			return ret;
   650	
   651		/* The official software sends this report after every change, so do it here as well */
   652		ret = hid_hw_raw_request(priv->hdev, priv->secondary_ctrl_report_id,
   653					 priv->secondary_ctrl_report, priv->secondary_ctrl_report_size,
   654					 HID_FEATURE_REPORT, HID_REQ_SET_REPORT);
   655		if (ret < 0)
   656			return ret;
   657	
   658		/*
   659		 * Wait 200ms before returning to make sure that the device actually processed both reports
   660		 * and saved ctrl data to memory. Otherwise, an aqc_get_ctrl_data() call made shortly after
   661		 * may fail with -EPIPE because the device is still busy and can't provide data. This can
   662		 * happen when userspace tools, such as fancontrol or liquidctl, write to sysfs entries in
   663		 * quick succession.
   664		 *
   665		 * 200ms was found to be the sweet spot between fixing the issue and not significantly
   666		 * prolonging the call. Quadro, Octo, D5 Next and Aquaero are currently known to be
   667		 * affected.
   668		 */
   669		switch (priv->kind) {
   670		case quadro:
   671		case octo:
   672		case d5next:
   673		case aquaero:
 > 674			msleep(200);
   675			break;
   676		default:
   677			break;
   678		}
   679	
   680		return ret;
   681	}
   682	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ