From owner-svn-src-head@freebsd.org Tue Jul 12 21:52:27 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 60A74B93397; Tue, 12 Jul 2016 21:52:27 +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 179DF1B3C; Tue, 12 Jul 2016 21:52:27 +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 u6CLqQEU028483; Tue, 12 Jul 2016 21:52:26 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6CLqQMM028482; Tue, 12 Jul 2016 21:52:26 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201607122152.u6CLqQMM028482@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 12 Jul 2016 21:52:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302677 - 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-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, 12 Jul 2016 21:52:27 -0000 Author: cem Date: Tue Jul 12 21:52:26 2016 New Revision: 302677 URL: https://svnweb.freebsd.org/changeset/base/302677 Log: ioat(4): Print some more useful information about the ring from ddb "show ioat" Modified: head/sys/dev/ioat/ioat.c Modified: head/sys/dev/ioat/ioat.c ============================================================================== --- head/sys/dev/ioat/ioat.c Tue Jul 12 21:49:08 2016 (r302676) +++ head/sys/dev/ioat/ioat.c Tue Jul 12 21:52:26 2016 (r302677) @@ -2203,7 +2203,7 @@ DB_SHOW_COMMAND(ioat, db_show_ioat) if (!have_addr) goto usage; idx = (unsigned)addr; - if (addr >= ioat_channel_index) + if (idx >= ioat_channel_index) goto usage; sc = ioat_channel[idx]; @@ -2251,6 +2251,35 @@ DB_SHOW_COMMAND(ioat, db_show_ioat) db_printf(" last_seen: 0x%lx\n", sc->last_seen); db_printf(" ring: %p\n", sc->ring); + db_printf(" ring[%u] (tail):\n", sc->tail % + (1 << sc->ring_size_order)); + db_printf(" id: %u\n", ioat_get_ring_entry(sc, sc->tail)->id); + db_printf(" addr: 0x%lx\n", + ioat_get_ring_entry(sc, sc->tail)->hw_desc_bus_addr); + db_printf(" next: 0x%lx\n", + ioat_get_ring_entry(sc, sc->tail)->u.generic->next); + + db_printf(" ring[%u] (head - 1):\n", (sc->head - 1) % + (1 << sc->ring_size_order)); + db_printf(" id: %u\n", ioat_get_ring_entry(sc, sc->head - 1)->id); + db_printf(" addr: 0x%lx\n", + ioat_get_ring_entry(sc, sc->head - 1)->hw_desc_bus_addr); + db_printf(" next: 0x%lx\n", + ioat_get_ring_entry(sc, sc->head - 1)->u.generic->next); + + db_printf(" ring[%u] (head):\n", (sc->head) % + (1 << sc->ring_size_order)); + db_printf(" id: %u\n", ioat_get_ring_entry(sc, sc->head)->id); + db_printf(" addr: 0x%lx\n", + ioat_get_ring_entry(sc, sc->head)->hw_desc_bus_addr); + db_printf(" next: 0x%lx\n", + ioat_get_ring_entry(sc, sc->head)->u.generic->next); + + for (idx = 0; idx < (1 << sc->ring_size_order); idx++) + if ((*sc->comp_update & IOAT_CHANSTS_COMPLETED_DESCRIPTOR_MASK) + == ioat_get_ring_entry(sc, idx)->hw_desc_bus_addr) + db_printf(" ring[%u] == hardware tail\n", idx); + db_printf(" cleanup_lock: "); db_show_lock(&sc->cleanup_lock);