Responsibilities of the Device Driver
The device driver provides the rest of the operating system with the software interface to a given device or device class. The upper layer recognizes which commands are required to control a particular device or device class. The device driver builds I/O requests containing device commands, and sends them to the adapter device driver in the sequence needed to operate the device successfully. The device driver cannot manage adapter resources or give the command to the adapter. Specifics about the adapter and system hardware are left to the lower layer.
The device driver also provides recovery and logging for errors related to the device that it controls.
The operating system provides several kernel services that let the device driver communicate with adapter device driver entry points without having the actual name or address of those entry points. See Logical File System Kernel Services for more information.