主权项 |
1. A method for controlling a device coupled to a host computer, comprising:
providing a first driver stack in a kernel space of an operating system (OS) of the host computer, wherein the first driver stack comprises a virtual bus, a physical device object created by and coupled to the virtual bus, and a first device driver coupled to the physical device object, to interact with user applications in a user space of the OS; and providing a second driver stack in the kernel space of the OS, wherein the second driver stack comprises a function driver and a second device driver for the device, to interact with the device, wherein the function driver is coupled to the virtual bus of the first driver stack and the second device driver is coupled to the function driver, wherein the first driver stack forwards data between the user applications and the second driver stack, and the second driver stack forwards data between the first driver stack and the device, wherein the function driver issues a command to the second device driver to selectively suspend the device, and wherein the first driver stack and the second driver stack are distinct, and the first device driver and the function driver are distinct. |