USB Controller Polling for Post-Crash Data Transfer
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for communicating with USB devices after a computer system crash are hindered by the masking of interrupts, which prevents efficient data transfer and debugging, as they rely on interrupt-based systems that are not functional post-crash.
Innovation Solution
The method involves detecting a system crash and masking interrupts, then polling USB controllers to transfer data without using interrupts, allowing data to be moved to USB devices for core dump storage and debugging purposes, by bypassing interrupt-dependent processes and using polling mechanisms to ensure data transfer completion.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If interrupt-based data transfer is used after system crash, then data transfer efficiency is maintained, but data transfer fails because interrupts are masked post-crash
Solution Approach 1:
Instead of using interrupt-driven data transfer (the conventional approach), the patent inverts the approach by using polling-based data transfer. The USB host controller polls the USB device for data availability and polls for transfer completion, reversing the traditional interrupt-initiated model. This allows data transfer to function reliably after system crash when interrupts are masked.
2Reliability
If polling mechanism is implemented for USB data transfer post-crash, then data transfer reliability is achieved, but system complexity increases due to additional polling logic
Solution Approach 1:
The USB device autonomously sets the data ready bit in its endpoint buffer when data is available, and the USB host controller autonomously checks this bit through polling. The device does not need complex interrupt handling logic, and the host controller uses simple polling of existing status registers. This self-service approach minimizes additional complexity while ensuring reliable data transfer.
3Loss of information
If core dump is written to USB device after crash, then diagnostic information is preserved, but data transfer time increases due to polling overhead
Solution Approach 1:
The USB host controller continuously polls the USB device's data ready bit even before the crash occurs during normal operation. When a crash is detected, the polling mechanism is already in place and can immediately begin transferring the core dump without needing to establish a new transfer protocol. This preliminary polling action reduces the time penalty for post-crash data transfer.
Data Source
AI summary
One embodiment is a method of transferring data from a computer system to a Universal Serial Bus (USB) device after a computer system crash where interrupts are masked, the method comprising: (a) detecting the computer system crash; (b) transferring at least a portion of the data to a USB driver for the USB device; (c) the USB driver transferring the portion of the data to a USB controller driver for a USB controller for the USB device; (d) the USB controller driver causing the USB controller to transfer the portion of the data to the USB device; (e) polling the USB controller to determine whether the data transfer was completed; and (f) if the data transfer was completed, providing a notification to the computer system. Another embodiment is a method of transferring data from a Universal Serial Bus (USB) device to a computer system after a computer system crash where interrupts are masked, the method comprising: (a) detecting the computer system crash; (b) identifying a USB device used to communicate data to the computer system; (c) polling a USB controller for the identified USB device to determine whether new input has been received; (d) if so, obtaining the new input; and (e) transferring the new output to the computer system for further processing.


