From owner-svn-src-head@freebsd.org Tue May 24 01:20:32 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72C6CB48772; Tue, 24 May 2016 01:20:32 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 280731F41; Tue, 24 May 2016 01:20:32 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4O1KVhm064077; Tue, 24 May 2016 01:20:31 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4O1KVOT064075; Tue, 24 May 2016 01:20:31 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201605240120.u4O1KVOT064075@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 24 May 2016 01:20:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300549 - head/sys/dev/bwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2016 01:20:32 -0000 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__); } }