There are three kinds of WDM drivers:
Bus drivers, which drive an I/O bus and provide per-slot functionality that is device-independent.
Function drivers, which drive an individual device.
Filter drivers, which filter I/O requests for a device, a class of devices, or a bus.
In this context, a bus is any device to which other physical, logical, or virtual devices are attached; a bus includes traditional buses such as SCSI and PCI, as well as parallel ports, serial ports, and i8042 ports.
It is important for driver writers to understand the different kinds of WDM drivers and to know which kind of driver they are writing. For example, whether or not a driver handles each Plug and Play IRP and how to handle such IRPs depends on what kind of driver is being written (bus driver, function driver, or filter driver).
The following figure shows the relationship between the bus driver, function driver, and filter drivers for a device.

Possible Driver Layers
Each device typically has a bus driver for the parent I/O bus, a function driver for the device, and zero or more filter drivers for the device. A driver design that requires many filter drivers does not yield optimal performance.
The drivers in the previous figure are the following:
The following sections describe the general types of drivers (bus drivers, function drivers, filter drivers) in detail.