From: Hans-Frieder Vogt <hfdevel@gmx.net>
To: Ratheesh Kannoth <rkannoth@marvell.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
FUJITA Tomonori <fujita.tomonori@gmail.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v5 5/7] net: tn40xx: create swnode for mdio and aqr105 phy and add to mdiobus
Date: Mon, 24 Feb 2025 19:11:39 +0100 [thread overview]
Message-ID: <355d0805-61df-4834-a266-e74117e21302@gmx.net> (raw)
In-Reply-To: <20250224040838.GA1655046@maili.marvell.com>
Hi Kannoth,
On 24.02.2025 05.08, Ratheesh Kannoth wrote:
> On 2025-02-22 at 15:19:32, Hans-Frieder Vogt via B4 Relay (devnull+hfdevel.gmx.net@kernel.org) wrote:
>> From: Hans-Frieder Vogt <hfdevel@gmx.net>
>> int tn40_mdiobus_init(struct tn40_priv *priv)
>> {
>> struct pci_dev *pdev = priv->pdev;
>> @@ -129,14 +181,36 @@ int tn40_mdiobus_init(struct tn40_priv *priv)
>>
>> bus->read_c45 = tn40_mdio_read_c45;
>> bus->write_c45 = tn40_mdio_write_c45;
>> + priv->mdio = bus;
>> +
>> + /* provide swnodes for AQR105-based cards only */
>> + if (pdev->device == 0x4025) {
>> + ret = tn40_swnodes_register(priv);
>> + if (ret) {
>> + pr_err("swnodes failed\n");
>> + return ret;
>> + }
>> +
>> + ret = device_add_software_node(&bus->dev,
>> + priv->nodes.group[SWNODE_MDIO]);
>> + if (ret) {
>> + dev_err(&pdev->dev,
>> + "device_add_software_node failed: %d\n", ret);
> No need to return on this error ?
Good catch. Yes, indeed, all TN4010-based cards that I know of need to
load the firmware from
the filesystem. And this will only work if the software node is
available to provide a file
name.
I'll add a
return ret;
in the next version.
>> + }
>> + }
>>
>> ret = devm_mdiobus_register(&pdev->dev, bus);
>> if (ret) {
>> dev_err(&pdev->dev, "failed to register mdiobus %d %u %u\n",
>> ret, bus->state, MDIOBUS_UNREGISTERED);
>> - return ret;
>> + goto err_swnodes_cleanup;
>> }
>> tn40_mdio_set_speed(priv, TN40_MDIO_SPEED_6MHZ);
>> - priv->mdio = bus;
>> return 0;
>> +
>> +err_swnodes_cleanup:
> No need to call device_remove_software_node() ?
It is called from tn40_swnodes_cleanup.
>> + tn40_swnodes_cleanup(priv);
>> + return ret;
>> }
>> +
>> +MODULE_FIRMWARE(AQR105_FIRMWARE);
>>
>> --
>> 2.47.2
>>
>>
Thanks,
Hans-Frieder
next prev parent reply other threads:[~2025-02-24 18:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-22 9:49 [PATCH net-next v5 0/7] net: tn40xx: add support for AQR105 based cards Hans-Frieder Vogt via B4 Relay
2025-02-22 9:49 ` [PATCH net-next v5 1/7] net: phy: Add swnode support to mdiobus_scan Hans-Frieder Vogt via B4 Relay
2025-02-22 9:49 ` [PATCH net-next v5 2/7] net: phy: aquantia: add probe function to aqr105 for firmware loading Hans-Frieder Vogt via B4 Relay
2025-02-22 9:49 ` [PATCH net-next v5 3/7] net: phy: aquantia: search for firmware-name in fwnode Hans-Frieder Vogt via B4 Relay
2025-02-22 9:49 ` [PATCH net-next v5 4/7] net: phy: aquantia: add essential functions to aqr105 driver Hans-Frieder Vogt via B4 Relay
2025-02-23 10:32 ` Maxime Chevallier
2025-02-23 22:26 ` Hans-Frieder Vogt
2025-02-25 9:38 ` Maxime Chevallier
2025-02-22 9:49 ` [PATCH net-next v5 5/7] net: tn40xx: create swnode for mdio and aqr105 phy and add to mdiobus Hans-Frieder Vogt via B4 Relay
2025-02-24 4:08 ` Ratheesh Kannoth
2025-02-24 18:11 ` Hans-Frieder Vogt [this message]
2025-02-22 9:49 ` [PATCH net-next v5 6/7] net: tn40xx: prepare tn40xx driver to find phy of the TN9510 card Hans-Frieder Vogt via B4 Relay
2025-02-22 9:49 ` [PATCH net-next v5 7/7] net: tn40xx: add pci-id of the aqr105-based Tehuti TN4010 cards Hans-Frieder Vogt via B4 Relay
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=355d0805-61df-4834-a266-e74117e21302@gmx.net \
--to=hfdevel@gmx.net \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fujita.tomonori@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rkannoth@marvell.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®