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: <20240913.065543.2091600194424222387.fujita.tomonori@gmail.com>
Date: Fri, 13 Sep 2024 06:55:43 +0000 (UTC)
From: FUJITA Tomonori <fujita.tomonori@...il.com>
To: hfdevel@....net
Cc: netdev@...r.kernel.org, andrew@...n.ch, hkallweit1@...il.com,
 linux@...linux.org.uk, fujita.tomonori@...il.com, davem@...emloft.net,
 edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com
Subject: Re: [PATCH net-next 5/5] net: tn40xx: register swnode and connect
 it to the mdiobus

Hi,
Thanks a lot for the work!

On Wed, 11 Sep 2024 21:34:47 +0200
Hans-Frieder Vogt <hfdevel@....net> wrote:

> diff --git a/drivers/net/ethernet/tehuti/tn40.c b/drivers/net/ethernet/tehuti/tn40.c
> index 4e6f2f781ffc..240a79a08d58 100644
> --- a/drivers/net/ethernet/tehuti/tn40.c
> +++ b/drivers/net/ethernet/tehuti/tn40.c
> @@ -1781,7 +1781,7 @@ static int tn40_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  	ret = tn40_phy_register(priv);
>  	if (ret) {
>  		dev_err(&pdev->dev, "failed to set up PHY.\n");
> -		goto err_free_irq;
> +		goto err_unregister_swnodes;
>  	}
> 
>  	ret = tn40_priv_init(priv);
> @@ -1798,6 +1798,10 @@ static int tn40_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  	return 0;
>  err_unregister_phydev:
>  	tn40_phy_unregister(priv);
> +err_unregister_swnodes:
> +	device_remove_software_node(&priv->mdio->dev);
> +	software_node_unregister_node_group(priv->nodes.group);
> +	software_node_unregister(priv->nodes.group[SWNODE_MDIO]);

Why this workaround is necessary? The problem lies on software node
side?


> diff --git a/drivers/net/ethernet/tehuti/tn40_mdio.c b/drivers/net/ethernet/tehuti/tn40_mdio.c
> index af18615d64a8..bbd95fabbea0 100644
> --- a/drivers/net/ethernet/tehuti/tn40_mdio.c
> +++ b/drivers/net/ethernet/tehuti/tn40_mdio.c
> @@ -14,6 +14,8 @@
>  	 (FIELD_PREP(TN40_MDIO_PRTAD_MASK, (port))))
>  #define TN40_MDIO_CMD_READ BIT(15)
> 
> +#define AQR105_FIRMWARE "tehuti/aqr105-tn40xx.cld"

This firmware is for AQR PHY so aquantia directory is the better
place?


> +static int tn40_swnodes_register(struct tn40_priv *priv)
> +{
> +	struct tn40_nodes *nodes = &priv->nodes;
> +	struct pci_dev *pdev = priv->pdev;
> +	struct software_node *swnodes;
> +	u32 id;
> +
> +	id = pci_dev_id(pdev);
> +
> +	snprintf(nodes->phy_name, sizeof(nodes->phy_name), "tn40_aqr105_phy");

This doesn't work on a system having multiple TN40 cards because it
tries create duplicated sysfs directory.

I uses a machine with TN9310 (QT2025 PHY) and TN9510 (AQR105 PHY).


> +MODULE_FIRMWARE(AQR105_FIRMWARE);

AQR PHY driver better to have the above? Otherwise, how about adding
it to tn40.c? It already has MODULE_FIRMWARE(TN40_FIRMWARE_NAME).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ