All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Oleksij Rempel <o.rempel@pengutronix.de>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Woojung Huh <woojung.huh@microchip.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Russell King <rmk+kernel@armlinux.org.uk>,
	Thangaraj Samynathan <Thangaraj.S@microchip.com>,
	Rengarajan Sundararajan <Rengarajan.S@microchip.com>
Cc: oe-kbuild-all@lists.linux.dev, netdev@vger.kernel.org,
	Oleksij Rempel <o.rempel@pengutronix.de>,
	kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	UNGLinuxDriver@microchip.com, Phil Elwell <phil@raspberrypi.org>
Subject: Re: [PATCH net-next v3 1/7] net: usb: lan78xx: Convert to PHYlink for improved PHY and MAC management
Date: Sat, 15 Mar 2025 11:48:15 +0800	[thread overview]
Message-ID: <202503151113.AFty2HdH-lkp@intel.com> (raw)
In-Reply-To: <20250310115737.784047-2-o.rempel@pengutronix.de>

Hi Oleksij,

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/Oleksij-Rempel/net-usb-lan78xx-Convert-to-PHYlink-for-improved-PHY-and-MAC-management/20250310-200116
base:   net-next/main
patch link:    https://lore.kernel.org/r/20250310115737.784047-2-o.rempel%40pengutronix.de
patch subject: [PATCH net-next v3 1/7] net: usb: lan78xx: Convert to PHYlink for improved PHY and MAC management
config: i386-randconfig-006-20250315 (https://download.01.org/0day-ci/archive/20250315/202503151113.AFty2HdH-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250315/202503151113.AFty2HdH-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503151113.AFty2HdH-lkp@intel.com/

All errors (new ones prefixed by >>):

   ld: drivers/net/usb/lan78xx.o: in function `lan78xx_phy_init':
>> drivers/net/usb/lan78xx.c:2683: undefined reference to `phylink_connect_phy'
>> ld: drivers/net/usb/lan78xx.c:2651: undefined reference to `phylink_set_fixed_link'
   ld: drivers/net/usb/lan78xx.o: in function `lan78xx_open':
>> drivers/net/usb/lan78xx.c:3280: undefined reference to `phylink_start'
   ld: drivers/net/usb/lan78xx.o: in function `lan78xx_stop':
>> drivers/net/usb/lan78xx.c:3350: undefined reference to `phylink_stop'
   ld: drivers/net/usb/lan78xx.o: in function `lan78xx_disconnect':
   drivers/net/usb/lan78xx.c:4375: undefined reference to `phylink_stop'
>> ld: drivers/net/usb/lan78xx.c:4376: undefined reference to `phylink_disconnect_phy'
>> ld: drivers/net/usb/lan78xx.c:4387: undefined reference to `phylink_destroy'
   ld: drivers/net/usb/lan78xx.o: in function `lan78xx_phylink_setup':
>> drivers/net/usb/lan78xx.c:2621: undefined reference to `phylink_create'
   ld: drivers/net/usb/lan78xx.o: in function `lan78xx_probe':
>> drivers/net/usb/lan78xx.c:4609: undefined reference to `phylink_disconnect_phy'
   ld: drivers/net/usb/lan78xx.c:4611: undefined reference to `phylink_destroy'
   ld: drivers/net/usb/lan78xx.o: in function `lan78xx_reset_resume':
   drivers/net/usb/lan78xx.c:5173: undefined reference to `phylink_start'


vim +2683 drivers/net/usb/lan78xx.c

  2599	
  2600	static int lan78xx_phylink_setup(struct lan78xx_net *dev)
  2601	{
  2602		struct phylink_config *pc = &dev->phylink_config;
  2603		phy_interface_t link_interface;
  2604		struct phylink *phylink;
  2605	
  2606		pc->dev = &dev->net->dev;
  2607		pc->type = PHYLINK_NETDEV;
  2608		pc->mac_capabilities = MAC_SYM_PAUSE | MAC_ASYM_PAUSE | MAC_10 |
  2609				       MAC_100 | MAC_1000FD;
  2610		pc->mac_managed_pm = true;
  2611	
  2612		if (dev->chipid == ID_REV_CHIP_ID_7801_) {
  2613			phy_interface_set_rgmii(pc->supported_interfaces);
  2614			link_interface = PHY_INTERFACE_MODE_RGMII_ID;
  2615		} else {
  2616			__set_bit(PHY_INTERFACE_MODE_INTERNAL,
  2617				  pc->supported_interfaces);
  2618			link_interface = PHY_INTERFACE_MODE_INTERNAL;
  2619		}
  2620	
> 2621		phylink = phylink_create(pc, dev->net->dev.fwnode,
  2622					 link_interface, &lan78xx_phylink_mac_ops);
  2623		if (IS_ERR(phylink))
  2624			return PTR_ERR(phylink);
  2625	
  2626		dev->phylink = phylink;
  2627	
  2628		return 0;
  2629	}
  2630	
  2631	static int lan78xx_phy_init(struct lan78xx_net *dev)
  2632	{
  2633		struct phy_device *phydev;
  2634		int ret;
  2635	
  2636		switch (dev->chipid) {
  2637		case ID_REV_CHIP_ID_7801_:
  2638			phydev = lan7801_phy_init(dev);
  2639			/* If no PHY found, set fixed link, probably there is no
  2640			 * device or some kind of different device like switch.
  2641			 * For example: EVB-KSZ9897-1 (KSZ9897 switch evaluation board
  2642			 * with LAN7801 & KSZ9031)
  2643			 */
  2644			if (!phydev) {
  2645				struct phylink_link_state state = {
  2646					.speed = SPEED_1000,
  2647					.duplex = DUPLEX_FULL,
  2648					.interface = PHY_INTERFACE_MODE_RGMII,
  2649				};
  2650	
> 2651				ret = phylink_set_fixed_link(dev->phylink, &state);
  2652				if (ret)
  2653					netdev_err(dev->net, "Could not set fixed link\n");
  2654	
  2655				return ret;
  2656			}
  2657	
  2658			break;
  2659	
  2660		case ID_REV_CHIP_ID_7800_:
  2661		case ID_REV_CHIP_ID_7850_:
  2662			phydev = phy_find_first(dev->mdiobus);
  2663			if (!phydev) {
  2664				netdev_err(dev->net, "no PHY found\n");
  2665				return -EIO;
  2666			}
  2667			phydev->is_internal = true;
  2668			phydev->interface = PHY_INTERFACE_MODE_GMII;
  2669			break;
  2670	
  2671		default:
  2672			netdev_err(dev->net, "Unknown CHIP ID found\n");
  2673			return -EIO;
  2674		}
  2675	
  2676		/* if phyirq is not set, use polling mode in phylib */
  2677		if (dev->domain_data.phyirq > 0)
  2678			phydev->irq = dev->domain_data.phyirq;
  2679		else
  2680			phydev->irq = PHY_POLL;
  2681		netdev_dbg(dev->net, "phydev->irq = %d\n", phydev->irq);
  2682	
> 2683		ret = phylink_connect_phy(dev->phylink, phydev);
  2684		if (ret) {
  2685			netdev_err(dev->net, "can't attach PHY to %s\n",
  2686				   dev->mdiobus->id);
  2687			return -EIO;
  2688		}
  2689	
  2690		phy_support_eee(phydev);
  2691	
  2692		if (phydev->mdio.dev.of_node) {
  2693			u32 reg;
  2694			int len;
  2695	
  2696			len = of_property_count_elems_of_size(phydev->mdio.dev.of_node,
  2697							      "microchip,led-modes",
  2698							      sizeof(u32));
  2699			if (len >= 0) {
  2700				/* Ensure the appropriate LEDs are enabled */
  2701				lan78xx_read_reg(dev, HW_CFG, &reg);
  2702				reg &= ~(HW_CFG_LED0_EN_ |
  2703					 HW_CFG_LED1_EN_ |
  2704					 HW_CFG_LED2_EN_ |
  2705					 HW_CFG_LED3_EN_);
  2706				reg |= (len > 0) * HW_CFG_LED0_EN_ |
  2707					(len > 1) * HW_CFG_LED1_EN_ |
  2708					(len > 2) * HW_CFG_LED2_EN_ |
  2709					(len > 3) * HW_CFG_LED3_EN_;
  2710				lan78xx_write_reg(dev, HW_CFG, reg);
  2711			}
  2712		}
  2713	
  2714		return 0;
  2715	}
  2716	

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

  reply	other threads:[~2025-03-15  3:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-10 11:57 [PATCH net-next v3 0/7] Convert LAN78xx to PHYLINK Oleksij Rempel
2025-03-10 11:57 ` [PATCH net-next v3 1/7] net: usb: lan78xx: Convert to PHYlink for improved PHY and MAC management Oleksij Rempel
2025-03-15  3:48   ` kernel test robot [this message]
2025-03-17 15:36   ` Simon Horman
2025-03-18  5:07     ` Oleksij Rempel
2025-03-10 11:57 ` [PATCH net-next v3 2/7] net: usb: lan78xx: improve error reporting on PHY attach failure Oleksij Rempel
2025-03-10 11:57 ` [PATCH net-next v3 3/7] net: usb: lan78xx: Improve error handling for PHY init path Oleksij Rempel
2025-03-10 11:57 ` [PATCH net-next v3 4/7] net: usb: lan78xx: Use ethtool_op_get_link to reflect current link status Oleksij Rempel
2025-03-11 17:04   ` Maxime Chevallier
2025-03-10 11:57 ` [PATCH net-next v3 5/7] net: usb: lan78xx: port link settings to phylink API Oleksij Rempel
2025-03-11 17:11   ` Maxime Chevallier
2025-03-15  7:16   ` kernel test robot
2025-03-10 11:57 ` [PATCH net-next v3 6/7] net: usb: lan78xx: Transition get/set_pause to phylink Oleksij Rempel
2025-03-11 17:31   ` Maxime Chevallier
2025-03-15 10:58   ` kernel test robot
2025-03-10 11:57 ` [PATCH net-next v3 7/7] net: usb: lan78xx: Integrate EEE support with phylink LPI API Oleksij Rempel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202503151113.AFty2HdH-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Rengarajan.S@microchip.com \
    --cc=Thangaraj.S@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=phil@raspberrypi.org \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=woojung.huh@microchip.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.