Date: Sun, 5 Jun 2016 07:56:28 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301435 - head/sys/dev/bwn Message-ID: <201606050756.u557uSHa081614@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Sun Jun 5 07:56:28 2016 New Revision: 301435 URL: https://svnweb.freebsd.org/changeset/base/301435 Log: [bwn] Add missing firmware release calls. This trips me up whenever I'm fooling around with partially supported NICs that fail to fully attach or initialise - the firmware gets loaded and references, but something fails - and the firmware references aren't cleaned up. Modified: head/sys/dev/bwn/if_bwn.c Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Sun Jun 5 07:55:21 2016 (r301434) +++ head/sys/dev/bwn/if_bwn.c Sun Jun 5 07:56:28 2016 (r301435) @@ -750,6 +750,7 @@ bwn_detach(device_t dev) if (mac->mac_msi != 0) pci_release_msi(dev); mbufq_drain(&sc->sc_snd); + bwn_release_firmware(mac); BWN_LOCK_DESTROY(sc); return (0); } @@ -1328,6 +1329,7 @@ bwn_attach_core(struct bwn_mac *mac) siba_dev_down(sc->sc_dev, 0); fail: siba_powerdown(sc->sc_dev); + bwn_release_firmware(mac); return (error); } @@ -3930,6 +3932,7 @@ bwn_fw_gets(struct bwn_mac *mac, enum bw } } else if (rev < 11) { device_printf(sc->sc_dev, "no PCM for rev %d\n", rev); + bwn_release_firmware(mac); return (EOPNOTSUPP); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606050756.u557uSHa081614>