aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2016-05-19 04:29:25 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2016-05-19 04:29:25 +0000
commita5d89c93cc9be7a1100b7744bd8ad09206eed516 (patch)
treef6cfd5570bc0f33858f88e8400418241af3f46ff /sys/dev
parentfefdffc6a51b9d0eee720acdb5b616e3b1aff3ff (diff)
downloadsrc-a5d89c93cc9be7a1100b7744bd8ad09206eed516.tar.gz
src-a5d89c93cc9be7a1100b7744bd8ad09206eed516.zip
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/bwn/if_bwn.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/dev/bwn/if_bwn.c b/sys/dev/bwn/if_bwn.c
index 0137e89284f0..49d4505a0f95 100644
--- a/sys/dev/bwn/if_bwn.c
+++ b/sys/dev/bwn/if_bwn.c
@@ -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;