Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Jun 2016 10:07:57 +0000 (UTC)
From:      Stanislav Galabov <sgalabov@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r301497 - head/sys/dev/etherswitch/mtkswitch
Message-ID:  <201606061007.u56A7vSC069142@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sgalabov
Date: Mon Jun  6 10:07:57 2016
New Revision: 301497
URL: https://svnweb.freebsd.org/changeset/base/301497

Log:
  Remove erroneous lock assertions
  
  In mediatek etherswitch support, functions mtkswitch_reg_write32_mt7621
  and mtkswitch_reg_read32_mt7621 are called without locks held, so
  lock assertions fail. Remove the lock assertions.
  
  Sponsored by:	Smartcom - Bulgaria AD

Modified:
  head/sys/dev/etherswitch/mtkswitch/mtkswitch_mt7620.c

Modified: head/sys/dev/etherswitch/mtkswitch/mtkswitch_mt7620.c
==============================================================================
--- head/sys/dev/etherswitch/mtkswitch/mtkswitch_mt7620.c	Mon Jun  6 09:51:58 2016	(r301496)
+++ head/sys/dev/etherswitch/mtkswitch/mtkswitch_mt7620.c	Mon Jun  6 10:07:57 2016	(r301497)
@@ -135,7 +135,6 @@ mtkswitch_reg_read32_mt7621(struct mtksw
 {
 	uint32_t low, hi;
 
-	MTKSWITCH_LOCK_ASSERT(sc, MA_OWNED);
 	mtkswitch_phy_write_locked(sc, MTKSWITCH_GLOBAL_PHY,
 	    MTKSWITCH_GLOBAL_REG, MTKSWITCH_REG_ADDR(reg));
 	low = mtkswitch_phy_read_locked(sc, MTKSWITCH_GLOBAL_PHY,
@@ -149,7 +148,6 @@ static uint32_t
 mtkswitch_reg_write32_mt7621(struct mtkswitch_softc *sc, int reg, uint32_t val)
 {
 
-	MTKSWITCH_LOCK_ASSERT(sc, MA_OWNED);
 	mtkswitch_phy_write_locked(sc, MTKSWITCH_GLOBAL_PHY,
 	    MTKSWITCH_GLOBAL_REG, MTKSWITCH_REG_ADDR(reg));
 	mtkswitch_phy_write_locked(sc, MTKSWITCH_GLOBAL_PHY,



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