RE: [PATCH v5 net-next 07/13] net: enetc: remove ERR050089 workaround for i.MX95

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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.

Okay, I will refine it






[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux