Date: Thu, 19 May 2016 04:29:25 +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: r300189 - head/sys/dev/bwn Message-ID: <201605190429.u4J4TPSY066242@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Thu May 19 04:29:25 2016 New Revision: 300189 URL: https://svnweb.freebsd.org/changeset/base/300189 Log: [bwn] add extra debugging. Modified: head/sys/dev/bwn/if_bwn.c Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Thu May 19 04:28:49 2016 (r300188) +++ head/sys/dev/bwn/if_bwn.c Thu May 19 04:29:25 2016 (r300189) @@ -2008,6 +2008,8 @@ bwn_core_init(struct bwn_mac *mac) KASSERT(mac->mac_status == BWN_MAC_STATUS_UNINIT, ("%s:%d: fail", __func__, __LINE__)); + DPRINTF(mac->mac_sc, BWN_DEBUG_RESET, "%s: called\n", __func__); + siba_powerup(sc->sc_dev, 0); if (!siba_dev_isup(sc->sc_dev)) bwn_reset_core(mac, mac->mac_phy.gmode); @@ -2041,6 +2043,7 @@ bwn_core_init(struct bwn_mac *mac) if (error) goto fail0; } + DPRINTF(mac->mac_sc, BWN_DEBUG_RESET, "%s: chip_init\n", __func__); error = bwn_chip_init(mac); if (error) goto fail0; @@ -2088,6 +2091,7 @@ bwn_core_init(struct bwn_mac *mac) bwn_spu_setdelay(mac, 1); bwn_bt_enable(mac); + DPRINTF(mac->mac_sc, BWN_DEBUG_RESET, "%s: powerup\n", __func__); siba_powerup(sc->sc_dev, !(siba_sprom_get_bf_lo(sc->sc_dev) & BWN_BFL_CRYSTAL_NOSLOW)); bwn_set_macaddr(mac); @@ -2097,12 +2101,14 @@ bwn_core_init(struct bwn_mac *mac) mac->mac_status = BWN_MAC_STATUS_INITED; + DPRINTF(mac->mac_sc, BWN_DEBUG_RESET, "%s: done\n", __func__); return (error); fail0: siba_powerdown(sc->sc_dev); KASSERT(mac->mac_status == BWN_MAC_STATUS_UNINIT, ("%s:%d: fail", __func__, __LINE__)); + DPRINTF(mac->mac_sc, BWN_DEBUG_RESET, "%s: fail\n", __func__); return (error); } @@ -3716,6 +3722,9 @@ bwn_mac_suspend(struct bwn_mac *mac) KASSERT(mac->mac_suspended >= 0, ("%s:%d: fail", __func__, __LINE__)); + DPRINTF(mac->mac_sc, BWN_DEBUG_RESET, "%s: suspended=%d\n", + __func__, mac->mac_suspended); + if (mac->mac_suspended == 0) { bwn_psctl(mac, BWN_PS_AWAKE); BWN_WRITE_4(mac, BWN_MACCTL, @@ -3746,6 +3755,9 @@ bwn_mac_enable(struct bwn_mac *mac) struct bwn_softc *sc = mac->mac_sc; uint16_t state; + DPRINTF(mac->mac_sc, BWN_DEBUG_RESET, "%s: suspended=%d\n", + __func__, mac->mac_suspended); + state = bwn_shm_read_2(mac, BWN_SHARED, BWN_SHARED_UCODESTAT); if (state != BWN_SHARED_UCODESTAT_SUSPEND && @@ -4783,12 +4795,15 @@ bwn_intr(void *arg) (sc->sc_flags & BWN_FLAG_INVALID)) return (FILTER_STRAY); + DPRINTF(sc, BWN_DEBUG_INTR, "%s: called\n", __func__); + reason = BWN_READ_4(mac, BWN_INTR_REASON); if (reason == 0xffffffff) /* shared IRQ */ return (FILTER_STRAY); reason &= mac->mac_intr_mask; if (reason == 0) return (FILTER_HANDLED); + DPRINTF(sc, BWN_DEBUG_INTR, "%s: reason=0x%08x\n", __func__, reason); mac->mac_reason[0] = BWN_READ_4(mac, BWN_DMA0_REASON) & 0x0001dc00; mac->mac_reason[1] = BWN_READ_4(mac, BWN_DMA1_REASON) & 0x0000dc00;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605190429.u4J4TPSY066242>