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
This commit is contained in:
cem 2016-01-05 20:42:19 +00:00
parent b9b12bc7e6
commit a377302780
3 changed files with 13 additions and 1 deletions

View File

@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd December 17, 2015
.Dd January 5, 2016
.Dt IOAT 4
.Os
.Sh NAME
@ -65,6 +65,8 @@ In
.Fn ioat_put_dmaengine "bus_dmaengine_t dmaengine"
.Ft int
.Fn ioat_get_hwversion "bus_dmaengine_t dmaengine"
.Ft size_t
.Fn ioat_get_max_io_size "bus_dmaengine_t dmaengine"
.Ft int
.Fn ioat_set_interrupt_coalesce "bus_dmaengine_t dmaengine" "uint16_t delay"
.Ft uint16_t

View File

@ -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)
{

View File

@ -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.