svn commit: r301812 - stable/10/sys/dev/ioat
Garrett Cooper
ngie at FreeBSD.org
Fri Jun 10 18:40:05 UTC 2016
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;
More information about the svn-src-stable-10
mailing list