Virtual USB Bus Driver for Vendor-Specific Requests
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
USB devices not within well-defined classes face functionality issues when redirected to a server for virtualization, as vendor-specific requests are queued and serviced in arbitrary threads, leading to improper operation.
Innovation Solution
Implementing a virtual USB bus driver that creates a temporary buffer for vendor-specific USB requests, ensuring memory integrity and proper servicing of URBs, even when threads change, by queuing requests and using a temporary kernel buffer to maintain data validity.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If USB vendor-specific requests are queued and serviced in arbitrary threads during redirection, then the USB device can be redirected to a server, but the USB device does not function properly due to memory validity issues
Solution Approach 1:
The patent creates a temporary kernel buffer in advance before the USB device is redirected to the server. This buffer is prepared and allocated in the kernel space before the redirection occurs, ensuring that when vendor-specific requests are queued, they have a valid memory destination already in place. This preliminary action prevents the memory validity issues that would otherwise occur when arbitrary threads service the requests.
Solution Approach 2:
The patent introduces a temporary kernel buffer as an intermediary between the USB device driver and the vendor-specific application. This buffer acts as a mediator that holds the request data in kernel space, allowing the arbitrary threads to service requests without directly accessing application space memory. The buffer translates and facilitates communication between the different memory spaces, ensuring data integrity throughout the redirection process.
2Ease of operation
If application memory is used to service USB vendor requests, then the application can communicate with the USB device, but the memory becomes invalid when threads change during redirection
Solution Approach 1:
The temporary kernel buffer serves as an intermediary that decouples the application memory from the actual request servicing. Instead of allowing arbitrary threads to directly access application memory (which becomes invalid when threads change), the buffer intercepts the requests and provides a stable kernel-space memory location. This mediator approach maintains both ease of operation and memory stability simultaneously.
Solution Approach 2:
The patent copies the vendor request data from the application space to the temporary kernel buffer. This copying mechanism ensures that the data is replicated in a stable memory location that is independent of thread changes. The original application memory can be freed or invalidated while the copied data in the kernel buffer remains valid and accessible to arbitrary threads servicing the requests.
Data Source
AI summary
A redirected USB device that does not fall within well-defined device-classes requires special treatment as redirection software will not always permit the servicing of universal serial bus request blocks (URB) on the same thread that the URBs are received. This results in the redirected USB device not functioning properly. A virtual USB bus driver may intercept the URBs so that a temporary kernel buffer can be created. The temporary kernel buffer stores the data necessary for processing the URBs. The temporary kernel buffer is queued along with the URB so that regardless of the thread for processing the URB, the data associated with the URB is preserved so that the vendor-specific application at the client may properly service any request.


