[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241024175128.7pdwpqr4mlok43cb@skbuf>
Date: Thu, 24 Oct 2024 20:51:28 +0300
From: Vladimir Oltean <vladimir.oltean@....com>
To: Wei Fang <wei.fang@....com>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, robh@...nel.org, krzk+dt@...nel.org,
conor+dt@...nel.org, claudiu.manoil@....com, xiaoning.wang@....com,
Frank.Li@....com, christophe.leroy@...roup.eu,
linux@...linux.org.uk, bhelgaas@...gle.com, horms@...nel.org,
imx@...ts.linux.dev, netdev@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-pci@...r.kernel.org, alexander.stein@...tq-group.com
Subject: Re: [PATCH v5 net-next 07/13] net: enetc: remove ERR050089
workaround for i.MX95
On Thu, Oct 24, 2024 at 02:53:22PM +0800, Wei Fang wrote:
> @@ -62,6 +65,12 @@ static int enetc_pci_mdio_probe(struct pci_dev *pdev,
> goto err_pci_mem_reg;
> }
>
> + if (pdev->vendor == PCI_VENDOR_ID_FREESCALE &&
> + pdev->device == ENETC_MDIO_DEV_ID) {
> + static_branch_inc(&enetc_has_err050089);
> + dev_info(&pdev->dev, "Enabled ERR050089 workaround\n");
> + }
> +
> err = of_mdiobus_register(bus, dev->of_node);
> if (err)
> goto err_mdiobus_reg;
If of_mdiobus_register() fails, we should disable the static key.
Perhaps the snippets to enable and disable the static key should be in
helper functions to more easily insert the error teardown logic.
Powered by blists - more mailing lists