[Bug 259282] dwc(4) doesn't release resources if phy reset fails

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 19 Oct 2021 18:24:25 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259282

            Bug ID: 259282
           Summary: dwc(4) doesn't release resources if phy reset fails
           Product: Base System
           Version: 11.4-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: nreilly@blackberry.com

if_dwc.c beginning line 1611 in main:

        if (bus_alloc_resources(dev, dwc_spec, sc->res)) {
                device_printf(dev, "could not allocate resources\n");
                return (ENXIO);
        }

        /* Read MAC before reset */
        dwc_get_hwaddr(sc, macaddr);

        /* Reset the PHY if needed */
        if (dwc_reset(dev) != 0) {
                device_printf(dev, "Can't reset the PHY\n");
                return (ENXIO);
        }

If the reset of the PHY fails then the resources are not released.

-- 
You are receiving this mail because:
You are the assignee for the bug.