Author: adrian Date: Tue May 24 01:20:30 2016 New Revision: 300549 URL: https://svnweb.freebsd.org/changeset/base/300549
Log: [bwn] add extra debugging for non-SIBA devices. This is a no-op at the present moment, but will eventually remind me where the SIBA specific demons lie. Tested: * BCM4322, STA mode Modified: head/sys/dev/bwn/if_bwn.c head/sys/dev/bwn/if_bwn_phy_common.c Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Tue May 24 01:12:19 2016 (r300548) +++ head/sys/dev/bwn/if_bwn.c Tue May 24 01:20:30 2016 (r300549) @@ -4712,11 +4712,9 @@ bwn_rf_turnoff(struct bwn_mac *mac) /* * SSB PHY reset. - * - * XXX TODO: BCMA PHY reset. */ static void -bwn_phy_reset(struct bwn_mac *mac) +bwn_phy_reset_siba(struct bwn_mac *mac) { struct bwn_softc *sc = mac->mac_sc; @@ -4729,6 +4727,17 @@ bwn_phy_reset(struct bwn_mac *mac) DELAY(1000); } +static void +bwn_phy_reset(struct bwn_mac *mac) +{ + + if (bwn_is_bus_siba(mac)) { + bwn_phy_reset_siba(mac); + } else { + BWN_ERRPRINTF(mac->mac_sc, "%s: unknown bus!\n", __func__); + } +} + static int bwn_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { Modified: head/sys/dev/bwn/if_bwn_phy_common.c ============================================================================== --- head/sys/dev/bwn/if_bwn_phy_common.c Tue May 24 01:12:19 2016 (r300548) +++ head/sys/dev/bwn/if_bwn_phy_common.c Tue May 24 01:20:30 2016 (r300549) @@ -157,6 +157,8 @@ bwn_phy_force_clock(struct bwn_mac *mac, else tmp &= ~SIBA_TGSLOW_FGC; siba_write_4(sc->sc_dev, SIBA_TGSLOW, tmp); + } else { + BWN_ERRPRINTF(sc, "%s: unknown bus!\n", __func__); } } @@ -190,6 +192,8 @@ bwn_mac_phy_clock_set(struct bwn_mac *ma else val &= ~BWN_TGSLOW_MACPHYCLKEN; siba_write_4(sc->sc_dev, SIBA_TGSLOW, val); + } else { + BWN_ERRPRINTF(sc, "%s: unknown bus!\n", __func__); } } @@ -205,5 +209,7 @@ bwn_wireless_core_phy_pll_reset(struct b siba_cc_mask32(sc->sc_dev, SIBA_CC_CHIPCTL_DATA, ~0x4); siba_cc_set32(sc->sc_dev, SIBA_CC_CHIPCTL_DATA, 0x4); siba_cc_mask32(sc->sc_dev, SIBA_CC_CHIPCTL_DATA, ~0x4); + } else { + BWN_ERRPRINTF(sc, "%s: unknown bus!\n", __func__); } } _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"