From owner-svn-src-head@freebsd.org Tue May 23 03:48:44 2017 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 4721DD79AF9; Tue, 23 May 2017 03:48:44 +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 16BCF14EE; Tue, 23 May 2017 03:48:44 +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 v4N3mhCB073159; Tue, 23 May 2017 03:48:43 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N3mhN1073158; Tue, 23 May 2017 03:48:43 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705230348.v4N3mhN1073158@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 23 May 2017 03:48:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318690 - head/sys/dev/etherswitch/arswitch 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.23 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, 23 May 2017 03:48:44 -0000 Author: adrian Date: Tue May 23 03:48:42 2017 New Revision: 318690 URL: https://svnweb.freebsd.org/changeset/base/318690 Log: [arswitch] add phy debugging to the internal PHY read/write functions. Modified: head/sys/dev/etherswitch/arswitch/arswitch_phy.c Modified: head/sys/dev/etherswitch/arswitch/arswitch_phy.c ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitch_phy.c Tue May 23 00:13:27 2017 (r318689) +++ head/sys/dev/etherswitch/arswitch/arswitch_phy.c Tue May 23 03:48:42 2017 (r318690) @@ -151,10 +151,20 @@ arswitch_readphy_internal(device_t dev, data = arswitch_readreg_lsb(dev, a) & AR8X16_MDIO_CTRL_DATA_MASK; ARSWITCH_UNLOCK(sc); + + DPRINTF(sc, ARSWITCH_DBG_PHYIO, + "%s: phy=0x%08x, reg=0x%08x, ret=0x%08x\n", + __func__, phy, reg, data); + return (data); fail: ARSWITCH_UNLOCK(sc); + + DPRINTF(sc, ARSWITCH_DBG_PHYIO, + "%s: phy=0x%08x, reg=0x%08x, fail; err=%d\n", + __func__, phy, reg, err); + return (-1); } @@ -194,6 +204,11 @@ arswitch_writephy_internal(device_t dev, } if (timeout < 0) err = EIO; + + DPRINTF(sc, ARSWITCH_DBG_PHYIO, + "%s: phy=0x%08x, reg=0x%08x, data=0x%08x, err=%d\n", + __func__, phy, reg, data, err); + out: DEVERR(dev, err, "arswitch_writephy()=%d: phy=%d.%02x\n", phy, reg); ARSWITCH_UNLOCK(sc);