From owner-svn-src-all@freebsd.org Fri Jun 10 18:40:04 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 E2BC6ADAA65; Fri, 10 Jun 2016 18:40:04 +0000 (UTC) (envelope-from ngie@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 A4AB52779; Fri, 10 Jun 2016 18:40:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5AIe3O2034273; Fri, 10 Jun 2016 18:40:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5AIe3ph034270; Fri, 10 Jun 2016 18:40:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606101840.u5AIe3ph034270@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 10 Jun 2016 18:40:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r301812 - stable/10/sys/dev/ioat X-SVN-Group: stable-10 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: Fri, 10 Jun 2016 18:40:05 -0000 Author: ngie Date: Fri Jun 10 18:40:03 2016 New Revision: 301812 URL: https://svnweb.freebsd.org/changeset/base/301812 Log: MFC r301296,r301297,r301300: r301296 (by cem): ioat(4): Make channel indices unsigned r301297 (by cem): ioat(4): Export the number of available channels r301300 (by cem): ioat(4): Always log capabilities on attach Different, relatively recent Intel Xeon hardware support radically different features. E.g., BDX support CRC32 while BDX-DE does not. Modified: stable/10/sys/dev/ioat/ioat.c stable/10/sys/dev/ioat/ioat.h stable/10/sys/dev/ioat/ioat_internal.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ioat/ioat.c ============================================================================== --- stable/10/sys/dev/ioat/ioat.c Fri Jun 10 18:34:31 2016 (r301811) +++ stable/10/sys/dev/ioat/ioat.c Fri Jun 10 18:40:03 2016 (r301812) @@ -152,8 +152,8 @@ MODULE_VERSION(ioat, 1); * Private data structures */ static struct ioat_softc *ioat_channel[IOAT_MAX_CHANNELS]; -static int ioat_channel_index = 0; -SYSCTL_INT(_hw_ioat, OID_AUTO, channels, CTLFLAG_RD, &ioat_channel_index, 0, +static unsigned ioat_channel_index = 0; +SYSCTL_UINT(_hw_ioat, OID_AUTO, channels, CTLFLAG_RD, &ioat_channel_index, 0, "Number of IOAT channels attached"); static struct _pcsid @@ -407,7 +407,7 @@ ioat3_attach(device_t device) ioat = DEVICE2SOFTC(device); ioat->capabilities = ioat_read_dmacapability(ioat); - ioat_log_message(1, "Capabilities: %b\n", (int)ioat->capabilities, + ioat_log_message(0, "Capabilities: %b\n", (int)ioat->capabilities, IOAT_DMACAP_STR); xfercap = ioat_read_xfercap(ioat); @@ -742,6 +742,13 @@ ioat_reset_hw_task(void *ctx, int pendin /* * User API functions */ +unsigned +ioat_get_nchannels(void) +{ + + return (ioat_channel_index); +} + bus_dmaengine_t ioat_get_dmaengine(uint32_t index, int flags) { Modified: stable/10/sys/dev/ioat/ioat.h ============================================================================== --- stable/10/sys/dev/ioat/ioat.h Fri Jun 10 18:34:31 2016 (r301811) +++ stable/10/sys/dev/ioat/ioat.h Fri Jun 10 18:40:03 2016 (r301812) @@ -85,6 +85,8 @@ typedef void *bus_dmaengine_t; struct bus_dmadesc; typedef void (*bus_dmaengine_callback_t)(void *arg, int error); +unsigned ioat_get_nchannels(void); + /* * Called first to acquire a reference to the DMA channel * Modified: stable/10/sys/dev/ioat/ioat_internal.h ============================================================================== --- stable/10/sys/dev/ioat/ioat_internal.h Fri Jun 10 18:34:31 2016 (r301811) +++ stable/10/sys/dev/ioat/ioat_internal.h Fri Jun 10 18:40:03 2016 (r301812) @@ -455,7 +455,7 @@ struct ioat_softc { }) int version; - int chan_idx; + unsigned chan_idx; struct mtx submit_lock; device_t device;