tree: git://git.armlinux.org.uk/~rmk/linux-arm zii
head: 6f85be7ce3fa31f378cda12c46b787dbfd1b6bc7
commit: 5fbc9160229b7f0144db0ad1159d214bc4cd7787 [1/43] net: mtk_eth_soc: use resolved
link config for PCS PHY
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.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
git remote add linux-arm git://git.armlinux.org.uk/~rmk/linux-arm
git fetch --no-tags linux-arm zii
git checkout 5fbc9160229b7f0144db0ad1159d214bc4cd7787
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/net/ethernet/mediatek/mtk_eth_soc.c:23:
drivers/net/ethernet/mediatek/mtk_eth_soc.c: In function 'mtk_mac_link_up':
> drivers/net/ethernet/mediatek/mtk_eth_soc.c:437:27: error:
'eth' undeclared (first use in this function)
437 | int sid =
(MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_SGMII)) ?
| ^~~
drivers/net/ethernet/mediatek/mtk_eth_soc.h:761:36: note: in definition of macro
'MTK_HAS_CAPS'
761 | #define MTK_HAS_CAPS(caps, _x) (((caps) & (_x)) == (_x))
| ^~~~
drivers/net/ethernet/mediatek/mtk_eth_soc.c:437:27: note: each undeclared identifier is
reported only once for each function it appears in
437 | int sid = (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_SGMII)) ?
| ^~~
drivers/net/ethernet/mediatek/mtk_eth_soc.h:761:36: note: in definition of macro
'MTK_HAS_CAPS'
761 | #define MTK_HAS_CAPS(caps, _x) (((caps) & (_x)) == (_x))
| ^~~~
vim +/eth +437 drivers/net/ethernet/mediatek/mtk_eth_soc.c
425
426 static void mtk_mac_link_up(struct phylink_config *config,
427 struct phy_device *phy,
428 unsigned int mode, phy_interface_t interface,
429 int speed, int duplex, bool tx_pause, bool rx_pause)
430 {
431 struct mtk_mac *mac = container_of(config, struct mtk_mac,
432 phylink_config);
433 u32 mcr = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id));
434
435 if (phy_interface_mode_is_8023z(interface)) {
436 /* Decide how GMAC and SGMIISYS be mapped */
437 int sid = (MTK_HAS_CAPS(eth->soc->caps,
MTK_SHARED_SGMII)) ?
438 0 : mac->id;
439 mtk_sgmii_link_up(eth->sgmii, sid, speed, duplex);
440 }
441
442 mcr &= ~(MAC_MCR_SPEED_100 | MAC_MCR_SPEED_1000 |
443 MAC_MCR_FORCE_DPX | MAC_MCR_FORCE_TX_FC |
444 MAC_MCR_FORCE_RX_FC);
445
446 /* Configure speed */
447 switch (speed) {
448 case SPEED_2500:
449 case SPEED_1000:
450 mcr |= MAC_MCR_SPEED_1000;
451 break;
452 case SPEED_100:
453 mcr |= MAC_MCR_SPEED_100;
454 break;
455 }
456
457 /* Configure duplex */
458 if (duplex == DUPLEX_FULL)
459 mcr |= MAC_MCR_FORCE_DPX;
460
461 /* Configure pause modes - phylink will avoid these for half duplex */
462 if (tx_pause)
463 mcr |= MAC_MCR_FORCE_TX_FC;
464 if (rx_pause)
465 mcr |= MAC_MCR_FORCE_RX_FC;
466
467 mcr |= MAC_MCR_TX_EN | MAC_MCR_RX_EN;
468 mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id));
469 }
470
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org