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] [thread-next>] [day] [month] [year] [list]
Message-ID: <aXI-ZMbwXHBX4XiT@pie>
Date: Thu, 22 Jan 2026 15:12:36 +0000
From: Yao Zi <me@...ao.cc>
To: Chukun Pan <amadeus@....edu.cn>, Vivian Wang <wangruikang@...as.ac.cn>,
	Yixun Lan <dlan@...nel.org>
Cc: Paolo Abeni <pabeni@...hat.com>, Jakub Kicinski <kuba@...nel.org>,
	Eric Dumazet <edumazet@...gle.com>,
	Andrew Lunn <andrew+netdev@...n.ch>,
	"David S . Miller" <davem@...emloft.net>,
	linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
	spacemit@...ts.linux.dev, netdev@...r.kernel.org
Subject: Re: [PATCH 1/1] net: spacemit: display phy driver information

On Thu, Jan 22, 2026 at 04:00:01PM +0800, Chukun Pan wrote:
> Print the PHY driver used and interrupt status after connection.
> 
> Signed-off-by: Chukun Pan <amadeus@....edu.cn>
> ---
>  drivers/net/ethernet/spacemit/k1_emac.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/net/ethernet/spacemit/k1_emac.c b/drivers/net/ethernet/spacemit/k1_emac.c
> index c85dc742c404..afb5b6a61c2c 100644
> --- a/drivers/net/ethernet/spacemit/k1_emac.c
> +++ b/drivers/net/ethernet/spacemit/k1_emac.c
> @@ -1568,6 +1568,7 @@ static int emac_phy_connect(struct net_device *ndev)
>  	struct device *dev = &priv->pdev->dev;
>  	struct phy_device *phydev;
>  	struct device_node *np;
> +	char *irq_str;
>  	int ret;
>  
>  	ret = of_get_phy_mode(dev->of_node, &priv->phy_interface);
> @@ -1610,6 +1611,11 @@ static int emac_phy_connect(struct net_device *ndev)
>  		goto err_node_put;
>  	}
>  
> +	irq_str = phy_attached_info_irq(phydev);
> +	netdev_info(ndev, "PHY driver [%s] (irq=%s)\n",
> +		    phydev->drv->name, irq_str);
> +	kfree(irq_str);

Would phy_attached_print() simplify the code?

Regards,
Yao Zi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ