diff --git a/sys/dev/ioat/ioat.c b/sys/dev/ioat/ioat.c index 3724fbe2f64..cd9e894a9dc 100644 --- a/sys/dev/ioat/ioat.c +++ b/sys/dev/ioat/ioat.c @@ -742,6 +742,13 @@ ioat_reset_hw_task(void *ctx, int pending __unused) /* * User API functions */ +unsigned +ioat_get_nchannels(void) +{ + + return (ioat_channel_index); +} + bus_dmaengine_t ioat_get_dmaengine(uint32_t index, int flags) { diff --git a/sys/dev/ioat/ioat.h b/sys/dev/ioat/ioat.h index 2e1012453bf..9a0c3e3bfb6 100644 --- a/sys/dev/ioat/ioat.h +++ b/sys/dev/ioat/ioat.h @@ -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 *