tree: git://git.armlinux.org.uk/~rmk/linux-arm zii
head: 28658ad93ab45ff81673c0013df944af7744337a
commit: 1eb84c0b5d28dc19668b17a389e0884c5ded3e1b [52/97] net: phy: marvell10g: add
downshift tunable support
config: sh-allmodconfig (attached as .config)
compiler: sh4-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
git checkout 1eb84c0b5d28dc19668b17a389e0884c5ded3e1b
# save the attached .config to linux build tree
GCC_VERSION=9.3.0 make.cross ARCH=sh
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/net/phy/marvell10g.c: In function 'mv3310_get_downshift':
> drivers/net/phy/marvell10g.c:301:13: error: implicit declaration
of function 'FIELD_GET'; did you mean 'FOLL_GET'?
[-Werror=implicit-function-declaration]
301 | *ds = 1 +
FIELD_GET(MV_PCS_DSC1_10GBT, (u16)val);
| ^~~~~~~~~
| FOLL_GET
drivers/net/phy/marvell10g.c: In function 'mv3310_set_downshift':
> drivers/net/phy/marvell10g.c:330:8: error: implicit declaration
of function 'FIELD_PREP' [-Werror=implicit-function-declaration]
330 |
val = FIELD_PREP(MV_PCS_DSC2_2P5G, ds);
| ^~~~~~~~~~
cc1: some warnings being treated as errors
vim +301 drivers/net/phy/marvell10g.c
286
287 static int mv3310_get_downshift(struct phy_device *phydev, u8 *ds)
288 {
289 struct mv3310_priv *priv = dev_get_drvdata(&phydev->mdio.dev);
290 int val;
291
292 if (priv->firmware_ver < MV_VERSION(0,3,5,0))
293 return -EOPNOTSUPP;
294
295 val = phy_read_mmd(phydev, MDIO_MMD_PCS, MV_PCS_DSC1);
296 if (val < 0)
297 return val;
298
299 if (val & MV_PCS_DSC1_ENABLE)
300 /* assume that all fields are the same */
301 *ds = 1 + FIELD_GET(MV_PCS_DSC1_10GBT, (u16)val);
302 else
303 *ds = DOWNSHIFT_DEV_DISABLE;
304
305 return 0;
306 }
307
308 static int mv3310_set_downshift(struct phy_device *phydev, u8 ds)
309 {
310 struct mv3310_priv *priv = dev_get_drvdata(&phydev->mdio.dev);
311 u16 val;
312 int err;
313
314 /* Fails to downshift with v0.3.5.0 and earlier */
315 if (priv->firmware_ver < MV_VERSION(0,3,5,0))
316 return -EOPNOTSUPP;
317
318 if (ds == DOWNSHIFT_DEV_DISABLE)
319 return phy_clear_bits_mmd(phydev, MDIO_MMD_PCS, MV_PCS_DSC1,
320 MV_PCS_DSC1_ENABLE);
321
322 /* FIXME: The default is disabled, so should we disable? */
323 if (ds == DOWNSHIFT_DEV_DEFAULT_COUNT)
324 ds = 2;
325
326 if (ds > 8)
327 return -E2BIG;
328
329 ds -= 1;
330 val = FIELD_PREP(MV_PCS_DSC2_2P5G, ds);
331 val |=
FIELD_PREP(MV_PCS_DSC2_5G, ds);
332 err = phy_modify_mmd(phydev, MDIO_MMD_PCS, MV_PCS_DSC2,
333 MV_PCS_DSC2_2P5G | MV_PCS_DSC2_5G, val);
334 if (err < 0)
335 return err;
336
337 val = MV_PCS_DSC1_ENABLE;
338 val |= FIELD_PREP(MV_PCS_DSC1_10GBT, ds);
339 val |= FIELD_PREP(MV_PCS_DSC1_1GBR, ds);
340 val |= FIELD_PREP(MV_PCS_DSC1_100BTX, ds);
341
342 return phy_modify_mmd(phydev, MDIO_MMD_PCS, MV_PCS_DSC1,
343 MV_PCS_DSC1_ENABLE | MV_PCS_DSC1_10GBT |
344 MV_PCS_DSC1_1GBR | MV_PCS_DSC1_100BTX, val);
345 }
346
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org