USB Selective Suspend via Dual-Stack Driver Architecture
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing operating systems, such as Windows XP and Vista, restrict the ability of NDIS miniport drivers to issue power I/O requests for USB network devices, preventing selective suspension and direct user application access, which limits power conservation and device usability.
Innovation Solution
A dual-stack driver architecture is implemented, with a first driver stack in the kernel space interacting with user applications and a second driver stack in the kernel space that includes a function driver capable of issuing power IRPs to suspend and resume USB devices, bypassing OS restrictions by using a virtual bus and distinct device drivers.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Device complexity
If NDIS miniport driver is used as function driver in conventional driver stack, then device driver architecture is simplified, but USB selective suspend mechanism cannot be used due to OS restriction
Solution Approach 1:
The driver architecture is segmented into two separate stacks: a first driver stack (NDIS miniport driver) for network protocol handling and a second driver stack (WDM/WDF function driver) for power management. This segmentation allows the function driver in the second stack to issue power IRPs to suspend USB devices, bypassing the OS restriction that would prevent the NDIS miniport driver from doing so while maintaining architectural simplicity through clear separation of concerns.
2Use of energy by moving object
If USB device is suspended to save power, then power consumption is reduced, but user application cannot directly access the device
Solution Approach 1:
The WDM/WDF function driver acts as an intermediary between user applications and the suspended USB device. When a user application needs to access a suspended device, the function driver receives the access request, issues a power IRP to resume the device, and then facilitates the data transfer. This intermediary approach allows the device to remain suspended (saving power) while still enabling user application access when needed.
3Ease of operation
If function driver is separated from NDIS miniport driver, then USB selective suspend can be implemented, but driver stack complexity increases
Solution Approach 1:
The WDM/WDF function driver is designed with multi-functionality to handle both power management (issuing power IRPs for suspend/resume) and data forwarding (transferring data between the virtual bus and physical device). This universal approach consolidates multiple functions into a single driver component, reducing the need for additional specialized drivers and thereby mitigating the increase in overall system complexity while enabling USB selective suspend capability.
Data Source
AI summary
A method provides device selective suspension feature when the operating system does not allow certain device drivers to perform device selective suspension. Two driver stacks are provided in the kernel space for the device. The first driver stack includes a virtual bus, a PDO (physical device object) created by the virtual bus, and a driver for the device (e.g. NDIS driver); the second stack includes a device driver stack (e.g. USB generic driver) and a function driver that performs device selective suspension by sending power IRPs to the device driver stack. By using a virtual bus and PDOs created by the virtual bus in the first driver stack, the driver above the PDO can be any one of many types of drivers (NDIS driver being one example). The virtual bus forwards IRPs from the first driver stack to the second driver stack.


