From owner-svn-src-all@freebsd.org Mon Aug 29 20:51:36 2016 Return-Path: Delivered-To: svn-src-all@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 0C63BBC7282; Mon, 29 Aug 2016 20:51:36 +0000 (UTC) (envelope-from cem@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 B3EBF2C1; Mon, 29 Aug 2016 20:51:35 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7TKpYYJ005908; Mon, 29 Aug 2016 20:51:34 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7TKpYSS005907; Mon, 29 Aug 2016 20:51:34 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201608292051.u7TKpYSS005907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Mon, 29 Aug 2016 20:51:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305028 - head/sys/dev/ioat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2016 20:51:36 -0000 Author: cem Date: Mon Aug 29 20:51:34 2016 New Revision: 305028 URL: https://svnweb.freebsd.org/changeset/base/305028 Log: ioat(4): Add additional CTR tracing during reset Modified: head/sys/dev/ioat/ioat.c Modified: head/sys/dev/ioat/ioat.c ============================================================================== --- head/sys/dev/ioat/ioat.c Mon Aug 29 20:46:33 2016 (r305027) +++ head/sys/dev/ioat/ioat.c Mon Aug 29 20:51:34 2016 (r305028) @@ -1831,6 +1831,9 @@ ioat_reset_hw(struct ioat_softc *ioat) ioat->resetting_cleanup = TRUE; mtx_unlock(&ioat->cleanup_lock); + CTR2(KTR_IOAT, "%s channel=%u quiesced and drained", __func__, + ioat->chan_idx); + status = ioat_get_chansts(ioat); if (is_ioat_active(status) || is_ioat_idle(status)) ioat_suspend(ioat); @@ -1851,6 +1854,9 @@ ioat_reset_hw(struct ioat_softc *ioat) chanerr = ioat_read_4(ioat, IOAT_CHANERR_OFFSET); ioat_write_4(ioat, IOAT_CHANERR_OFFSET, chanerr); + CTR2(KTR_IOAT, "%s channel=%u hardware suspended", __func__, + ioat->chan_idx); + /* * IOAT v3 workaround - CHANERRMSK_INT with 3E07h to masks out errors * that can cause stability issues for IOAT v3. @@ -1870,6 +1876,8 @@ ioat_reset_hw(struct ioat_softc *ioat) } ioat_reset(ioat); + CTR2(KTR_IOAT, "%s channel=%u hardware reset", __func__, + ioat->chan_idx); /* Wait at most 20 ms */ for (timeout = 0; ioat_reset_pending(ioat) && timeout < 20; timeout++) @@ -1919,11 +1927,16 @@ ioat_reset_hw(struct ioat_softc *ioat) ioat_write_chancmp(ioat, ioat->comp_update_bus_addr); ioat_write_chainaddr(ioat, ioat->ring[0]->hw_desc_bus_addr); error = 0; + CTR2(KTR_IOAT, "%s channel=%u configured channel", __func__, + ioat->chan_idx); out: /* Enqueues a null operation and ensures it completes. */ - if (error == 0) + if (error == 0) { error = ioat_start_channel(ioat); + CTR2(KTR_IOAT, "%s channel=%u started channel", __func__, + ioat->chan_idx); + } /* * Resume completions now that ring state is consistent. @@ -1943,6 +1956,7 @@ out: if (ioat->is_completion_pending) callout_reset(&ioat->poll_timer, 1, ioat_poll_timer_callback, ioat); + CTR2(KTR_IOAT, "%s channel=%u reset done", __func__, ioat->chan_idx); mtx_unlock(IOAT_REFLK); return (error);