[SRU][J:linux-bluefield][PATCH v1 0/1] UBUNTU: SAUCE: mlxbf-gige: support fixed phy for Bobcat

Asmaa Mnebhi asmaa at nvidia.com
Mon Feb 26 17:52:34 UTC 2024


> Hi Asmaa,
> 
> The email title doesn't seem entirely correct ("...v1 0/1..").

Will fix.

> 
> > +       if (device_property_read_bool(&pdev->dev, "fixed-link")) {
> > +               fphy_status.link = 1;
> > +               err = device_property_read_u32(&pdev->dev, "full-duplex",
> &fphy_status.duplex);
> > +               if (err) {
> > +                       dev_err(&pdev->dev, "Failed to get duplex\n");
> > +                       return -EINVAL;
> > +               }
> > +               err = device_property_read_u32(&pdev->dev, "speed",
> &fphy_status.speed);
> > +               if (err) {
> > +                       dev_err(&pdev->dev, "Failed to get speed\n");
> > +                       return -EINVAL;
> > +               }
> > +               err = device_property_read_u32(&pdev->dev, "pause",
> &fphy_status.pause);
> > +               if (err) {
> > +                       dev_err(&pdev->dev, "Failed to get pause\n");
> > +                       return -EINVAL;
> > +               }
> > +               err = device_property_read_u32(&pdev->dev, "asym-pause",
> &fphy_status.asym_pause);
> > +               if (err) {
> > +                       dev_err(&pdev->dev, "Failed to get asym-pause\n");
> > +                       return -EINVAL;
> > +               }
> > +
> > +               phydev = fixed_phy_register(PHY_POLL, &fphy_status, NULL);
> > +               if (IS_ERR(phydev)) {
> > +                       dev_err(&pdev->dev, "Failed to register fixed PHY device\n");
> > +                       err = PTR_ERR(phydev);
> > +                       goto out;
> 
> Shouldn't the driver also do the cleanup ("goto out;") on ACPI table read errors?
> 
ACK. Will fix. Thank you!


More information about the kernel-team mailing list