Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 May 2016 04:28:49 +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: r300188 - head/sys/dev/bwn
Message-ID:  <201605190428.u4J4SntB066175@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Thu May 19 04:28:49 2016
New Revision: 300188
URL: https://svnweb.freebsd.org/changeset/base/300188

Log:
  [bwn] toggle the PHY clock during chip reset.
  
  Tested:
  
  * BCM4311, STA mode
  * BCM4312, STA mode
  * BCM4321, STA mode
  * BCM4322, STA mde

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:23:54 2016	(r300187)
+++ head/sys/dev/bwn/if_bwn.c	Thu May 19 04:28:49 2016	(r300188)
@@ -1359,13 +1359,15 @@ bwn_reset_core(struct bwn_mac *mac, int 
 
 	/* Take PHY out of reset */
 	low = (siba_read_4(sc->sc_dev, SIBA_TGSLOW) | SIBA_TGSLOW_FGC) &
-	    ~BWN_TGSLOW_PHYRESET;
+	    ~(BWN_TGSLOW_PHYRESET | BWN_TGSLOW_PHYCLOCK_ENABLE);
 	siba_write_4(sc->sc_dev, SIBA_TGSLOW, low);
 	siba_read_4(sc->sc_dev, SIBA_TGSLOW);
-	DELAY(1000);
-	siba_write_4(sc->sc_dev, SIBA_TGSLOW, low & ~SIBA_TGSLOW_FGC);
+	DELAY(2000);
+	low &= ~SIBA_TGSLOW_FGC;
+	low |= BWN_TGSLOW_PHYCLOCK_ENABLE;
+	siba_write_4(sc->sc_dev, SIBA_TGSLOW, low);
 	siba_read_4(sc->sc_dev, SIBA_TGSLOW);
-	DELAY(1000);
+	DELAY(2000);
 
 	if (mac->mac_phy.switch_analog != NULL)
 		mac->mac_phy.switch_analog(mac, 1);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605190428.u4J4SntB066175>