Enhancing the performance of a wireless dock when a USB mass storage device is connected
The performance of a wireless dock can be enhanced when a USB mass storage device is connected to the wireless dock. Filter drivers can be loaded on the USB stacks of a computing device and the wireless dock to perform functionality for reducing the number of communications that are sent over a wireless network when a USB mass storage device is connected to the computing device via the wireless dock. This reduction in the number of communications can be accomplished without jeopardizing data integrity or compliance with governing protocols.
1. A method, performed by a computing device filter driver that is loaded on a USB device stack of a computing device, for enhancing performance of a wireless dock to which the computing device is connected when a Universal Serial Bus (USB) mass storage device is connected to the wireless dock, the method comprising:
receiving a USB request block (URB) that is being passed down a USB device stack of the computing device;
determining that the URB defines a disk probe command that targets the USB mass storage device;
determining whether an error notification has not been received from a wireless dock filter driver loaded on a USB device stack of the wireless dock such that:
when the computing device filter driver determines that an error notification has not been received from the wireless dock filter driver, the computing device filter driver completes the URB with a first status; whereas
when the computing device filter driver determines that an error notification has been received from the wireless dock filter driver, the computing device filter driver completes the URB with a second status.
2. The method of claim 1 , wherein the computing device filter driver determines that the URB defines a disk probe command in response to determining that the URB pertains to a bulk out transfer.
3. The method of claim 2 , wherein determining that the URB defines a disk probe command comprises determining that the URB includes a Small Computer System Interface (SCSI) TEST UNIT READY command.
4. The method of claim 1 , wherein the first status indicates that the USB mass storage device is ready.
5. The method of claim 4 , wherein the second status indicates that the USB mass storage device is not ready.
6. The method of claim 5 , wherein the second status is CHECK CONDITION.
7. The method of claim 1 , wherein the computing device filter driver receives error notifications from the wireless dock filter driver via out-of-band communications.
8. The method of claim 1 , further comprising:
receiving a second URB that is being passed down the USB device stack of the computing device;
determining that the second URB pertains to a bulk in transfer;
determining whether the USB mass storage device has provided one or more negative acknowledgements (NAKs) such that:
when the computing device filter driver determines that the USB mass storage device has not provided one or more NAKs, the computing device filter driver passes the second URB down the USB device stack on the computing device; whereas
when the computing device filter driver determines that the USB mass storage device has provided one or more NAKs, the computing device filter driver completes the second URB with a NAK.
9. The method of claim 8 , wherein determining whether the USB mass storage device has provided one or more NAKs comprises accessing a NAK count variable.
10. The method of claim 9 , wherein the computing device filter driver updates the NAK count variable in response to receiving a NAK from the USB mass storage device.
11. The method of claim 10 , wherein the computing device filter driver resets the NAK count variable in response to receiving a ready notification from the wireless dock filter driver.
12. One or more computer storage media storing computer executable instructions which when executed on a computing device implement a computing device filter driver that is configured to perform a method for enhancing performance of a wireless dock to which the computing device is connected when a Universal Serial Bus (USB) mass storage device is connected to the wireless dock, the method comprising:
receiving a first USB request block (URB) that pertains to a bulk in transfer to the USB mass storage device;
causing the first URB to be transferred over a wireless network to the wireless dock for delivery to the USB mass storage device;
receiving a negative acknowledgement (NAK) from the USB mass storage device in response to the first URB;
receiving a second URB that pertains to a bulk in transfer to the USB mass storage device; and
based on receiving the NAK from the USB mass storage device in response to the first URB, sending a NAK in response to the second URB.
13. The computer storage media of claim 12 , wherein the method further comprises:
receiving a ready notification from a wireless dock filter driver;
receiving a third URB that pertains to a bulk in transfer to the USB mass storage device; and
based on receiving the ready notification, causing the third URB to be transferred over the wireless network to the wireless dock for delivery to the USB mass storage device.
14. The computer storage media of claim 13 , wherein the computing device filter driver updates a NAK count variable in response to receiving the NAK from the USB mass storage device, and wherein the computing device filter driver sends the NAK in response to the second URB upon determining that the NAK count variable has reached a threshold.
15. The computer storage media of claim 14 , wherein the computing device filter driver resets the NAK count variable in response to receiving the ready notification, and wherein the computing device filter driver causes the third URB to be transferred over the wireless network in response to determining that the NAK count variable has not reached the threshold.
16. The computer storage media of claim 12 , wherein the method further comprises:
selectively completing URBs that define a disk probe command based on whether the computing device filter driver has received an error notification from a wireless dock filter driver.
17. The computer storage media of claim 16 , wherein selectively completing URBs that define a disk probe command comprises completing one or more URBs with a first status before an error notification is received from the wireless dock filter driver and completing an URB with a second status after an error notification is received from the wireless dock filter driver.
18. The computer storage media of claim 17 , wherein the method further comprises:
after completing the URB with the second status, completing one or more URBs with the first status until another error notification is received from the wireless dock filter driver.
19. One or more computer storage media storing computer executable instructions which implement a computing device filter driver, wherein the computing device filter driver is configured to:
selectively complete Universal Serial Bus (USB) request blocks (URBs) that define a disk probe command based on whether the computing device filter driver has received an error notification from a wireless dock filter driver; and
complete URBs that pertain to a bulk in transfer with a negative acknowledgement (NAK) after a USB mass storage device connected to a wireless dock responds to an URB with a NAK and until the computing device filter driver receives a ready notification from the wireless dock filter driver.
20. The computer storage media of claim 19 , wherein the computer executable instructions further implement the wireless dock filter driver that is configured to:
send error notifications to the computing device filter driver; and
send ready notifications to the computing device filter driver.