Setting Up AdapterControl Routines
Save the adapter object pointer and NumberOfMapRegisters returned by IoGetDmaAdapter.
The platform-specific maximum NumberOfMapRegisters returned by IoGetDmaAdapter or the transfer capabilities of the driver's device, whichever is more restrictive, determines whether the driver must split up a given transfer request and carry out more than one DMA operation on its device to satisfy that IRP.
The returned adapter object pointer, the entry point of the driver's AdapterControl routine, the DeviceObject pointer representing the target device for the current IRP, a Context pointer to an area already set up for the AdapterControl routine, and a NumberOfMapRegisters value, which can be less than the maximum possible number for smaller transfer requests, must be passed in calls to AllocateAdapterChannel. Usually, a driver's StartIo (or possibly ControllerControl) routine sets up the area at Context before it calls AllocateAdapterChannel.