USB Mass Storage Driver Queue Resumption
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
USB devices, particularly mass storage devices, often experience transient disconnections due to voltage fluctuations or accidental removal, leading to interrupted data transfers and potential corruption of critical system software, necessitating a method to seamlessly resume operations despite such disruptions.
Innovation Solution
A method involving the storage of active I/O requests in a queue during a predetermined time interval after a USB device disconnection, followed by verification and resumption of data transfer when the device is reconnected, ensuring continuous data transfer and minimizing data corruption.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If USB device is used for convenient data transport, then ease of operation is improved, but reliability deteriorates due to spontaneous disconnection and reconnection
Solution Approach 1:
The system performs preliminary actions by queuing I/O requests before they are executed and maintaining their state in memory. When a USB device disconnects and reconnects, the queued requests are already prepared and can be resumed immediately without requiring application-level reconfiguration, thus maintaining reliability while preserving ease of operation.
Solution Approach 2:
The system implements feedback mechanisms by monitoring USB device connection status and automatically detecting when a device disconnects and reconnects. This feedback triggers the resumption of queued I/O requests, creating a closed-loop system that maintains reliable data transfer despite connection fluctuations, while the user experiences no interruption in ease of use.
2Ease of operation
If USB device disconnects and reconnects, then ease of operation is maintained, but data integrity deteriorates due to interrupted I/O operations
Solution Approach 1:
I/O requests are queued in advance and their state is preserved in memory before execution. When disconnection occurs, the queued requests remain intact with their original data buffers and parameters. Upon reconnection, these pre-prepared requests are resumed without re-issuance, preventing data corruption while maintaining transparent operation for the user.
Solution Approach 2:
The system ensures continuity of useful action by maintaining I/O requests in a queued state rather than completing or aborting them during disconnection. The requests continue to exist in memory with their data intact, and execution simply pauses and resumes, ensuring unbroken data integrity while the user experiences continuous transparent operation.
3Reliability
If I/O requests are restarted after USB device reconnection, then reliability is improved, but productivity deteriorates due to application intervention required
Solution Approach 1:
The system performs self-service by automatically detecting USB device reconnections and resuming queued I/O requests without requiring any application-level intervention. The USB subsystem and driver stack handle the entire recovery process autonomously, maintaining both high reliability and productivity by eliminating manual restart operations.
Solution Approach 2:
The system uses feedback from USB device status changes to automatically trigger resumption of I/O requests. When the system detects that a previously disconnected device has been reconnected, it automatically resumes the queued requests, ensuring reliable data transfer integrity while maintaining operational efficiency through automated response rather than manual intervention.
4Productivity
If USB device operations are resumed quickly after reconnection, then productivity is improved, but reliability deteriorates due to potential data corruption from rushed resumption
Solution Approach 1:
I/O requests are prepared in advance and queued with all necessary data buffers and parameters allocated before execution. When resuming after reconnection, these pre-prepared requests can be executed immediately at high speed without requiring re-allocation or re-validation, achieving both rapid productivity recovery and maintained reliability through the integrity of pre-validated data structures.
Solution Approach 2:
The continuous maintenance of queued I/O requests in memory ensures that when resumption occurs, the data transfer can continue seamlessly without interruption or re-validation. This continuity enables rapid resumption at full productivity while maintaining reliability, as the data paths and buffers remain intact and validated from the original request creation.
Data Source
AI summary
A method for continuous data transfer when a USB mass storage device is disconnected and reconnected is provided. The method may include monitoring state information from one or more mass storage devices, using a software driver to detect a change in state of the mass storage device on the computer. Active I/O transfers using the USB mass storage device are paused when the software driver detects that the USB mass storage device is detached from the computer. A configurable timer is started. The software drive may detect the attaching of a USB device. If, prior to the expiration of the timer, the software driver verifies that the USB mass storage device is the same that was previously attached to the computer, active I/O transfers are continued.


