summaryrefslogtreecommitdiffstats
path: root/sys/dev/ioat
diff options
context:
space:
mode:
authorcem <cem@FreeBSD.org>2016-01-05 20:42:19 +0000
committercem <cem@FreeBSD.org>2016-01-05 20:42:19 +0000
commita3773027801dbe529556217f884d89d8f87154a5 (patch)
tree4046f3c7bc6d24f00be7ba4cb678b1ae4dee4200 /sys/dev/ioat
parentb9b12bc7e68f18a93d3ab5d46473ef529c970706 (diff)
downloadFreeBSD-src-a3773027801dbe529556217f884d89d8f87154a5.zip
FreeBSD-src-a3773027801dbe529556217f884d89d8f87154a5.tar.gz
ioat(4): Add ioat_get_max_io_size() KPI
Consumers need to know the permitted IO size to send maximally sized chunks to the hardware. Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'sys/dev/ioat')
-rw-r--r--sys/dev/ioat/ioat.c9
-rw-r--r--sys/dev/ioat/ioat.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/ioat/ioat.c b/sys/dev/ioat/ioat.c
index 4b6d7df..c93d1b5 100644
--- a/sys/dev/ioat/ioat.c
+++ b/sys/dev/ioat/ioat.c
@@ -744,6 +744,15 @@ ioat_get_hwversion(bus_dmaengine_t dmaengine)
return (ioat->version);
}
+size_t
+ioat_get_max_io_size(bus_dmaengine_t dmaengine)
+{
+ struct ioat_softc *ioat;
+
+ ioat = to_ioat_softc(dmaengine);
+ return (ioat->max_xfer_size);
+}
+
int
ioat_set_interrupt_coalesce(bus_dmaengine_t dmaengine, uint16_t delay)
{
diff --git a/sys/dev/ioat/ioat.h b/sys/dev/ioat/ioat.h
index e8f47ae..f5d5fad 100644
--- a/sys/dev/ioat/ioat.h
+++ b/sys/dev/ioat/ioat.h
@@ -70,6 +70,7 @@ void ioat_put_dmaengine(bus_dmaengine_t dmaengine);
/* Check the DMA engine's HW version */
int ioat_get_hwversion(bus_dmaengine_t dmaengine);
+size_t ioat_get_max_io_size(bus_dmaengine_t dmaengine);
/*
* Set interrupt coalescing on a DMA channel.
OpenPOWER on IntegriCloud