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] [day] [month] [year] [list]
Message-ID: <202505201239.5YN7PGlt-lkp@intel.com>
Date: Tue, 20 May 2025 12:37:26 +0800
From: kernel test robot <lkp@...el.com>
To: Wentao Liang <vulab@...as.ac.cn>, sgoutham@...vell.com,
	andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
	kuba@...nel.org, pabeni@...hat.com
Cc: oe-kbuild-all@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	Wentao Liang <vulab@...as.ac.cn>
Subject: Re: [PATCH] net: cavium: thunder: Add log for verification fail in
 bgx_poll_for_link()

Hi Wentao,

kernel test robot noticed the following build errors:

[auto build test ERROR on net-next/main]
[also build test ERROR on net/main linus/master v6.15-rc7 next-20250516]
[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/Wentao-Liang/net-cavium-thunder-Add-log-for-verification-fail-in-bgx_poll_for_link/20250519-232542
base:   net-next/main
patch link:    https://lore.kernel.org/r/20250519152348.2839-1-vulab%40iscas.ac.cn
patch subject: [PATCH] net: cavium: thunder: Add log for verification fail in bgx_poll_for_link()
config: sparc-randconfig-002-20250520 (https://download.01.org/0day-ci/archive/20250520/202505201239.5YN7PGlt-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 12.4.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250520/202505201239.5YN7PGlt-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/202505201239.5YN7PGlt-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from include/linux/device.h:15,
                    from include/linux/acpi.h:14,
                    from drivers/net/ethernet/cavium/thunder/thunder_bgx.c:6:
   drivers/net/ethernet/cavium/thunder/thunder_bgx.c: In function 'bgx_poll_for_link':
>> drivers/net/ethernet/cavium/thunder/thunder_bgx.c:1012:40: error: incompatible type for argument 1 of '_dev_err'
    1012 |                 dev_err(lmac->bgx->pdev->dev, "BXG verification fail with time out.\n");
         |                         ~~~~~~~~~~~~~~~^~~~~
         |                                        |
         |                                        struct device
   include/linux/dev_printk.h:110:25: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                         ^~~
   drivers/net/ethernet/cavium/thunder/thunder_bgx.c:1012:17: note: in expansion of macro 'dev_err'
    1012 |                 dev_err(lmac->bgx->pdev->dev, "BXG verification fail with time out.\n");
         |                 ^~~~~~~
   include/linux/dev_printk.h:50:36: note: expected 'const struct device *' but argument is of type 'struct device'
      50 | void _dev_err(const struct device *dev, const char *fmt, ...);
         |               ~~~~~~~~~~~~~~~~~~~~~^~~


vim +/_dev_err +1012 drivers/net/ethernet/cavium/thunder/thunder_bgx.c

   995	
   996	static void bgx_poll_for_link(struct work_struct *work)
   997	{
   998		struct lmac *lmac;
   999		u64 spu_link, smu_link;
  1000	
  1001		lmac = container_of(work, struct lmac, dwork.work);
  1002		if (lmac->is_sgmii) {
  1003			bgx_poll_for_sgmii_link(lmac);
  1004			return;
  1005		}
  1006	
  1007		/* Receive link is latching low. Force it high and verify it */
  1008		bgx_reg_modify(lmac->bgx, lmac->lmacid,
  1009			       BGX_SPUX_STATUS1, SPU_STATUS1_RCV_LNK);
  1010		if (bgx_poll_reg(lmac->bgx, lmac->lmacid, BGX_SPUX_STATUS1,
  1011				 SPU_STATUS1_RCV_LNK, false))
> 1012			dev_err(lmac->bgx->pdev->dev, "BXG verification fail with time out.\n");
  1013	
  1014		spu_link = bgx_reg_read(lmac->bgx, lmac->lmacid, BGX_SPUX_STATUS1);
  1015		smu_link = bgx_reg_read(lmac->bgx, lmac->lmacid, BGX_SMUX_RX_CTL);
  1016	
  1017		if ((spu_link & SPU_STATUS1_RCV_LNK) &&
  1018		    !(smu_link & SMU_RX_CTL_STATUS)) {
  1019			lmac->link_up = true;
  1020			if (lmac->lmac_type == BGX_MODE_XLAUI)
  1021				lmac->last_speed = SPEED_40000;
  1022			else
  1023				lmac->last_speed = SPEED_10000;
  1024			lmac->last_duplex = DUPLEX_FULL;
  1025		} else {
  1026			lmac->link_up = false;
  1027			lmac->last_speed = SPEED_UNKNOWN;
  1028			lmac->last_duplex = DUPLEX_UNKNOWN;
  1029		}
  1030	
  1031		if (lmac->last_link != lmac->link_up) {
  1032			if (lmac->link_up) {
  1033				if (bgx_xaui_check_link(lmac)) {
  1034					/* Errors, clear link_up state */
  1035					lmac->link_up = false;
  1036					lmac->last_speed = SPEED_UNKNOWN;
  1037					lmac->last_duplex = DUPLEX_UNKNOWN;
  1038				}
  1039			}
  1040			lmac->last_link = lmac->link_up;
  1041		}
  1042	
  1043		queue_delayed_work(lmac->check_link, &lmac->dwork, HZ * 2);
  1044	}
  1045	

-- 
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