Re: [PATCH net-next 2/4] mlx4: Use MLX4_ATTR_CABLE_INFO instead of 0xFF60 magic value

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

 



Hi Krzysztof,

kernel test robot noticed the following build errors:

[auto build test ERROR on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Krzysztof-Ol-dzki/mlx4-Use-MLX4_ATTR_CABLE_INFO-instead-of-0xFF60-magic-value/20240912-144426
base:   net-next/main
patch link:    https://lore.kernel.org/r/12a1d143-35d6-43f3-b8b3-ab0198f5540a%40ans.pl
patch subject: [PATCH net-next 2/4] mlx4: Use MLX4_ATTR_CABLE_INFO instead of 0xFF60 magic value
config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20240913/202409131225.ZqIX7nce-lkp@xxxxxxxxx/config)
compiler: loongarch64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240913/202409131225.ZqIX7nce-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409131225.ZqIX7nce-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   drivers/infiniband/hw/mlx4/main.c: In function 'ib_link_query_port':
>> drivers/infiniband/hw/mlx4/main.c:722:35: error: 'MLX4_ATTR_EXTENDED_PORT_INFO' undeclared (first use in this function)
     722 |                 in_mad->attr_id = MLX4_ATTR_EXTENDED_PORT_INFO;
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/infiniband/hw/mlx4/main.c:722:35: note: each undeclared identifier is reported only once for each function it appears in


vim +/MLX4_ATTR_EXTENDED_PORT_INFO +722 drivers/infiniband/hw/mlx4/main.c

225c7b1feef1b4 Roland Dreier    2007-05-08  654  
1fb7f8973f51ca Mark Bloch       2021-03-01  655  static int ib_link_query_port(struct ib_device *ibdev, u32 port,
0a9a01884d447c Jack Morgenstein 2012-08-03  656  			      struct ib_port_attr *props, int netw_view)
fa417f7b520ee6 Eli Cohen        2010-10-24  657  {
a45e5f1859579f Ruan Jinjie      2023-07-28  658  	struct ib_smp *in_mad;
a45e5f1859579f Ruan Jinjie      2023-07-28  659  	struct ib_smp *out_mad;
a5e12dff757b56 Marcel Apfelbaum 2011-10-03  660  	int ext_active_speed;
0a9a01884d447c Jack Morgenstein 2012-08-03  661  	int mad_ifc_flags = MLX4_MAD_IFC_IGNORE_KEYS;
a9c766bb75ee2c Or Gerlitz       2012-01-11  662  	int err = -ENOMEM;
a9c766bb75ee2c Or Gerlitz       2012-01-11  663  
a9c766bb75ee2c Or Gerlitz       2012-01-11  664  	in_mad  = kzalloc(sizeof *in_mad, GFP_KERNEL);
a9c766bb75ee2c Or Gerlitz       2012-01-11  665  	out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL);
a9c766bb75ee2c Or Gerlitz       2012-01-11  666  	if (!in_mad || !out_mad)
a9c766bb75ee2c Or Gerlitz       2012-01-11  667  		goto out;
a9c766bb75ee2c Or Gerlitz       2012-01-11  668  
d82e2b27ad3a4f Leon Romanovsky  2022-01-05  669  	ib_init_query_mad(in_mad);
a9c766bb75ee2c Or Gerlitz       2012-01-11  670  	in_mad->attr_id  = IB_SMP_ATTR_PORT_INFO;
a9c766bb75ee2c Or Gerlitz       2012-01-11  671  	in_mad->attr_mod = cpu_to_be32(port);
a9c766bb75ee2c Or Gerlitz       2012-01-11  672  
0a9a01884d447c Jack Morgenstein 2012-08-03  673  	if (mlx4_is_mfunc(to_mdev(ibdev)->dev) && netw_view)
0a9a01884d447c Jack Morgenstein 2012-08-03  674  		mad_ifc_flags |= MLX4_MAD_IFC_NET_VIEW;
0a9a01884d447c Jack Morgenstein 2012-08-03  675  
0a9a01884d447c Jack Morgenstein 2012-08-03  676  	err = mlx4_MAD_IFC(to_mdev(ibdev), mad_ifc_flags, port, NULL, NULL,
a9c766bb75ee2c Or Gerlitz       2012-01-11  677  				in_mad, out_mad);
a9c766bb75ee2c Or Gerlitz       2012-01-11  678  	if (err)
a9c766bb75ee2c Or Gerlitz       2012-01-11  679  		goto out;
a9c766bb75ee2c Or Gerlitz       2012-01-11  680  
a5e12dff757b56 Marcel Apfelbaum 2011-10-03  681  
225c7b1feef1b4 Roland Dreier    2007-05-08  682  	props->lid		= be16_to_cpup((__be16 *) (out_mad->data + 16));
225c7b1feef1b4 Roland Dreier    2007-05-08  683  	props->lmc		= out_mad->data[34] & 0x7;
225c7b1feef1b4 Roland Dreier    2007-05-08  684  	props->sm_lid		= be16_to_cpup((__be16 *) (out_mad->data + 18));
225c7b1feef1b4 Roland Dreier    2007-05-08  685  	props->sm_sl		= out_mad->data[36] & 0xf;
225c7b1feef1b4 Roland Dreier    2007-05-08  686  	props->state		= out_mad->data[32] & 0xf;
225c7b1feef1b4 Roland Dreier    2007-05-08  687  	props->phys_state	= out_mad->data[33] >> 4;
225c7b1feef1b4 Roland Dreier    2007-05-08  688  	props->port_cap_flags	= be32_to_cpup((__be32 *) (out_mad->data + 20));
0a9a01884d447c Jack Morgenstein 2012-08-03  689  	if (netw_view)
0a9a01884d447c Jack Morgenstein 2012-08-03  690  		props->gid_tbl_len = out_mad->data[50];
0a9a01884d447c Jack Morgenstein 2012-08-03  691  	else
5ae2a7a836be66 Roland Dreier    2007-06-18  692  		props->gid_tbl_len = to_mdev(ibdev)->dev->caps.gid_table_len[port];
149983af609e8f Dotan Barak      2007-06-26  693  	props->max_msg_sz	= to_mdev(ibdev)->dev->caps.max_msg_sz;
5ae2a7a836be66 Roland Dreier    2007-06-18  694  	props->pkey_tbl_len	= to_mdev(ibdev)->dev->caps.pkey_table_len[port];
225c7b1feef1b4 Roland Dreier    2007-05-08  695  	props->bad_pkey_cntr	= be16_to_cpup((__be16 *) (out_mad->data + 46));
225c7b1feef1b4 Roland Dreier    2007-05-08  696  	props->qkey_viol_cntr	= be16_to_cpup((__be16 *) (out_mad->data + 48));
225c7b1feef1b4 Roland Dreier    2007-05-08  697  	props->active_width	= out_mad->data[31] & 0xf;
225c7b1feef1b4 Roland Dreier    2007-05-08  698  	props->active_speed	= out_mad->data[35] >> 4;
225c7b1feef1b4 Roland Dreier    2007-05-08  699  	props->max_mtu		= out_mad->data[41] & 0xf;
225c7b1feef1b4 Roland Dreier    2007-05-08  700  	props->active_mtu	= out_mad->data[36] >> 4;
225c7b1feef1b4 Roland Dreier    2007-05-08  701  	props->subnet_timeout	= out_mad->data[51] & 0x1f;
225c7b1feef1b4 Roland Dreier    2007-05-08  702  	props->max_vl_num	= out_mad->data[37] >> 4;
225c7b1feef1b4 Roland Dreier    2007-05-08  703  	props->init_type_reply	= out_mad->data[41] >> 4;
225c7b1feef1b4 Roland Dreier    2007-05-08  704  
a5e12dff757b56 Marcel Apfelbaum 2011-10-03  705  	/* Check if extended speeds (EDR/FDR/...) are supported */
a5e12dff757b56 Marcel Apfelbaum 2011-10-03  706  	if (props->port_cap_flags & IB_PORT_EXTENDED_SPEEDS_SUP) {
a5e12dff757b56 Marcel Apfelbaum 2011-10-03  707  		ext_active_speed = out_mad->data[62] >> 4;
a5e12dff757b56 Marcel Apfelbaum 2011-10-03  708  
a5e12dff757b56 Marcel Apfelbaum 2011-10-03  709  		switch (ext_active_speed) {
a5e12dff757b56 Marcel Apfelbaum 2011-10-03  710  		case 1:
2e96691c31ecf7 Or Gerlitz       2012-02-28  711  			props->active_speed = IB_SPEED_FDR;
a5e12dff757b56 Marcel Apfelbaum 2011-10-03  712  			break;
a5e12dff757b56 Marcel Apfelbaum 2011-10-03  713  		case 2:
2e96691c31ecf7 Or Gerlitz       2012-02-28  714  			props->active_speed = IB_SPEED_EDR;
a5e12dff757b56 Marcel Apfelbaum 2011-10-03  715  			break;
a5e12dff757b56 Marcel Apfelbaum 2011-10-03  716  		}
a5e12dff757b56 Marcel Apfelbaum 2011-10-03  717  	}
a5e12dff757b56 Marcel Apfelbaum 2011-10-03  718  
a5e12dff757b56 Marcel Apfelbaum 2011-10-03  719  	/* If reported active speed is QDR, check if is FDR-10 */
2e96691c31ecf7 Or Gerlitz       2012-02-28  720  	if (props->active_speed == IB_SPEED_QDR) {
d82e2b27ad3a4f Leon Romanovsky  2022-01-05  721  		ib_init_query_mad(in_mad);
a5e12dff757b56 Marcel Apfelbaum 2011-10-03 @722  		in_mad->attr_id = MLX4_ATTR_EXTENDED_PORT_INFO;
a5e12dff757b56 Marcel Apfelbaum 2011-10-03  723  		in_mad->attr_mod = cpu_to_be32(port);
a5e12dff757b56 Marcel Apfelbaum 2011-10-03  724  
0a9a01884d447c Jack Morgenstein 2012-08-03  725  		err = mlx4_MAD_IFC(to_mdev(ibdev), mad_ifc_flags, port,
a5e12dff757b56 Marcel Apfelbaum 2011-10-03  726  				   NULL, NULL, in_mad, out_mad);
a5e12dff757b56 Marcel Apfelbaum 2011-10-03  727  		if (err)
bf6b47deb40f9f Jesper Juhl      2012-04-11  728  			goto out;
a5e12dff757b56 Marcel Apfelbaum 2011-10-03  729  
a5e12dff757b56 Marcel Apfelbaum 2011-10-03  730  		/* Checking LinkSpeedActive for FDR-10 */
a5e12dff757b56 Marcel Apfelbaum 2011-10-03  731  		if (out_mad->data[15] & 0x1)
2e96691c31ecf7 Or Gerlitz       2012-02-28  732  			props->active_speed = IB_SPEED_FDR10;
a5e12dff757b56 Marcel Apfelbaum 2011-10-03  733  	}
d2ef406866620f Or Gerlitz       2012-04-02  734  
d2ef406866620f Or Gerlitz       2012-04-02  735  	/* Avoid wrong speed value returned by FW if the IB link is down. */
d2ef406866620f Or Gerlitz       2012-04-02  736  	if (props->state == IB_PORT_DOWN)
d2ef406866620f Or Gerlitz       2012-04-02  737  		 props->active_speed = IB_SPEED_SDR;
d2ef406866620f Or Gerlitz       2012-04-02  738  
a9c766bb75ee2c Or Gerlitz       2012-01-11  739  out:
a9c766bb75ee2c Or Gerlitz       2012-01-11  740  	kfree(in_mad);
a9c766bb75ee2c Or Gerlitz       2012-01-11  741  	kfree(out_mad);
a9c766bb75ee2c Or Gerlitz       2012-01-11  742  	return err;
fa417f7b520ee6 Eli Cohen        2010-10-24  743  }
fa417f7b520ee6 Eli Cohen        2010-10-24  744  

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




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux