From owner-svn-src-head@freebsd.org Mon Oct 26 03:30:51 2015 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 D474F8760; Mon, 26 Oct 2015 03:30:51 +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 8212C1097; Mon, 26 Oct 2015 03:30:51 +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 t9Q3Uogm003069; Mon, 26 Oct 2015 03:30:50 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9Q3Uo6h003067; Mon, 26 Oct 2015 03:30:50 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510260330.t9Q3Uo6h003067@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Mon, 26 Oct 2015 03:30:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289983 - 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.20 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: Mon, 26 Oct 2015 03:30:51 -0000 Author: cem Date: Mon Oct 26 03:30:50 2015 New Revision: 289983 URL: https://svnweb.freebsd.org/changeset/base/289983 Log: ioat: Add %b format string for CHANERR codes Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ioat/ioat.c head/sys/dev/ioat/ioat_hw.h Modified: head/sys/dev/ioat/ioat.c ============================================================================== --- head/sys/dev/ioat/ioat.c Mon Oct 26 03:30:38 2015 (r289982) +++ head/sys/dev/ioat/ioat.c Mon Oct 26 03:30:50 2015 (r289983) @@ -349,7 +349,8 @@ ioat_start_channel(struct ioat_softc *io chanerr = ioat_read_4(ioat, IOAT_CHANERR_OFFSET); ioat_log_message(0, "could not start channel: " - "status = %#jx error = %x\n", (uintmax_t)status, chanerr); + "status = %#jx error = %b\n", (uintmax_t)status, (int)chanerr, + IOAT_CHANERR_STR); return (ENXIO); } @@ -1105,7 +1106,8 @@ ioat_halted_debug(struct ioat_softc *ioa { struct ioat_descriptor *desc; - ioat_log_message(0, "Channel halted (%x)\n", chanerr); + ioat_log_message(0, "Channel halted (%b)\n", (int)chanerr, + IOAT_CHANERR_STR); if (chanerr == 0) return; Modified: head/sys/dev/ioat/ioat_hw.h ============================================================================== --- head/sys/dev/ioat/ioat_hw.h Mon Oct 26 03:30:38 2015 (r289982) +++ head/sys/dev/ioat/ioat_hw.h Mon Oct 26 03:30:50 2015 (r289983) @@ -126,6 +126,13 @@ __FBSDID("$FreeBSD$"); #define IOAT_CHANERR_RATVERR (1 << 26) #define IOAT_CHANERR_RRTVERR (1 << 27) +#define IOAT_CHANERR_STR \ + "\20\34RRTVERR\33RATVERR\32RGTVERR\31RDIFFERR\30BBERR\27RTVERR\26ATVERR" \ + "\25GTVERR\24DIFFERR\23DCNTERR\21CXPERR\20UNAFFERR\17SEDERR\16INTCFGERR" \ + "\15CMPADDERR\14DXSERR\13DCERR\12WDERR\11RDERR\10DUNCORERR\07CUNCORERR" \ + "\06CCMDERR\05CHADDERR\04DERR\03NDADDERR\02XDADDERR\01XSADDERR" + + #define IOAT_CFG_CHANERR_INT_OFFSET 0x180 #define IOAT_CFG_CHANERRMASK_INT_OFFSET 0x184