diff --git a/CLAUDE.md b/CLAUDE.md index 8695d28b..aafb94bf 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -49,6 +49,50 @@ Test scripts are located in `docker/qemu/`: - `./docker/qemu/run-aarch64-boot-test-native.sh` - Native ARM64 boot test - `./docker/qemu/run-aarch64-boot-test-strict.sh` - Strict ARM64 boot test +**Parallels (ARM64 hardware testing):** +- `./run.sh --parallels` - Build and boot on Parallels Desktop VM (recommended) +- `./scripts/parallels/build-efi.sh --kernel` - Build kernel + EFI image +- `./scripts/parallels/deploy-to-vm.sh --boot` - Deploy image and boot VM + +### Parallels VM Workflow (CRITICAL) + +When testing on Parallels Desktop, **always ensure the previous VM instance is completely stopped** before deploying and booting a new image. Parallels can get into a stuck "stopping" state that causes the new image to be ignored. + +**Correct workflow:** +```bash +# 1. Force-stop any running/stuck VM +prlctl stop breenix-dev --kill 2>/dev/null || true +# If stuck in "stopping" state, restart Parallels service: +# sudo pkill -9 -f prl_disp_service (requires terminal with sudo) + +# 2. Build fresh kernel (touch forces recompile) +touch kernel/src/drivers/usb/xhci.rs +scripts/parallels/build-efi.sh --kernel + +# 3. Deploy (writes new EFI image to HDS, truncates serial log, fresh NVRAM) +# Preferred: use run.sh which properly truncates serial log + deletes NVRAM +# NOTE: run.sh --parallels tails serial indefinitely; run in background or +# manually start the VM after build-efi.sh +> /tmp/breenix-parallels-serial.log # Truncate serial log +rm -f ~/Parallels/breenix-dev.pvm/NVRAM.dat # Fresh UEFI state +scripts/parallels/deploy-to-vm.sh --boot + +# 4. Wait for boot (~15s) + heartbeats (~30-40s for 3 heartbeats) +sleep 50 + +# 5. Read serial log (contains ALL output since truncation) +cat /tmp/breenix-parallels-serial.log +``` + +**WARNING: Never read `/tmp/breenix-parallels-serial.log` from a previous boot.** +The file persists across reboots unless explicitly truncated. Always truncate it +before starting the VM and wait for a full boot before reading it. + +**If the VM gets stuck in "stopping" state:** +The only reliable fix is `sudo pkill -9 -f prl_disp_service` to restart the +Parallels service. This requires a terminal with sudo access (not available from +agent context). Ask the user to run this if the VM is stuck. + ### Standard Workflow ```bash @@ -285,6 +329,44 @@ When new implementation reaches parity: 2. Update `FEATURE_COMPARISON.md` 3. Include removal in same commit as feature completion +## 🚨 Parallels VM Testing β€” MANDATORY RESTART PROTOCOL 🚨 + +When testing on the Parallels VM (`breenix-dev`), you **MUST** follow this exact restart procedure before every new test. Skipping any step may leave a stale VM running, producing misleading serial logs. + +### VM Restart Validation (REQUIRED BEFORE EVERY BOOT) + +```bash +# Step 1: FORCIBLY stop the VM (kill, not graceful shutdown) +prlctl stop breenix-dev --kill + +# Step 2: VALIDATE it is completely offline β€” poll until confirmed stopped +# Run this in a loop until you see "stopped" +prlctl status breenix-dev +# Expected output: "breenix-dev stopped" +# If not stopped yet, wait 2 seconds and try again. Never skip this check. + +# Step 3: TRUNCATE the serial log (it accumulates across boots) +> /tmp/breenix-parallels-serial.log + +# Step 4: Start the VM +prlctl start breenix-dev + +# Step 5: Wait for boot (at least 30 seconds for USB enumeration to complete) +``` + +**Why this matters:** +- `prlctl stop` without `--kill` can leave the VM in a stopping state for seconds +- The serial log at `/tmp/breenix-parallels-serial.log` accumulates across boots β€” reading stale data from a previous boot looks identical to fresh data +- A "restarted" VM that was never stopped still has the old kernel running + +**Shell snippet for safe restart:** +```bash +prlctl stop breenix-dev --kill +while ! prlctl status breenix-dev | grep -q stopped; do sleep 1; done +> /tmp/breenix-parallels-serial.log +prlctl start breenix-dev +``` + ## Build Configuration - Custom target: `x86_64-breenix.json` diff --git a/docs/CODEX_HANDOFF_CC12.md b/docs/CODEX_HANDOFF_CC12.md new file mode 100644 index 00000000..dd0b9073 --- /dev/null +++ b/docs/CODEX_HANDOFF_CC12.md @@ -0,0 +1,343 @@ +# Codex Handoff: xHCI CC=12 (ENDPOINT_NOT_ENABLED) Investigation + +## Problem Statement + +The Breenix kernel's xHCI USB driver on Parallels Desktop ARM64 VM gets **CC=12 (ENDPOINT_NOT_ENABLED)** on **every non-EP0 interrupt IN transfer**. EP0 control transfers always succeed (CC=1). Keyboard and mouse input is completely dead. + +**Hardware:** Parallels Desktop virtual xHCI controller β€” PCI 00:03.0, vendor 1033:0194 (NEC/Renesas uPD720200), context_size=32, 0 scratchpad buffers, 14 ports (12x USB 3.0 at offset 1, 2x USB 2.0 at offset 13). + +**Devices:** Two HID devices on USB 3.0 ports: +- Slot 1: Mouse (DCI 3 = interrupt IN EP1, DCI 5 = interrupt IN EP2) +- Slot 2: Keyboard (DCI 3 = interrupt IN EP1, DCI 5 = interrupt IN EP2/NKRO) + +**The CC=12 cycle (40 events/sec):** +``` +EP Running β†’ queue Normal TRB β†’ ring doorbell β†’ CC=12 event β†’ +EP Halted β†’ Reset Endpoint β†’ EP Stopped β†’ Set TR Dequeue β†’ +EP Running β†’ requeue β†’ CC=12 β†’ (repeat forever) +``` + +**Linux works perfectly** on the same VM with the same hardware. We have a complete Linux ftrace reference at `docs/linux-xhci-trace-raw.txt`. + +--- + +## What Has Been Verified Correct (Exhaustive) + +After 26+ tests across multiple sessions, the following have ALL been confirmed to match Linux or be correct per the xHCI spec: + +### Endpoint Context (matches Linux byte-for-byte) +- **DW0:** `0x00030000` β€” Mult=0 (per spec Β§6.2.3, non-SS-Isoch must be 0), Interval=3 +- **DW1:** `0x0040003E` β€” MaxPacketSize=64, MaxBurst=0, EPType=7 (Interrupt IN), CErr=3 +- **DW2-DW3:** TR Dequeue Pointer = ring physical base | DCS=1 +- **DW4:** `0x00400040` β€” AvgTRBLen=64, MaxESITPayload=64 + +### Input Context +- **add_flags:** `0x29` (A0 + A3 + A5) β€” Slot + DCI 3 + DCI 5, matches Linux +- **Context Entries:** 5 (covers DCI 3 and DCI 5) +- Slot Context, EP Contexts all properly populated + +### Transfer Ring +- 256 TRBs per ring, zeroed, Link TRB at last entry with Toggle Cycle set +- TRB content: Normal TRB (type 1), IOC=1 (bit 5), ISP=1 (bit 2), correct cycle bit +- Buffer physical address correct (HHDM virt-to-phys verified) +- Transfer length = 8 bytes (keyboard boot) or 9 bytes (mouse) +- **VERIFY diagnostic confirmed:** EP Context TR Dequeue Pointer matches actual ring base physical address +- **DMA sentinel test:** Buffer filled with 0xDE before transfer, buffer unchanged after CC=12 (xHC never touched it) + +### Init Sequence (matches Linux) +1. PCI bus master + memory space enabled +2. xHC halt (RS=0, wait HCH=1) +3. xHC reset (HCRST=1, wait CNR=0) +4. MaxSlotsEn = max_slots +5. DCBAAP set +6. Command ring set (CRCR) +7. Event ring set (ERST, ERSTSZ, ERDP, ERSTBA) +8. Interrupter 0 enabled (IMAN.IE, IMOD) +9. Run (RS=1, INTE=1) +10. Port reset β†’ Enable Slot β†’ Address Device (BSR=0) β†’ Get Device Descriptor β†’ Configure Endpoints β†’ SET_CONFIGURATION β†’ HID setup + +### Other Verified Items +- DCBAA entries point to correct device context bases +- Event ring entries/dequeue pointer correct +- Doorbell writes go to correct address (db_base + slot*4), correct target value (DCI) +- MFINDEX register is running (xHC is scheduling) +- Port numbers correct (USB 3.0 ports 1-12) +- USBLEGSUP not present on this vxHC (only Supported Protocol caps, ID=2) +- `BROKEN_MSI=true` vs `false` β€” no difference in CC=12 +- `SKIP_BW_DANCE=true` vs `false` β€” no difference +- Mouse-only enumeration β€” CC=12 +- Bulk EP type instead of Interrupt β€” CC=12 +- No-Op Transfer TRB (type 8) β€” CC=12 +- SET_PROTOCOL, CLEAR_FEATURE β€” no effect +- All endpoints show Running state at doorbell time +- Slot State = Configured (3) + +--- + +## What Has NOT Been Verified / Remaining Theories + +### Theory 1: Init Command Ordering +Linux's init sequence may differ in subtle ways we haven't caught. The Linux trace shows: +- Line 729-731: ConfigureEndpoint with add_flags "slot 1in 2in" (0x29) +- Line 863-866: First interrupt IN TRB queued for slot 2 +- Linux does NOT ring doorbells for mouse interrupt endpoints in the trace window + +**Key question:** Does Linux queue interrupt TRBs BEFORE or AFTER SET_CONFIGURATION? Our code queues AFTER, which matches the trace, but the timing/ordering within the post-config phase may matter. + +### Theory 2: Parallels vxHC Requires Specific Port/Slot Binding +The virtual xHC may enforce that interrupt endpoints only work on USB 2.0 ports (13-14), not USB 3.0 ports (1-12). Linux might be using different port assignments. Check the Linux trace carefully for which ports devices enumerate on. + +### Theory 3: Missing Scratchpad/Context Memory Requirements +Even though the xHC reports 0 scratchpad buffers, Parallels might need something additional in the DCBAA or device context area. + +### Theory 4: Cache Coherency Issue (ARM64-specific) +We do `dc cvac` (clean) on TRBs and contexts before commands, and `dc civac` (clean+invalidate) on buffers before reading. But the sequence or scope might be wrong. The xHC might be reading stale data from a cache line we didn't clean. + +### Theory 5: Ring Segment / Alignment +Transfer rings are 4KB-aligned (page allocation). But the xHCI spec may require additional alignment for the Parallels vxHC, or the ring physical address may be computed incorrectly in edge cases. + +### Theory 6: Output Context Not Being Used Correctly +After Address Device succeeds, the Output Context has the device's actual endpoint state. Our configure_endpoints_batch reads the Slot Context from Output Context correctly, but the endpoint contexts in the Input Context are built from scratch (our descriptor parsing), not modified from the Output Context. This should be correct per spec, but verify. + +### Theory 7: The xHC Simply Doesn't Support Interrupt Endpoints As We're Configuring Them +This is the "something fundamentally different about Parallels vxHC" theory. Compare our full init flow against Linux's via the ftrace, byte by byte. The answer must be in the difference. + +--- + +## Current Code State + +### File: `kernel/src/drivers/usb/xhci.rs` (~4190 lines) + +**No serial output** β€” all diagnostics go through the lock-free `xhci_trace` ring buffer. + +**Key configuration flags:** +```rust +const MINIMAL_INIT: bool = false; // Full init sequence +const SKIP_BW_DANCE: bool = true; // Skip StopEP + re-ConfigEP per endpoint +const MOUSE_ONLY: bool = false; // Enumerate all devices +const BROKEN_MSI: bool = true; // Timer-based polling (matches Linux quirk) +``` + +**Major sections:** +| Lines | Section | +|-------|---------| +| 1-100 | Constants, configuration flags | +| 101-305 | Type definitions (Trb, XhciState, trb_type, etc.) | +| 306-464 | Diagnostic counters (45+ pub static AtomicU64/U32) | +| 465-858 | Lock-free trace infrastructure | +| 859-1100 | Memory helpers (virt_to_phys, cache ops, MMIO read/write, allocate_pages) | +| 1100-1300 | Core xHCI commands (enable_slot, address_device, enqueue_transfer) | +| 1300-1450 | Control transfers (control_transfer) | +| 1450-1850 | USB descriptor parsing and configuration | +| 1866-2226 | configure_endpoints_batch (Input Context + ConfigureEndpoint command) | +| 2226-2410 | bandwidth_settle_endpoints (StopEP + re-ConfigEP) | +| 2410-2580 | configure_hid (HID class setup: SET_IDLE, GET_REPORT_DESC, SET_REPORT) | +| 2581-2651 | queue_hid_transfer (enqueue Normal TRB + doorbell) | +| 2651-2910 | drain_stale_events, start_hid_polling, process_keyboard/mouse_report | +| 2909-3008 | reset_halted_endpoint (Reset EP β†’ Set TR Deq β†’ requeue) | +| 3017-3024 | start_hid_polling | +| 3263-3531 | init() β€” main initialization entry point | +| 3543-3735 | handle_interrupt() β€” MSI/SPI interrupt handler | +| 3759-4168 | poll_hid_events() β€” timer-driven polling at 200Hz | + +### File: `kernel/src/arch_impl/aarch64/timer_interrupt.rs` + +**Heartbeat** (every 2 seconds via raw_serial_str, lock-free): +``` +[HB t=Ns ctx=C sys=S xe=E uk=K fc=F er=R mf=M] +``` +- `t` = uptime seconds +- `ctx` = context switch count +- `sys` = syscall count +- `xe` = xHCI error events (CC!=1 and CC!=13) +- `uk` = keyboard events received +- `fc` = first transfer completion code (12=CC=12, 1=SUCCESS, 0xFF=none seen) +- `er` = endpoint resets completed +- `mf` = MFINDEX register value (proves xHC is scheduling) + +### File: `docs/linux-xhci-trace-raw.txt` (234KB) + +Complete Linux ftrace of xHCI initialization on the same Parallels VM. Key reference points: +- Lines 1-50: xHCI init, capability registers +- Lines 100-200: Port scanning, device enumeration +- Lines 700-750: ConfigureEndpoint for slot 2 (keyboard) +- Lines 860-870: First interrupt IN TRB queued +- Throughout: All MMIO reads/writes, TRB submissions, completions + +### Trace Analysis Scripts +- `scripts/parse-xhci-trace.py` β€” Parse Breenix xhci_trace_dump output +- `scripts/compare-xhci-traces.py` β€” Compare Breenix vs Linux traces + +--- + +## How to Build and Test + +### Build +```bash +# Force recompile + build +touch kernel/src/drivers/usb/xhci.rs +scripts/parallels/build-efi.sh --kernel +``` + +### Deploy and Boot +```bash +# Stop any running VM +prlctl stop breenix-dev --kill +while ! prlctl status breenix-dev | grep -q stopped; do sleep 1; done + +# Clean state +> /tmp/breenix-parallels-serial.log +rm -f ~/Parallels/breenix-dev.pvm/NVRAM.dat + +# Deploy and boot +scripts/parallels/deploy-to-vm.sh --boot + +# Wait for boot + USB enumeration + heartbeats +sleep 50 + +# Read output +cat /tmp/breenix-parallels-serial.log +``` + +### What Success Looks Like +In the heartbeat output: +- `fc=1` or `fc=13` (SUCCESS or SHORT_PACKET) instead of `fc=12` +- `uk>0` (keyboard events received) +- `xe=0` or low (few/no error events) + +### What Failure Looks Like (Current State) +``` +[HB t=10s ctx=1234 sys=56 xe=400 uk=0 fc=12 er=396 mf=0x1A3F] +``` +- `fc=12` β€” first transfer CC=12 (ENDPOINT_NOT_ENABLED) +- `uk=0` β€” zero keyboard events +- `xe=400` β€” 400 error events in 10 seconds (40/sec, 10 per endpoint) +- `er=396` β€” endpoint resets running (but endpoints immediately fail again) + +--- + +## Trace Infrastructure + +### Recording Traces +The xhci_trace ring buffer records automatically during init. To dump: + +After boot, the trace dump appears in serial output between markers: +``` +=== XHCI_TRACE_START total=N === +... hex records ... +=== XHCI_TRACE_END === +``` + +### Trace Operations +``` +MmioWrite32=1 MmioWrite64=2 MmioRead32=3 +CommandSubmit=10 CommandComplete=11 +TransferSubmit=12 TransferEvent=13 +Doorbell=14 InputContext=20 OutputContext=21 +TransferRingSetup=22 CacheOp=30 SetTrDeq=31 +EpState=40 PortStatusChange=41 Note=50 +``` + +### Adding Trace Points +```rust +// Label a phase +xhci_trace_note(slot_id as u8, "my_phase"); + +// Trace a TRB +xhci_trace_trb(XhciTraceOp::TransferSubmit, slot, dci, &trb); + +// Trace raw data +xhci_trace(XhciTraceOp::Note, slot, dci, &data_bytes); +``` + +**Rules:** +- NO serial_println! in the xHCI layer (locking causes timing perturbation) +- NO `log::*` macros +- ONLY use xhci_trace* functions or raw_serial_str (for heartbeat in timer ISR) +- The trace is lock-free, allocation-free, safe in interrupt context + +--- + +## Architecture Notes + +### ARM64 Virtual-to-Physical Translation +```rust +const HHDM_BASE: u64 = 0xFFFF_0000_0000_0000; +fn virt_to_phys(virt: u64) -> u64 { virt - HHDM_BASE } +``` +All DMA addresses (ring bases, buffer pointers, DCBAA entries) must be physical. + +### Cache Coherency (Critical on ARM64) +```rust +fn cache_clean(addr: u64, len: usize) { + // dc cvac β€” Clean to Point of Coherency (write-back dirty lines) + // Required BEFORE xHC reads our data (TRBs, contexts) +} +fn cache_clean_invalidate(addr: u64, len: usize) { + // dc civac β€” Clean + Invalidate + // Required BEFORE CPU reads xHC-written data (event ring, buffers) +} +``` + +### Transfer Ring Layout +``` +HID_RING_BASE = 32 (= MAX_SLOTS) +Ring indices: 32 (kbd boot), 33 (mouse), 34 (kbd NKRO), 35 (mouse2) +Each ring: 256 TRBs, last TRB = Link TRB with Toggle Cycle +``` + +### Deferred SPI/TRB Timing +``` +poll=0..199 β€” SPI disabled, polling only +poll=200 β€” Enable SPI (GIC interrupt delivery) +poll=300 β€” Queue first keyboard TRBs (AFTER SPI is active) +``` +This exists because queuing TRBs before MSI/SPI is active was hypothesized to cause CC=12 on Parallels. However, CC=12 persists even with this deferral. + +--- + +## Key Files Reference + +| File | Purpose | +|------|---------| +| `kernel/src/drivers/usb/xhci.rs` | xHCI host controller driver (main file) | +| `kernel/src/drivers/usb/hid.rs` | HID report parsing | +| `kernel/src/drivers/pci.rs` | PCI configuration space access | +| `kernel/src/drivers/mod.rs` | Driver initialization | +| `kernel/src/arch_impl/aarch64/timer_interrupt.rs` | Timer ISR, heartbeat, calls poll_hid_events | +| `kernel/src/main_aarch64.rs` | Kernel entry point | +| `kernel/build.rs` | Build ID generation | +| `docs/linux-xhci-trace-raw.txt` | Linux ftrace reference (234KB) | +| `scripts/parse-xhci-trace.py` | Parse Breenix trace output | +| `scripts/compare-xhci-traces.py` | Breenix vs Linux trace comparison | +| `scripts/parallels/build-efi.sh` | Build kernel + EFI image | +| `scripts/parallels/deploy-to-vm.sh` | Deploy to Parallels VM | + +--- + +## Suggested Next Steps + +1. **Byte-for-byte comparison of our MMIO writes vs Linux's** during the full init sequence. The xhci_trace captures every MMIO write. Compare against the Linux ftrace. The CC=12 answer MUST be in a difference we haven't found yet. + +2. **Check if Linux uses USB 2.0 ports** for these HID devices. Our code enumerates on USB 3.0 ports (1-12). If Parallels routes HID devices to USB 2.0 ports (13-14), our port assignment would be wrong. + +3. **Investigate the xHC's Internal State** β€” after ConfigureEndpoint succeeds (CC=1) and endpoints show Running, something happens between that point and the first doorbell that causes the xHC to consider the endpoint "not enabled." This could be a Parallels vxHC quirk where it requires a specific event or delay. + +4. **Try the exact Linux sequence** β€” replicate Linux's init flow exactly as shown in the ftrace, including any MMIO writes we might be skipping (like operational register reads, PORTSC writes, etc.). + +5. **Compare Output Context** after our ConfigureEndpoint vs Linux's. The xHC writes back its understanding of the endpoint configuration into the Output Context. If the output differs between our driver and Linux's, that reveals what the xHC is rejecting. + +--- + +## Previous Commit History + +``` +d72c8c7 fix: xHCI CC=12 reset storm β€” rate limiting + cascade prevention +eb595bd feat: mouse2 interrupt EP support, remove EP0 polling workaround, CC=12 diagnostics +a978f3c feat: EP0 mouse polling, bandwidth dance, CC=12 investigation +b1899ea feat: xHCI endpoint context matching Linux, EP0 GET_REPORT polling, MSI hardening +f3f4f90 feat: EHCI driver, xHCI bulk-for-interrupt workaround, class request diagnostics +6971f9e fix: correct xHCI endpoint context layout per spec, fix transfer ring index collision +2464de4 fix: increase Parallels display to 2560x1600, document hybrid GPU+GOP architecture +d605cd7 feat: VirtIO GPU PCI + XHCI USB drivers for Parallels ARM64 display +``` diff --git a/docs/linux-xhci-trace-raw.txt b/docs/linux-xhci-trace-raw.txt new file mode 100644 index 00000000..027077bf --- /dev/null +++ b/docs/linux-xhci-trace-raw.txt @@ -0,0 +1,1350 @@ +# tracer: nop +# +# entries-in-buffer/entries-written: 1338/1338 #P:2 +# +# _-----=> irqs-off/BH-disabled +# / _----=> need-resched +# | / _---=> hardirq/softirq +# || / _--=> preempt-depth +# ||| / _-=> migrate-disable +# |||| / delay +# TASK-PID CPU# ||||| TIMESTAMP FUNCTION +# | | | ||||| | | + sh-9185 [001] ..... 36818.834452: xhci_dbg_init: // Halt the HC + sh-9185 [001] ..... 36818.834476: xhci_dbg_init: // Reset the HC + sh-9185 [001] ..... 36818.834635: xhci_dbg_init: Wait for controller to be ready for doorbell rings + sh-9185 [001] ..... 36818.834641: xhci_dbg_init: xhci_init + sh-9185 [001] ..... 36818.834642: xhci_dbg_init: xHCI doesn't need link TRB QUIRK + sh-9185 [001] ..... 36818.834648: xhci_dbg_init: HCD page size set to 4K + sh-9185 [001] ..... 36818.834653: xhci_dbg_init: // xHC can handle at most 32 device slots. + sh-9185 [001] ..... 36818.834658: xhci_dbg_init: // Setting Max device slots reg = 0x20. + sh-9185 [001] ..... 36818.834667: xhci_dbg_init: // Device context base array address = 0x0x000000004fbf2000 (DMA), 000000000008c29c (virt) + sh-9185 [001] ..... 36818.834681: xhci_ring_alloc: CMD 000000003daf44b1: enq 0x000000004fbf3000(0x000000004fbf3000) deq 0x000000004fbf3000(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + sh-9185 [001] ..... 36818.834682: xhci_dbg_init: Allocated command ring at 000000003daf44b1 + sh-9185 [001] ..... 36818.834683: xhci_dbg_init: First segment DMA is 0x0x000000004fbf3000 + sh-9185 [001] ..... 36818.834691: xhci_dbg_init: // Setting command ring address to 0x000000004fbf3001 + sh-9185 [001] ..... 36818.834800: xhci_dbg_init: // Doorbell array is located at offset 0x680 from cap regs base addr + sh-9185 [001] ..... 36818.834801: xhci_dbg_init: Allocating primary event ring + sh-9185 [001] ..... 36818.834804: xhci_ring_alloc: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4000(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + sh-9185 [001] ..... 36818.834829: xhci_dbg_init: // Write event ring dequeue pointer, preserving EHB bit + sh-9185 [001] ..... 36818.834837: xhci_dbg_init: Allocating 0 scratchpad buffers + sh-9185 [001] ..... 36818.834869: xhci_dbg_init: Ext Cap 00000000c0d57fba, port offset = 1, count = 12, revision = 0x3 + sh-9185 [001] ..... 36818.834886: xhci_dbg_init: Ext Cap 0000000033047f68, port offset = 13, count = 2, revision = 0x2 + sh-9185 [001] ..... 36818.834887: xhci_dbg_init: Found 2 USB 2.0 ports and 12 USB 3.0 ports. + sh-9185 [001] ..... 36818.834896: xhci_dbg_init: Finished xhci_init + sh-9185 [001] ..... 36818.835680: xhci_dbg_init: xhci_run + sh-9185 [001] ..... 36818.835691: xhci_dbg_init: ERST deq = 64'h4fbf4000 + sh-9185 [001] ..... 36818.835700: xhci_dbg_init: Finished xhci_run for main hcd + sh-9185 [001] dN.1. 36818.838491: xhci_dbg_init: Enable interrupts + sh-9185 [001] dN.1. 36818.838506: xhci_dbg_init: Enable primary interrupter + sh-9185 [001] dN.1. 36818.838518: xhci_dbg_init: // Turn on HC, cmd = 0x5. + sh-9185 [001] dN.1. 36818.838579: xhci_ring_host_doorbell: Ring doorbell for Command Ring 0 + kworker/1:2-6045 [001] d..1. 36818.865834: xhci_get_port_status: port 1-0: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/1:2-6045 [001] d..1. 36818.865855: xhci_get_port_status: port 1-1: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/1:2-6045 [001] d..1. 36818.865955: xhci_hub_status_data: port 1-0: 0x0a0002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: WCE WOE + kworker/1:2-6045 [001] d..1. 36818.865959: xhci_hub_status_data: port 1-1: 0x0a0002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: WCE WOE + kworker/0:0-3233 [000] d..1. 36818.956037: xhci_get_port_status: port 2-0: 0x00021203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: CSC Wake: + kworker/0:0-3233 [000] d..1. 36818.956159: xhci_get_port_status: port 2-1: 0x00021203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: CSC Wake: + kworker/0:0-3233 [000] d..1. 36818.956223: xhci_get_port_status: port 2-2: 0x00021203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: CSC Wake: + kworker/0:0-3233 [000] d..1. 36818.956273: xhci_get_port_status: port 2-3: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d..1. 36818.956280: xhci_get_port_status: port 2-4: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d..1. 36818.956287: xhci_get_port_status: port 2-5: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d..1. 36818.956293: xhci_get_port_status: port 2-6: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d..1. 36818.956299: xhci_get_port_status: port 2-7: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d..1. 36818.956306: xhci_get_port_status: port 2-8: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d..1. 36818.956312: xhci_get_port_status: port 2-9: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d..1. 36818.956343: xhci_get_port_status: port 2-10: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d..1. 36818.956355: xhci_get_port_status: port 2-11: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d..1. 36819.062559: xhci_get_port_status: port 2-0: 0x00001203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: Wake: + kworker/0:0-3233 [000] d..1. 36819.062580: xhci_queue_trb: CMD: Enable Slot Command: flags C + kworker/0:0-3233 [000] d..1. 36819.062581: xhci_inc_enq: CMD 000000003daf44b1: enq 0x000000004fbf3010(0x000000004fbf3000) deq 0x000000004fbf3000(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.062583: xhci_ring_host_doorbell: Ring doorbell for Command Ring 0 + -0 [000] d.h2. 36819.062641: xhci_handle_event: EVENT: TRB 000000004fbf3000 status 'Success' len 0 slot 1 ep 0 type 'Command Completion Event' flags e:C + -0 [000] d.h2. 36819.062642: xhci_handle_command: CMD: Enable Slot Command: flags C + -0 [000] dNh2. 36819.062646: xhci_inc_deq: CMD 000000003daf44b1: enq 0x000000004fbf3010(0x000000004fbf3000) deq 0x000000004fbf3010(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + -0 [000] dNh2. 36819.062647: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4010(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.062675: xhci_ring_alloc: CTRL 00000000b5ea8a38: enq 0x0000000061549000(0x0000000061549000) deq 0x0000000061549000(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.062676: xhci_alloc_virt_device: vdev 000000008c37d6e7 ctx 6153d000 | 6153e000 num 0 state 0 speed 0 port 0 level 0 slot 0 + kworker/0:0-3233 [000] ..... 36819.062678: xhci_alloc_dev: RS 00000 UNKNOWN speed Ctx Entries 0 MEL 0 us Port# 0/0 [TT Slot 0 Port# 0 TTT 0 Intr 0] Addr 0 State enabled/disabled + kworker/0:0-3233 [000] d..1. 36819.062717: xhci_get_port_status: port 2-0: 0x00001203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.062827: xhci_handle_event: EVENT: TRB 0000000001000000 status 'Success' len 0 slot 0 ep 0 type 'Port Status Change Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.062831: xhci_handle_port_status: port 2-0: 0x00201203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: PRC Wake: + kworker/0:0-3233 [000] d.h1. 36819.062835: xhci_hub_status_data: port 2-0: 0x00201203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: PRC Wake: + kworker/0:0-3233 [000] d.h1. 36819.062838: xhci_hub_status_data: port 2-1: 0x00001203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.062841: xhci_hub_status_data: port 2-2: 0x00001203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.062843: xhci_hub_status_data: port 2-3: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.062846: xhci_hub_status_data: port 2-4: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.062849: xhci_hub_status_data: port 2-5: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.062852: xhci_hub_status_data: port 2-6: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.062855: xhci_hub_status_data: port 2-7: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.062858: xhci_hub_status_data: port 2-8: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.062861: xhci_hub_status_data: port 2-9: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.062864: xhci_hub_status_data: port 2-10: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.062866: xhci_hub_status_data: port 2-11: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.062868: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4020(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + -0 [001] d.s2. 36819.096442: xhci_hub_status_data: port 2-0: 0x00201203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: PRC Wake: + -0 [001] d.s2. 36819.096450: xhci_hub_status_data: port 2-1: 0x00001203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: Wake: + -0 [001] d.s2. 36819.096453: xhci_hub_status_data: port 2-2: 0x00001203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: Wake: + -0 [001] d.s2. 36819.096456: xhci_hub_status_data: port 2-3: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + -0 [001] d.s2. 36819.096460: xhci_hub_status_data: port 2-4: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + -0 [001] d.s2. 36819.096463: xhci_hub_status_data: port 2-5: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + -0 [001] d.s2. 36819.096467: xhci_hub_status_data: port 2-6: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + -0 [001] d.s2. 36819.096470: xhci_hub_status_data: port 2-7: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + -0 [001] d.s2. 36819.096474: xhci_hub_status_data: port 2-8: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + -0 [001] d.s2. 36819.096478: xhci_hub_status_data: port 2-9: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + -0 [001] d.s2. 36819.096481: xhci_hub_status_data: port 2-10: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + -0 [001] d.s2. 36819.096485: xhci_hub_status_data: port 2-11: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d..1. 36819.140514: xhci_get_port_status: port 2-0: 0x00201203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: PRC Wake: + kworker/0:0-3233 [000] d..1. 36819.140773: xhci_get_port_status: port 2-0: 0x00001203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: Wake: + kworker/0:0-3233 [000] ..... 36819.196673: xhci_setup_device_slot: RS 00000 UNKNOWN speed Ctx Entries 0 MEL 0 us Port# 0/0 [TT Slot 0 Port# 0 TTT 0 Intr 0] Addr 0 State enabled/disabled + kworker/0:0-3233 [000] ..... 36819.196677: xhci_setup_addressable_virt_device: vdev 000000008c37d6e7 ctx 6153d000 | 6153e000 num 0 state 5 speed 5 port 1 level 1 slot 1 + kworker/0:0-3233 [000] ..... 36819.196678: xhci_address_ctx: ctx_64=0, ctx_type=2, ctx_dma=@6153d000, ctx_va=@00000000acdad395 + kworker/0:0-3233 [000] ..... 36819.196680: xhci_address_ctrl_ctx: Add: slot ep0 + kworker/0:0-3233 [000] d..1. 36819.196681: xhci_setup_device: vdev 000000008c37d6e7 ctx 6153d000 | 6153e000 num 0 state 5 speed 5 port 1 level 1 slot 1 + kworker/0:0-3233 [000] d..1. 36819.196685: xhci_queue_trb: CMD: Address Device Command: ctx 000000006153d000 slot 1 flags b:C + kworker/0:0-3233 [000] d..1. 36819.196686: xhci_inc_enq: CMD 000000003daf44b1: enq 0x000000004fbf3020(0x000000004fbf3000) deq 0x000000004fbf3010(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.196688: xhci_ring_host_doorbell: Ring doorbell for Command Ring 0 + -0 [000] d.h2. 36819.196823: xhci_handle_event: EVENT: TRB 000000004fbf3010 status 'Success' len 0 slot 1 ep 0 type 'Command Completion Event' flags e:C + -0 [000] d.h2. 36819.196824: xhci_handle_command: CMD: Address Device Command: ctx 000000006153d000 slot 1 flags b:C + -0 [000] d.h2. 36819.196826: xhci_handle_cmd_addr_dev: RS 00000 super-speed Ctx Entries 1 MEL 0 us Port# 1/0 [TT Slot 0 Port# 0 TTT 0 Intr 0] Addr 1 State addressed + -0 [000] dNh2. 36819.196830: xhci_inc_deq: CMD 000000003daf44b1: enq 0x000000004fbf3020(0x000000004fbf3000) deq 0x000000004fbf3020(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + -0 [000] dNh2. 36819.196831: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4030(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.196855: xhci_dbg_address: Successful setup address command + kworker/0:0-3233 [000] ..... 36819.196864: xhci_dbg_address: Op regs DCBAA ptr = 0x0000004fbf2000 + kworker/0:0-3233 [000] ..... 36819.196867: xhci_dbg_address: Slot ID 1 dcbaa entry @000000006621b387 = 0x0000006153e000 + kworker/0:0-3233 [000] ..... 36819.196867: xhci_dbg_address: Output Context DMA address = 0x6153e000 + kworker/0:0-3233 [000] ..... 36819.196868: xhci_address_ctx: ctx_64=0, ctx_type=2, ctx_dma=@6153d000, ctx_va=@00000000acdad395 + kworker/0:0-3233 [000] ..... 36819.196868: xhci_address_ctx: ctx_64=0, ctx_type=1, ctx_dma=@6153e000, ctx_va=@000000009f359f9f + kworker/0:0-3233 [000] ..... 36819.196869: xhci_dbg_address: Internal device address = 1 + kworker/0:0-3233 [000] ..... 36819.211222: xhci_urb_enqueue: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484288 slot 1 length 0/8 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.211233: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0100 wIndex 0000 wLength 8 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.211235: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549010(0x0000000061549000) deq 0x0000000061549000(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.211235: xhci_queue_trb: CTRL: Buffer 0000000044fe2c00 length 8 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.211235: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549020(0x0000000061549000) deq 0x0000000061549000(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.211236: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.211236: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549030(0x0000000061549000) deq 0x0000000061549000(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.211239: xhci_ring_ep_doorbell: Ring doorbell for Slot 1 ep0in + kworker/0:2-9200 [000] d.h1. 36819.211386: xhci_handle_event: EVENT: TRB 0000000061549020 status 'Success' len 0 slot 1 ep 1 type 'Transfer Event' flags e:C + kworker/0:2-9200 [000] d.h1. 36819.211389: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:2-9200 [000] d.h1. 36819.211391: xhci_inc_deq: CTRL 00000000b5ea8a38: enq 0x0000000061549030(0x0000000061549000) deq 0x0000000061549030(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:2-9200 [000] d.h1. 36819.211392: xhci_urb_giveback: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484288 slot 1 length 8/8 sgs 0/0 stream 0 flags 00110200 + kworker/0:2-9200 [000] d.h1. 36819.211395: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4040(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.211433: xhci_urb_enqueue: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484160 slot 1 length 0/0 sgs 0/0 stream 0 flags 00000000 + kworker/0:0-3233 [000] d..1. 36819.211434: xhci_queue_trb: CTRL: bRequestType 00 bRequest 31 wValue 0028 wIndex 0000 wLength 0 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.211434: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549040(0x0000000061549000) deq 0x0000000061549030(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.211434: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.211434: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549050(0x0000000061549000) deq 0x0000000061549030(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.211435: xhci_ring_ep_doorbell: Ring doorbell for Slot 1 ep0in + kworker/0:2-9200 [000] d.h1. 36819.211458: xhci_handle_event: EVENT: TRB 0000000061549040 status 'Success' len 0 slot 1 ep 1 type 'Transfer Event' flags e:C + kworker/0:2-9200 [000] d.h1. 36819.211458: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:2-9200 [000] d.h1. 36819.211459: xhci_inc_deq: CTRL 00000000b5ea8a38: enq 0x0000000061549050(0x0000000061549000) deq 0x0000000061549050(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:2-9200 [000] d.h1. 36819.211459: xhci_urb_giveback: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484160 slot 1 length 0/0 sgs 0/0 stream 0 flags 00000000 + kworker/0:2-9200 [000] d.h1. 36819.211459: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4050(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.211478: xhci_urb_enqueue: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484288 slot 1 length 0/18 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.211479: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0100 wIndex 0000 wLength 18 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.211479: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549060(0x0000000061549000) deq 0x0000000061549050(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.211480: xhci_queue_trb: CTRL: Buffer 000000004354e3c0 length 18 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.211480: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549070(0x0000000061549000) deq 0x0000000061549050(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.211481: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.211481: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549080(0x0000000061549000) deq 0x0000000061549050(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.211481: xhci_ring_ep_doorbell: Ring doorbell for Slot 1 ep0in + kworker/0:0-3233 [000] d.h1. 36819.211515: xhci_handle_event: EVENT: TRB 0000000061549070 status 'Success' len 0 slot 1 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.211515: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d.h1. 36819.211516: xhci_inc_deq: CTRL 00000000b5ea8a38: enq 0x0000000061549080(0x0000000061549000) deq 0x0000000061549080(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.211516: xhci_urb_giveback: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484288 slot 1 length 18/18 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d.h1. 36819.211516: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4060(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.211535: xhci_urb_enqueue: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484288 slot 1 length 0/5 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.211535: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0f00 wIndex 0000 wLength 5 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.211535: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549090(0x0000000061549000) deq 0x0000000061549080(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.211536: xhci_queue_trb: CTRL: Buffer 00000000440f2300 length 5 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.211536: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x00000000615490a0(0x0000000061549000) deq 0x0000000061549080(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.211536: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.211536: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x00000000615490b0(0x0000000061549000) deq 0x0000000061549080(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.211536: xhci_ring_ep_doorbell: Ring doorbell for Slot 1 ep0in + kworker/0:2-9200 [000] d.h1. 36819.211559: xhci_handle_event: EVENT: TRB 00000000615490a0 status 'Success' len 0 slot 1 ep 1 type 'Transfer Event' flags e:C + kworker/0:2-9200 [000] d.h1. 36819.211559: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:2-9200 [000] d.h1. 36819.211560: xhci_inc_deq: CTRL 00000000b5ea8a38: enq 0x00000000615490b0(0x0000000061549000) deq 0x00000000615490b0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:2-9200 [000] d.h1. 36819.211560: xhci_urb_giveback: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484288 slot 1 length 5/5 sgs 0/0 stream 0 flags 00110200 + kworker/0:2-9200 [000] d.h1. 36819.211560: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4070(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.212856: xhci_urb_enqueue: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484288 slot 1 length 0/15 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.212864: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0f00 wIndex 0000 wLength 15 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.212865: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x00000000615490c0(0x0000000061549000) deq 0x00000000615490b0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.212866: xhci_queue_trb: CTRL: Buffer 0000000044bbb810 length 15 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.212866: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x00000000615490d0(0x0000000061549000) deq 0x00000000615490b0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.212866: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.212867: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x00000000615490e0(0x0000000061549000) deq 0x00000000615490b0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.212868: xhci_ring_ep_doorbell: Ring doorbell for Slot 1 ep0in + -0 [000] d.h2. 36819.212930: xhci_handle_event: EVENT: TRB 00000000615490d0 status 'Success' len 0 slot 1 ep 1 type 'Transfer Event' flags e:C + -0 [000] d.h2. 36819.212931: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + -0 [000] d.h2. 36819.212933: xhci_inc_deq: CTRL 00000000b5ea8a38: enq 0x00000000615490e0(0x0000000061549000) deq 0x00000000615490e0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + -0 [000] d.h2. 36819.212936: xhci_urb_giveback: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484288 slot 1 length 15/15 sgs 0/0 stream 0 flags 00110200 + -0 [000] d.h2. 36819.212939: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4080(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.213885: xhci_urb_enqueue: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484288 slot 1 length 0/9 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.213887: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0200 wIndex 0000 wLength 9 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.213888: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x00000000615490f0(0x0000000061549000) deq 0x00000000615490e0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.213888: xhci_queue_trb: CTRL: Buffer 0000000044bbb940 length 9 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.213889: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549100(0x0000000061549000) deq 0x00000000615490e0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.213889: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.213889: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549110(0x0000000061549000) deq 0x00000000615490e0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.213889: xhci_ring_ep_doorbell: Ring doorbell for Slot 1 ep0in + kworker/0:0-3233 [000] d.h1. 36819.213947: xhci_handle_event: EVENT: TRB 0000000061549100 status 'Success' len 0 slot 1 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.213948: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d.h1. 36819.213949: xhci_inc_deq: CTRL 00000000b5ea8a38: enq 0x0000000061549110(0x0000000061549000) deq 0x0000000061549110(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.213949: xhci_urb_giveback: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484288 slot 1 length 9/9 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d.h1. 36819.213951: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4090(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.213969: xhci_urb_enqueue: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484288 slot 1 length 0/71 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.213970: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0200 wIndex 0000 wLength 71 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.213970: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549120(0x0000000061549000) deq 0x0000000061549110(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.213970: xhci_queue_trb: CTRL: Buffer 00000000433e1c60 length 71 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.213970: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549130(0x0000000061549000) deq 0x0000000061549110(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.213970: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.213970: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549140(0x0000000061549000) deq 0x0000000061549110(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.213970: xhci_ring_ep_doorbell: Ring doorbell for Slot 1 ep0in + kworker/0:2-9200 [000] d.h2. 36819.214002: xhci_handle_event: EVENT: TRB 0000000061549130 status 'Success' len 0 slot 1 ep 1 type 'Transfer Event' flags e:C + kworker/0:2-9200 [000] d.h2. 36819.214002: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:2-9200 [000] d.h2. 36819.214002: xhci_inc_deq: CTRL 00000000b5ea8a38: enq 0x0000000061549140(0x0000000061549000) deq 0x0000000061549140(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:2-9200 [000] d.h2. 36819.214002: xhci_urb_giveback: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484288 slot 1 length 71/71 sgs 0/0 stream 0 flags 00110200 + kworker/0:2-9200 [000] d.h2. 36819.214003: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf40a0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.214024: xhci_urb_enqueue: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484288 slot 1 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.214024: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0300 wIndex 0000 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.214024: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549150(0x0000000061549000) deq 0x0000000061549140(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.214024: xhci_queue_trb: CTRL: Buffer 0000000044eaa300 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.214024: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549160(0x0000000061549000) deq 0x0000000061549140(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.214025: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.214025: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549170(0x0000000061549000) deq 0x0000000061549140(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.214025: xhci_ring_ep_doorbell: Ring doorbell for Slot 1 ep0in + kworker/0:0-3233 [000] d.h1. 36819.214059: xhci_handle_event: EVENT: TRB 0000000061549150 status 'Short Packet' len 251 slot 1 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.214059: xhci_handle_transfer: CTRL: Buffer 0000000044eaa300 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d.h1. 36819.214059: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf40b0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.214059: xhci_handle_event: EVENT: TRB 0000000061549160 status 'Success' len 0 slot 1 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.214059: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d.h1. 36819.214060: xhci_inc_deq: CTRL 00000000b5ea8a38: enq 0x0000000061549170(0x0000000061549000) deq 0x0000000061549170(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.214061: xhci_urb_giveback: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484288 slot 1 length 4/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d.h1. 36819.214061: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf40c0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.214075: xhci_urb_enqueue: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484288 slot 1 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.214076: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0302 wIndex 0409 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.214076: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549180(0x0000000061549000) deq 0x0000000061549170(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.214076: xhci_queue_trb: CTRL: Buffer 0000000044eaa300 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.214076: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549190(0x0000000061549000) deq 0x0000000061549170(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.214076: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.214077: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x00000000615491a0(0x0000000061549000) deq 0x0000000061549170(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.214077: xhci_ring_ep_doorbell: Ring doorbell for Slot 1 ep0in + kworker/0:0-3233 [000] d.h1. 36819.214115: xhci_handle_event: EVENT: TRB 0000000061549180 status 'Short Packet' len 227 slot 1 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.214116: xhci_handle_transfer: CTRL: Buffer 0000000044eaa300 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d.h1. 36819.214117: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf40d0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.214117: xhci_handle_event: EVENT: TRB 0000000061549190 status 'Success' len 0 slot 1 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.214117: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d.h1. 36819.214117: xhci_inc_deq: CTRL 00000000b5ea8a38: enq 0x00000000615491a0(0x0000000061549000) deq 0x00000000615491a0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.214118: xhci_urb_giveback: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484288 slot 1 length 28/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d.h1. 36819.214119: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf40e0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.214137: xhci_urb_enqueue: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484288 slot 1 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.214137: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0301 wIndex 0409 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.214137: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x00000000615491b0(0x0000000061549000) deq 0x00000000615491a0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.214138: xhci_queue_trb: CTRL: Buffer 0000000044eaa300 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.214138: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x00000000615491c0(0x0000000061549000) deq 0x00000000615491a0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.214138: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.214138: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x00000000615491d0(0x0000000061549000) deq 0x00000000615491a0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.214138: xhci_ring_ep_doorbell: Ring doorbell for Slot 1 ep0in + kworker/0:0-3233 [000] d.h1. 36819.214182: xhci_handle_event: EVENT: TRB 00000000615491b0 status 'Short Packet' len 235 slot 1 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.214182: xhci_handle_transfer: CTRL: Buffer 0000000044eaa300 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d.h1. 36819.214183: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf40f0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.214183: xhci_handle_event: EVENT: TRB 00000000615491c0 status 'Success' len 0 slot 1 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.214183: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d.h1. 36819.214183: xhci_inc_deq: CTRL 00000000b5ea8a38: enq 0x00000000615491d0(0x0000000061549000) deq 0x00000000615491d0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.214183: xhci_urb_giveback: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484288 slot 1 length 20/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d.h1. 36819.214184: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4100(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.214198: xhci_urb_enqueue: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484288 slot 1 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.214199: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0303 wIndex 0409 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.214199: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x00000000615491e0(0x0000000061549000) deq 0x00000000615491d0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.214199: xhci_queue_trb: CTRL: Buffer 0000000044eaa300 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.214199: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x00000000615491f0(0x0000000061549000) deq 0x00000000615491d0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.214199: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.214199: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549200(0x0000000061549000) deq 0x00000000615491d0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.214199: xhci_ring_ep_doorbell: Ring doorbell for Slot 1 ep0in + kworker/0:0-3233 [000] d.h1. 36819.214229: xhci_handle_event: EVENT: TRB 00000000615491e0 status 'Short Packet' len 243 slot 1 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.214229: xhci_handle_transfer: CTRL: Buffer 0000000044eaa300 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d.h1. 36819.214229: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4110(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.214229: xhci_handle_event: EVENT: TRB 00000000615491f0 status 'Success' len 0 slot 1 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.214230: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d.h1. 36819.214230: xhci_inc_deq: CTRL 00000000b5ea8a38: enq 0x0000000061549200(0x0000000061549000) deq 0x0000000061549200(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.214230: xhci_urb_giveback: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484288 slot 1 length 12/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d.h1. 36819.214230: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4120(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.217024: xhci_ring_alloc: INTR 000000005fb22662: enq 0x000000004fbde000(0x000000004fbde000) deq 0x000000004fbde000(0x000000004fbde000) segs 2 stream 0 bounce 64 cycle 1 + kworker/0:0-3233 [000] ..... 36819.217027: xhci_add_endpoint: State disabled mult 1 max P. Streams 0 interval 1000 us max ESIT payload 64 CErr 3 Type Int IN burst 0 maxp 64 deq 000000004fbde001 avg trb len 64 + kworker/0:0-3233 [000] ..... 36819.217029: xhci_ring_alloc: INTR 00000000482e4348: enq 0x000000004fbda000(0x000000004fbda000) deq 0x000000004fbda000(0x000000004fbda000) segs 2 stream 0 bounce 64 cycle 1 + kworker/0:0-3233 [000] ..... 36819.217030: xhci_add_endpoint: State disabled mult 1 max P. Streams 0 interval 1000 us max ESIT payload 64 CErr 3 Type Int IN burst 0 maxp 64 deq 000000004fbda001 avg trb len 64 + kworker/0:0-3233 [000] d..1. 36819.217032: xhci_configure_endpoint_ctrl_ctx: Add: slot 1in 2in + kworker/0:0-3233 [000] d..1. 36819.217032: xhci_configure_endpoint: RS 00000 super-speed Ctx Entries 5 MEL 0 us Port# 1/0 [TT Slot 0 Port# 0 TTT 0 Intr 0] Addr 0 State enabled/disabled + kworker/0:0-3233 [000] d..1. 36819.217036: xhci_queue_trb: CMD: Configure Endpoint Command: ctx 000000006153d000 slot 1 flags d:C + kworker/0:0-3233 [000] d..1. 36819.217036: xhci_inc_enq: CMD 000000003daf44b1: enq 0x000000004fbf3030(0x000000004fbf3000) deq 0x000000004fbf3020(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.217038: xhci_ring_host_doorbell: Ring doorbell for Command Ring 0 + kworker/0:0-3233 [000] d.h1. 36819.217089: xhci_handle_event: EVENT: TRB 000000004fbf3020 status 'Success' len 0 slot 1 ep 0 type 'Command Completion Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.217089: xhci_handle_command: CMD: Configure Endpoint Command: ctx 000000006153d000 slot 1 flags d:C + kworker/0:0-3233 [000] d.h1. 36819.217090: xhci_inc_deq: CMD 000000003daf44b1: enq 0x000000004fbf3030(0x000000004fbf3000) deq 0x000000004fbf3030(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.217091: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4130(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.217106: xhci_dbg_context_change: Successful Endpoint Configure command + kworker/0:0-3233 [000] d..1. 36819.217136: xhci_queue_trb: CMD: Stop Ring Command: slot 1 sp 0 ep 3 flags C + kworker/0:0-3233 [000] d..1. 36819.217136: xhci_inc_enq: CMD 000000003daf44b1: enq 0x000000004fbf3040(0x000000004fbf3000) deq 0x000000004fbf3030(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.217136: xhci_ring_host_doorbell: Ring doorbell for Command Ring 0 + kworker/0:0-3233 [000] dNh1. 36819.217158: xhci_handle_event: EVENT: TRB 000000004fbf3030 status 'Success' len 0 slot 1 ep 0 type 'Command Completion Event' flags e:C + kworker/0:0-3233 [000] dNh1. 36819.217158: xhci_handle_command: CMD: Stop Ring Command: slot 1 sp 0 ep 3 flags C + kworker/0:0-3233 [000] dNh1. 36819.217159: xhci_inc_deq: CMD 000000003daf44b1: enq 0x000000004fbf3040(0x000000004fbf3000) deq 0x000000004fbf3040(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] dNh1. 36819.217159: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4140(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.217237: xhci_queue_trb: CMD: Configure Endpoint Command: ctx 000000004fbb8000 slot 1 flags d:C + kworker/0:0-3233 [000] d..1. 36819.217237: xhci_inc_enq: CMD 000000003daf44b1: enq 0x000000004fbf3050(0x000000004fbf3000) deq 0x000000004fbf3040(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.217238: xhci_ring_host_doorbell: Ring doorbell for Command Ring 0 + -0 [000] dnh2. 36819.217292: xhci_handle_event: EVENT: TRB 000000004fbf3040 status 'Success' len 0 slot 1 ep 0 type 'Command Completion Event' flags e:C + -0 [000] dnh2. 36819.217292: xhci_handle_command: CMD: Configure Endpoint Command: ctx 000000004fbb8000 slot 1 flags d:C + -0 [000] dnh2. 36819.217295: xhci_inc_deq: CMD 000000003daf44b1: enq 0x000000004fbf3050(0x000000004fbf3000) deq 0x000000004fbf3050(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + -0 [000] dnh2. 36819.217295: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4150(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.218823: xhci_queue_trb: CMD: Stop Ring Command: slot 1 sp 0 ep 5 flags C + kworker/0:0-3233 [000] d..1. 36819.218825: xhci_inc_enq: CMD 000000003daf44b1: enq 0x000000004fbf3060(0x000000004fbf3000) deq 0x000000004fbf3050(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.218827: xhci_ring_host_doorbell: Ring doorbell for Command Ring 0 + kworker/0:0-3233 [000] d.H1. 36819.218950: xhci_handle_event: EVENT: TRB 000000004fbf3050 status 'Success' len 0 slot 1 ep 0 type 'Command Completion Event' flags e:C + kworker/0:0-3233 [000] d.H1. 36819.218951: xhci_handle_command: CMD: Stop Ring Command: slot 1 sp 0 ep 5 flags C + kworker/0:0-3233 [000] d.H1. 36819.218953: xhci_inc_deq: CMD 000000003daf44b1: enq 0x000000004fbf3060(0x000000004fbf3000) deq 0x000000004fbf3060(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.H1. 36819.218953: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4160(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.218980: xhci_queue_trb: CMD: Configure Endpoint Command: ctx 000000004fbb8000 slot 1 flags d:C + kworker/0:0-3233 [000] d..1. 36819.218980: xhci_inc_enq: CMD 000000003daf44b1: enq 0x000000004fbf3070(0x000000004fbf3000) deq 0x000000004fbf3060(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.218980: xhci_ring_host_doorbell: Ring doorbell for Command Ring 0 + kworker/0:0-3233 [000] d.h1. 36819.219010: xhci_handle_event: EVENT: TRB 000000004fbf3060 status 'Success' len 0 slot 1 ep 0 type 'Command Completion Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.219010: xhci_handle_command: CMD: Configure Endpoint Command: ctx 000000004fbb8000 slot 1 flags d:C + kworker/0:0-3233 [000] d.h1. 36819.219010: xhci_inc_deq: CMD 000000003daf44b1: enq 0x000000004fbf3070(0x000000004fbf3000) deq 0x000000004fbf3070(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.219011: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4170(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.219229: xhci_urb_enqueue: 2-1 ep0out-control: urb 00000000814b4010 pipe 2147484160 slot 1 length 0/0 sgs 0/0 stream 0 flags 00000000 + kworker/0:0-3233 [000] d..1. 36819.219231: xhci_queue_trb: CTRL: bRequestType 00 bRequest 09 wValue 0001 wIndex 0000 wLength 0 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.219232: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549210(0x0000000061549000) deq 0x0000000061549200(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.219232: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.219232: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549220(0x0000000061549000) deq 0x0000000061549200(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.219234: xhci_ring_ep_doorbell: Ring doorbell for Slot 1 ep0in + kworker/0:0-3233 [000] dNh1. 36819.219341: xhci_handle_event: EVENT: TRB 0000000061549210 status 'Success' len 0 slot 1 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] dNh1. 36819.219344: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] dNh1. 36819.219345: xhci_inc_deq: CTRL 00000000b5ea8a38: enq 0x0000000061549220(0x0000000061549000) deq 0x0000000061549220(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] dNh1. 36819.219346: xhci_urb_giveback: 2-1 ep0out-control: urb 00000000814b4010 pipe 2147484160 slot 1 length 0/0 sgs 0/0 stream 0 flags 00000000 + kworker/0:0-3233 [000] dNh1. 36819.219348: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4180(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.219431: xhci_urb_enqueue: 2-1 ep0out-control: urb 00000000814b4010 pipe 2147484288 slot 1 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.219432: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0301 wIndex 0409 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.219432: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549230(0x0000000061549000) deq 0x0000000061549220(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.219432: xhci_queue_trb: CTRL: Buffer 0000000044eaa600 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.219433: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549240(0x0000000061549000) deq 0x0000000061549220(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.219433: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.219433: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549250(0x0000000061549000) deq 0x0000000061549220(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.219433: xhci_ring_ep_doorbell: Ring doorbell for Slot 1 ep0in + mdev-9201 [000] d.h2. 36819.219462: xhci_handle_event: EVENT: TRB 0000000061549230 status 'Short Packet' len 235 slot 1 ep 1 type 'Transfer Event' flags e:C + mdev-9201 [000] d.h2. 36819.219462: xhci_handle_transfer: CTRL: Buffer 0000000044eaa600 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + mdev-9201 [000] d.h2. 36819.219463: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4190(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + mdev-9201 [000] d.h2. 36819.219463: xhci_handle_event: EVENT: TRB 0000000061549240 status 'Success' len 0 slot 1 ep 1 type 'Transfer Event' flags e:C + mdev-9201 [000] d.h2. 36819.219463: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + mdev-9201 [000] d.h2. 36819.219463: xhci_inc_deq: CTRL 00000000b5ea8a38: enq 0x0000000061549250(0x0000000061549000) deq 0x0000000061549250(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + mdev-9201 [000] d.h2. 36819.219464: xhci_urb_giveback: 2-1 ep0out-control: urb 00000000814b4010 pipe 2147484288 slot 1 length 20/255 sgs 0/0 stream 0 flags 00110200 + mdev-9201 [000] d.h2. 36819.219464: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf41a0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.220885: xhci_urb_enqueue: 2-1 ep0out-control: urb 00000000814b4010 pipe 2147484288 slot 1 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.220889: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0304 wIndex 0409 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.220890: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549260(0x0000000061549000) deq 0x0000000061549250(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.220890: xhci_queue_trb: CTRL: Buffer 0000000044eaa400 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.220891: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549270(0x0000000061549000) deq 0x0000000061549250(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.220891: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.220891: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549280(0x0000000061549000) deq 0x0000000061549250(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.220892: xhci_ring_ep_doorbell: Ring doorbell for Slot 1 ep0in + -0 [000] d.h2. 36819.220955: xhci_handle_event: EVENT: TRB 0000000061549260 status 'Short Packet' len 195 slot 1 ep 1 type 'Transfer Event' flags e:C + -0 [000] d.h2. 36819.220957: xhci_handle_transfer: CTRL: Buffer 0000000044eaa400 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + -0 [000] d.h2. 36819.220957: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf41b0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + -0 [000] d.h2. 36819.220957: xhci_handle_event: EVENT: TRB 0000000061549270 status 'Success' len 0 slot 1 ep 1 type 'Transfer Event' flags e:C + -0 [000] d.h2. 36819.220958: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + -0 [000] d.h2. 36819.220958: xhci_inc_deq: CTRL 00000000b5ea8a38: enq 0x0000000061549280(0x0000000061549000) deq 0x0000000061549280(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + -0 [000] d.h2. 36819.220959: xhci_urb_giveback: 2-1 ep0out-control: urb 00000000814b4010 pipe 2147484288 slot 1 length 60/255 sgs 0/0 stream 0 flags 00110200 + -0 [000] d.h2. 36819.220961: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf41c0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.221033: xhci_urb_enqueue: 2-1 ep0out-control: urb 00000000814b4010 pipe 2147484288 slot 1 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.221034: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0303 wIndex 0409 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.221034: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549290(0x0000000061549000) deq 0x0000000061549280(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.221034: xhci_queue_trb: CTRL: Buffer 0000000044eaa400 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.221034: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x00000000615492a0(0x0000000061549000) deq 0x0000000061549280(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.221034: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.221034: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x00000000615492b0(0x0000000061549000) deq 0x0000000061549280(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.221034: xhci_ring_ep_doorbell: Ring doorbell for Slot 1 ep0in + -0 [000] d.h2. 36819.221099: xhci_handle_event: EVENT: TRB 0000000061549290 status 'Short Packet' len 243 slot 1 ep 1 type 'Transfer Event' flags e:C + -0 [000] d.h2. 36819.221100: xhci_handle_transfer: CTRL: Buffer 0000000044eaa400 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + -0 [000] d.h2. 36819.221100: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf41d0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + -0 [000] d.h2. 36819.221100: xhci_handle_event: EVENT: TRB 00000000615492a0 status 'Success' len 0 slot 1 ep 1 type 'Transfer Event' flags e:C + -0 [000] d.h2. 36819.221100: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + -0 [000] d.h2. 36819.221101: xhci_inc_deq: CTRL 00000000b5ea8a38: enq 0x00000000615492b0(0x0000000061549000) deq 0x00000000615492b0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + -0 [000] d.h2. 36819.221101: xhci_urb_giveback: 2-1 ep0out-control: urb 00000000814b4010 pipe 2147484288 slot 1 length 12/255 sgs 0/0 stream 0 flags 00110200 + -0 [000] d.h2. 36819.221101: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf41e0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.221129: xhci_urb_enqueue: 2-1 ep0out-control: urb 00000000814b4010 pipe 2147484160 slot 1 length 0/0 sgs 0/0 stream 0 flags 00000000 + kworker/0:0-3233 [000] d..1. 36819.221130: xhci_queue_trb: CTRL: bRequestType 21 bRequest 0a wValue 0000 wIndex 0000 wLength 0 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.221130: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x00000000615492c0(0x0000000061549000) deq 0x00000000615492b0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.221130: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.221130: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x00000000615492d0(0x0000000061549000) deq 0x00000000615492b0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.221130: xhci_ring_ep_doorbell: Ring doorbell for Slot 1 ep0in + kworker/0:0-3233 [000] d.h1. 36819.221165: xhci_handle_event: EVENT: TRB 00000000615492c0 status 'Success' len 0 slot 1 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.221165: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d.h1. 36819.221165: xhci_inc_deq: CTRL 00000000b5ea8a38: enq 0x00000000615492d0(0x0000000061549000) deq 0x00000000615492d0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.221166: xhci_urb_giveback: 2-1 ep0out-control: urb 00000000814b4010 pipe 2147484160 slot 1 length 0/0 sgs 0/0 stream 0 flags 00000000 + kworker/0:0-3233 [000] d.h1. 36819.221166: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf41f0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.221180: xhci_urb_enqueue: 2-1 ep0out-control: urb 00000000814b4010 pipe 2147484288 slot 1 length 0/126 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.221181: xhci_queue_trb: CTRL: bRequestType 81 bRequest 06 wValue 2200 wIndex 0000 wLength 126 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.221181: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x00000000615492e0(0x0000000061549000) deq 0x00000000615492d0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.221181: xhci_queue_trb: CTRL: Buffer 0000000078065300 length 126 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.221181: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x00000000615492f0(0x0000000061549000) deq 0x00000000615492d0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.221181: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.221181: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549300(0x0000000061549000) deq 0x00000000615492d0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.221182: xhci_ring_ep_doorbell: Ring doorbell for Slot 1 ep0in + -0 [000] d.h2. 36819.221212: xhci_handle_event: EVENT: TRB 00000000615492f0 status 'Success' len 0 slot 1 ep 1 type 'Transfer Event' flags e:C + -0 [000] d.h2. 36819.221212: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + -0 [000] d.h2. 36819.221212: xhci_inc_deq: CTRL 00000000b5ea8a38: enq 0x0000000061549300(0x0000000061549000) deq 0x0000000061549300(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + -0 [000] d.h2. 36819.221213: xhci_urb_giveback: 2-1 ep0out-control: urb 00000000814b4010 pipe 2147484288 slot 1 length 126/126 sgs 0/0 stream 0 flags 00110200 + -0 [000] d.h2. 36819.221213: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4200(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.223236: xhci_urb_enqueue: 2-1 ep0out-control: urb 00000000d119525d pipe 2147484288 slot 1 length 0/64 sgs 0/0 stream 0 flags 00100204 + kworker/0:0-3233 [000] d..2. 36819.223242: xhci_queue_trb: CTRL: bRequestType a1 bRequest 01 wValue 0311 wIndex 0000 wLength 64 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..2. 36819.223243: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549310(0x0000000061549000) deq 0x0000000061549300(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..2. 36819.223244: xhci_queue_trb: CTRL: Buffer 00000000615ce100 length 64 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..2. 36819.223245: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549320(0x0000000061549000) deq 0x0000000061549300(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..2. 36819.223245: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..2. 36819.223245: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549330(0x0000000061549000) deq 0x0000000061549300(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..2. 36819.223247: xhci_ring_ep_doorbell: Ring doorbell for Slot 1 ep0in + kworker/0:0-3233 [000] d.h1. 36819.223397: xhci_handle_event: EVENT: TRB 0000000061549310 status 'Short Packet' len 62 slot 1 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.223400: xhci_handle_transfer: CTRL: Buffer 00000000615ce100 length 64 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d.h1. 36819.223400: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4210(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.223401: xhci_handle_event: EVENT: TRB 0000000061549320 status 'Success' len 0 slot 1 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.223401: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d.h1. 36819.223402: xhci_inc_deq: CTRL 00000000b5ea8a38: enq 0x0000000061549330(0x0000000061549000) deq 0x0000000061549330(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.223404: xhci_urb_giveback: 2-1 ep0out-control: urb 00000000d119525d pipe 2147484288 slot 1 length 2/64 sgs 0/0 stream 0 flags 00100204 + kworker/0:0-3233 [000] d.h1. 36819.223406: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4220(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.223445: xhci_urb_enqueue: 2-1 ep0out-control: urb 00000000a72f57ed pipe 2147484160 slot 1 length 0/2 sgs 0/0 stream 0 flags 00000000 + kworker/0:0-3233 [000] d..1. 36819.223445: xhci_queue_trb: CTRL: bRequestType 21 bRequest 09 wValue 0311 wIndex 0000 wLength 2 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.223446: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549340(0x0000000061549000) deq 0x0000000061549330(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.223446: xhci_queue_trb: CTRL: Buffer 0000000000001111 length 2 TD size 0 intr 0 type 'Data Stage' flags I:i:c:s:i:e:C + kworker/0:0-3233 [000] d..1. 36819.223446: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549350(0x0000000061549000) deq 0x0000000061549330(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.223446: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.223447: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549360(0x0000000061549000) deq 0x0000000061549330(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.223447: xhci_ring_ep_doorbell: Ring doorbell for Slot 1 ep0in + modprobe-9205 [000] d.h1. 36819.223494: xhci_handle_event: EVENT: TRB 0000000061549350 status 'Success' len 0 slot 1 ep 1 type 'Transfer Event' flags e:C + modprobe-9205 [000] d.h1. 36819.223495: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + modprobe-9205 [000] d.h1. 36819.223495: xhci_inc_deq: CTRL 00000000b5ea8a38: enq 0x0000000061549360(0x0000000061549000) deq 0x0000000061549360(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + modprobe-9205 [000] d.h1. 36819.223496: xhci_urb_giveback: 2-1 ep0out-control: urb 00000000a72f57ed pipe 2147484160 slot 1 length 2/2 sgs 0/0 stream 0 flags 00000000 + modprobe-9205 [000] d.h1. 36819.223496: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4230(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.236801: xhci_urb_enqueue: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484288 slot 1 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.236807: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0305 wIndex 0409 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.236809: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549370(0x0000000061549000) deq 0x0000000061549360(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.236810: xhci_queue_trb: CTRL: Buffer 0000000044c24100 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.236810: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549380(0x0000000061549000) deq 0x0000000061549360(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.236810: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.236810: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549390(0x0000000061549000) deq 0x0000000061549360(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.236812: xhci_ring_ep_doorbell: Ring doorbell for Slot 1 ep0in + kworker/0:2-9200 [000] d.h2. 36819.236945: xhci_handle_event: EVENT: TRB 0000000061549370 status 'Short Packet' len 195 slot 1 ep 1 type 'Transfer Event' flags e:C + kworker/0:2-9200 [000] d.h2. 36819.236948: xhci_handle_transfer: CTRL: Buffer 0000000044c24100 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:2-9200 [000] d.h2. 36819.236950: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4240(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:2-9200 [000] d.h2. 36819.236950: xhci_handle_event: EVENT: TRB 0000000061549380 status 'Success' len 0 slot 1 ep 1 type 'Transfer Event' flags e:C + kworker/0:2-9200 [000] d.h2. 36819.236950: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:2-9200 [000] d.h2. 36819.236951: xhci_inc_deq: CTRL 00000000b5ea8a38: enq 0x0000000061549390(0x0000000061549000) deq 0x0000000061549390(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:2-9200 [000] d.h2. 36819.236953: xhci_urb_giveback: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484288 slot 1 length 60/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:2-9200 [000] d.h2. 36819.236956: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4250(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.237833: xhci_urb_enqueue: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484288 slot 1 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.237837: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0303 wIndex 0409 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.237838: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x00000000615493a0(0x0000000061549000) deq 0x0000000061549390(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.237838: xhci_queue_trb: CTRL: Buffer 0000000044c24100 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.237838: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x00000000615493b0(0x0000000061549000) deq 0x0000000061549390(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.237839: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.237839: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x00000000615493c0(0x0000000061549000) deq 0x0000000061549390(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.237840: xhci_ring_ep_doorbell: Ring doorbell for Slot 1 ep0in + kworker/0:0-3233 [000] d.h1. 36819.237919: xhci_handle_event: EVENT: TRB 00000000615493a0 status 'Short Packet' len 243 slot 1 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.237921: xhci_handle_transfer: CTRL: Buffer 0000000044c24100 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d.h1. 36819.237921: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4260(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.237922: xhci_handle_event: EVENT: TRB 00000000615493b0 status 'Success' len 0 slot 1 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.237922: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d.h1. 36819.237922: xhci_inc_deq: CTRL 00000000b5ea8a38: enq 0x00000000615493c0(0x0000000061549000) deq 0x00000000615493c0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.237939: xhci_urb_giveback: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484288 slot 1 length 12/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] dnh1. 36819.237965: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4270(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.238056: xhci_urb_enqueue: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484160 slot 1 length 0/0 sgs 0/0 stream 0 flags 00000000 + kworker/0:0-3233 [000] d..1. 36819.238057: xhci_queue_trb: CTRL: bRequestType 21 bRequest 0a wValue 0000 wIndex 0001 wLength 0 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.238057: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x00000000615493d0(0x0000000061549000) deq 0x00000000615493c0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.238058: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.238058: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x00000000615493e0(0x0000000061549000) deq 0x00000000615493c0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.238058: xhci_ring_ep_doorbell: Ring doorbell for Slot 1 ep0in + kworker/0:0-3233 [000] d.h1. 36819.238104: xhci_handle_event: EVENT: TRB 00000000615493d0 status 'Success' len 0 slot 1 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.238105: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d.h1. 36819.238106: xhci_inc_deq: CTRL 00000000b5ea8a38: enq 0x00000000615493e0(0x0000000061549000) deq 0x00000000615493e0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.238107: xhci_urb_giveback: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484160 slot 1 length 0/0 sgs 0/0 stream 0 flags 00000000 + kworker/0:0-3233 [000] d.h1. 36819.238108: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4280(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.238124: xhci_urb_enqueue: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484288 slot 1 length 0/127 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.238125: xhci_queue_trb: CTRL: bRequestType 81 bRequest 06 wValue 2200 wIndex 0001 wLength 127 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.238125: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x00000000615493f0(0x0000000061549000) deq 0x00000000615493e0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.238125: xhci_queue_trb: CTRL: Buffer 0000000078065500 length 127 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.238125: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549400(0x0000000061549000) deq 0x00000000615493e0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.238125: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.238126: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549410(0x0000000061549000) deq 0x00000000615493e0(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.238126: xhci_ring_ep_doorbell: Ring doorbell for Slot 1 ep0in + -0 [000] d.h2. 36819.238157: xhci_handle_event: EVENT: TRB 0000000061549400 status 'Success' len 0 slot 1 ep 1 type 'Transfer Event' flags e:C + -0 [000] d.h2. 36819.238158: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + -0 [000] d.h2. 36819.238158: xhci_inc_deq: CTRL 00000000b5ea8a38: enq 0x0000000061549410(0x0000000061549000) deq 0x0000000061549410(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + -0 [000] d.h2. 36819.238158: xhci_urb_giveback: 2-1 ep0out-control: urb 000000002be9702f pipe 2147484288 slot 1 length 127/127 sgs 0/0 stream 0 flags 00110200 + -0 [000] d.h2. 36819.238158: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4290(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.239335: xhci_urb_enqueue: 2-1 ep0out-control: urb 00000000fa5d8c55 pipe 2147484288 slot 1 length 0/64 sgs 0/0 stream 0 flags 00100204 + kworker/0:0-3233 [000] d..2. 36819.239339: xhci_queue_trb: CTRL: bRequestType a1 bRequest 01 wValue 0312 wIndex 0001 wLength 64 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..2. 36819.239339: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549420(0x0000000061549000) deq 0x0000000061549410(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..2. 36819.239340: xhci_queue_trb: CTRL: Buffer 00000000615ce280 length 64 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..2. 36819.239340: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549430(0x0000000061549000) deq 0x0000000061549410(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..2. 36819.239340: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..2. 36819.239340: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549440(0x0000000061549000) deq 0x0000000061549410(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..2. 36819.239341: xhci_ring_ep_doorbell: Ring doorbell for Slot 1 ep0in + mdev-9217 [000] d.h1. 36819.239399: xhci_handle_event: EVENT: TRB 0000000061549420 status 'Short Packet' len 62 slot 1 ep 1 type 'Transfer Event' flags e:C + mdev-9217 [000] d.h1. 36819.239400: xhci_handle_transfer: CTRL: Buffer 00000000615ce280 length 64 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + mdev-9217 [000] d.h1. 36819.239401: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf42a0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + mdev-9217 [000] d.h1. 36819.239401: xhci_handle_event: EVENT: TRB 0000000061549430 status 'Success' len 0 slot 1 ep 1 type 'Transfer Event' flags e:C + mdev-9217 [000] d.h1. 36819.239401: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + mdev-9217 [000] d.h1. 36819.239401: xhci_inc_deq: CTRL 00000000b5ea8a38: enq 0x0000000061549440(0x0000000061549000) deq 0x0000000061549440(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + mdev-9217 [000] d.h1. 36819.239402: xhci_urb_giveback: 2-1 ep0out-control: urb 00000000fa5d8c55 pipe 2147484288 slot 1 length 2/64 sgs 0/0 stream 0 flags 00100204 + mdev-9217 [000] d.h1. 36819.239403: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf42b0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.239443: xhci_urb_enqueue: 2-1 ep0out-control: urb 000000005e4d0b48 pipe 2147484160 slot 1 length 0/2 sgs 0/0 stream 0 flags 00000000 + kworker/0:0-3233 [000] d..1. 36819.239443: xhci_queue_trb: CTRL: bRequestType 21 bRequest 09 wValue 0312 wIndex 0001 wLength 2 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.239443: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549450(0x0000000061549000) deq 0x0000000061549440(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.239444: xhci_queue_trb: CTRL: Buffer 0000000000001112 length 2 TD size 0 intr 0 type 'Data Stage' flags I:i:c:s:i:e:C + kworker/0:0-3233 [000] d..1. 36819.239444: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549460(0x0000000061549000) deq 0x0000000061549440(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.239444: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.239444: xhci_inc_enq: CTRL 00000000b5ea8a38: enq 0x0000000061549470(0x0000000061549000) deq 0x0000000061549440(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.239444: xhci_ring_ep_doorbell: Ring doorbell for Slot 1 ep0in + mdev-9217 [000] d.h1. 36819.239467: xhci_handle_event: EVENT: TRB 0000000061549460 status 'Success' len 0 slot 1 ep 1 type 'Transfer Event' flags e:C + mdev-9217 [000] d.h1. 36819.239467: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + mdev-9217 [000] d.h1. 36819.239467: xhci_inc_deq: CTRL 00000000b5ea8a38: enq 0x0000000061549470(0x0000000061549000) deq 0x0000000061549470(0x0000000061549000) segs 2 stream 0 bounce 0 cycle 1 + mdev-9217 [000] d.h1. 36819.239467: xhci_urb_giveback: 2-1 ep0out-control: urb 000000005e4d0b48 pipe 2147484160 slot 1 length 2/2 sgs 0/0 stream 0 flags 00000000 + mdev-9217 [000] d.h1. 36819.239468: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf42c0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.248496: xhci_get_port_status: port 2-1: 0x00001203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: Wake: + kworker/0:0-3233 [000] d..1. 36819.248514: xhci_queue_trb: CMD: Enable Slot Command: flags C + kworker/0:0-3233 [000] d..1. 36819.248515: xhci_inc_enq: CMD 000000003daf44b1: enq 0x000000004fbf3080(0x000000004fbf3000) deq 0x000000004fbf3070(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.248517: xhci_ring_host_doorbell: Ring doorbell for Command Ring 0 + kworker/0:2-9200 [000] d.h1. 36819.248585: xhci_handle_event: EVENT: TRB 000000004fbf3070 status 'Success' len 0 slot 2 ep 0 type 'Command Completion Event' flags e:C + kworker/0:2-9200 [000] d.h1. 36819.248587: xhci_handle_command: CMD: Enable Slot Command: flags C + kworker/0:2-9200 [000] d.h1. 36819.248589: xhci_inc_deq: CMD 000000003daf44b1: enq 0x000000004fbf3080(0x000000004fbf3000) deq 0x000000004fbf3080(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:2-9200 [000] d.h1. 36819.248589: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf42d0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.248692: xhci_ring_alloc: CTRL 000000005f791c2f: enq 0x0000000061556000(0x0000000061556000) deq 0x0000000061556000(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.248693: xhci_alloc_virt_device: vdev 00000000a6a3f23f ctx 61553000 | 4fbb8000 num 0 state 0 speed 0 port 0 level 0 slot 0 + kworker/0:0-3233 [000] ..... 36819.248695: xhci_alloc_dev: RS 00000 UNKNOWN speed Ctx Entries 0 MEL 0 us Port# 0/0 [TT Slot 0 Port# 0 TTT 0 Intr 0] Addr 0 State enabled/disabled + kworker/0:0-3233 [000] d..1. 36819.248729: xhci_get_port_status: port 2-1: 0x00001203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.248870: xhci_handle_event: EVENT: TRB 0000000002000000 status 'Success' len 0 slot 0 ep 0 type 'Port Status Change Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.248879: xhci_handle_port_status: port 2-1: 0x00201203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: PRC Wake: + kworker/0:0-3233 [000] d.h1. 36819.248885: xhci_hub_status_data: port 2-0: 0x00001203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.248887: xhci_hub_status_data: port 2-1: 0x00201203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: PRC Wake: + kworker/0:0-3233 [000] d.h1. 36819.248889: xhci_hub_status_data: port 2-2: 0x00001203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.248892: xhci_hub_status_data: port 2-3: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.248899: xhci_hub_status_data: port 2-4: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.248901: xhci_hub_status_data: port 2-5: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.248904: xhci_hub_status_data: port 2-6: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.248906: xhci_hub_status_data: port 2-7: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.248909: xhci_hub_status_data: port 2-8: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.248912: xhci_hub_status_data: port 2-9: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.248914: xhci_hub_status_data: port 2-10: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.248917: xhci_hub_status_data: port 2-11: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.248921: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf42e0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.314383: xhci_get_port_status: port 2-1: 0x00201203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: PRC Wake: + kworker/0:0-3233 [000] d..1. 36819.314611: xhci_get_port_status: port 2-1: 0x00001203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: Wake: + -0 [001] dNs2. 36819.358588: xhci_hub_status_data: port 2-0: 0x00001203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: Wake: + -0 [001] dNs2. 36819.358598: xhci_hub_status_data: port 2-1: 0x00001203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: Wake: + -0 [001] dNs2. 36819.358606: xhci_hub_status_data: port 2-2: 0x00001203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: Wake: + -0 [001] dNs2. 36819.358612: xhci_hub_status_data: port 2-3: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + -0 [001] dNs2. 36819.358619: xhci_hub_status_data: port 2-4: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + -0 [001] dNs2. 36819.358625: xhci_hub_status_data: port 2-5: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + -0 [001] dNs2. 36819.358632: xhci_hub_status_data: port 2-6: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + -0 [001] dNs2. 36819.358639: xhci_hub_status_data: port 2-7: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + -0 [001] dNs2. 36819.358646: xhci_hub_status_data: port 2-8: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + -0 [001] dNs2. 36819.358652: xhci_hub_status_data: port 2-9: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + -0 [001] dNs2. 36819.358659: xhci_hub_status_data: port 2-10: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + -0 [001] dNs2. 36819.358666: xhci_hub_status_data: port 2-11: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] ..... 36819.366873: xhci_setup_device_slot: RS 00000 UNKNOWN speed Ctx Entries 0 MEL 0 us Port# 0/0 [TT Slot 0 Port# 0 TTT 0 Intr 0] Addr 0 State enabled/disabled + kworker/0:0-3233 [000] ..... 36819.366881: xhci_setup_addressable_virt_device: vdev 00000000a6a3f23f ctx 61553000 | 4fbb8000 num 0 state 5 speed 5 port 2 level 1 slot 2 + kworker/0:0-3233 [000] ..... 36819.366883: xhci_address_ctx: ctx_64=0, ctx_type=2, ctx_dma=@61553000, ctx_va=@00000000dfd701de + kworker/0:0-3233 [000] ..... 36819.366887: xhci_address_ctrl_ctx: Add: slot ep0 + kworker/0:0-3233 [000] d..1. 36819.366889: xhci_setup_device: vdev 00000000a6a3f23f ctx 61553000 | 4fbb8000 num 0 state 5 speed 5 port 2 level 1 slot 2 + kworker/0:0-3233 [000] d..1. 36819.366894: xhci_queue_trb: CMD: Address Device Command: ctx 0000000061553000 slot 2 flags b:C + kworker/0:0-3233 [000] d..1. 36819.366895: xhci_inc_enq: CMD 000000003daf44b1: enq 0x000000004fbf3090(0x000000004fbf3000) deq 0x000000004fbf3080(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.366897: xhci_ring_host_doorbell: Ring doorbell for Command Ring 0 + -0 [000] d.h2. 36819.367075: xhci_handle_event: EVENT: TRB 000000004fbf3080 status 'Success' len 0 slot 2 ep 0 type 'Command Completion Event' flags e:C + -0 [000] d.h2. 36819.367077: xhci_handle_command: CMD: Address Device Command: ctx 0000000061553000 slot 2 flags b:C + -0 [000] d.h2. 36819.367082: xhci_handle_cmd_addr_dev: RS 00000 super-speed Ctx Entries 1 MEL 0 us Port# 2/0 [TT Slot 0 Port# 0 TTT 0 Intr 0] Addr 2 State addressed + -0 [000] dNh2. 36819.367087: xhci_inc_deq: CMD 000000003daf44b1: enq 0x000000004fbf3090(0x000000004fbf3000) deq 0x000000004fbf3090(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + -0 [000] dNh2. 36819.367088: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf42f0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.367135: xhci_dbg_address: Successful setup address command + kworker/0:0-3233 [000] ..... 36819.367156: xhci_dbg_address: Op regs DCBAA ptr = 0x0000004fbf2000 + kworker/0:0-3233 [000] ..... 36819.367161: xhci_dbg_address: Slot ID 2 dcbaa entry @0000000003b1405e = 0x0000004fbb8000 + kworker/0:0-3233 [000] ..... 36819.367163: xhci_dbg_address: Output Context DMA address = 0x4fbb8000 + kworker/0:0-3233 [000] ..... 36819.367164: xhci_address_ctx: ctx_64=0, ctx_type=2, ctx_dma=@61553000, ctx_va=@00000000dfd701de + kworker/0:0-3233 [000] ..... 36819.367164: xhci_address_ctx: ctx_64=0, ctx_type=1, ctx_dma=@4fbb8000, ctx_va=@000000005610af51 + kworker/0:0-3233 [000] ..... 36819.367165: xhci_dbg_address: Internal device address = 2 + kworker/0:0-3233 [000] ..... 36819.380735: xhci_urb_enqueue: 2-2 ep0out-control: urb 000000005e4d0b48 pipe 2147484544 slot 2 length 0/8 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.380747: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0100 wIndex 0000 wLength 8 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.380749: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556010(0x0000000061556000) deq 0x0000000061556000(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.380749: xhci_queue_trb: CTRL: Buffer 0000000044fe2a40 length 8 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.380749: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556020(0x0000000061556000) deq 0x0000000061556000(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.380750: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.380750: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556030(0x0000000061556000) deq 0x0000000061556000(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.380752: xhci_ring_ep_doorbell: Ring doorbell for Slot 2 ep0in + -0 [000] d.h2. 36819.380871: xhci_handle_event: EVENT: TRB 0000000061556020 status 'Success' len 0 slot 2 ep 1 type 'Transfer Event' flags e:C + -0 [000] d.h2. 36819.380873: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + -0 [000] d.h2. 36819.380875: xhci_inc_deq: CTRL 000000005f791c2f: enq 0x0000000061556030(0x0000000061556000) deq 0x0000000061556030(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + -0 [000] d.h2. 36819.380877: xhci_urb_giveback: 2-2 ep0out-control: urb 000000005e4d0b48 pipe 2147484544 slot 2 length 8/8 sgs 0/0 stream 0 flags 00110200 + -0 [000] d.h2. 36819.380880: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4300(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.380914: xhci_urb_enqueue: 2-2 ep0out-control: urb 000000005e4d0b48 pipe 2147484416 slot 2 length 0/0 sgs 0/0 stream 0 flags 00000000 + kworker/0:0-3233 [000] d..1. 36819.380914: xhci_queue_trb: CTRL: bRequestType 00 bRequest 31 wValue 0028 wIndex 0000 wLength 0 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.380915: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556040(0x0000000061556000) deq 0x0000000061556030(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.380915: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.380915: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556050(0x0000000061556000) deq 0x0000000061556030(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.380915: xhci_ring_ep_doorbell: Ring doorbell for Slot 2 ep0in + -0 [000] d.h2. 36819.380963: xhci_handle_event: EVENT: TRB 0000000061556040 status 'Success' len 0 slot 2 ep 1 type 'Transfer Event' flags e:C + -0 [000] d.h2. 36819.380964: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + -0 [000] d.h2. 36819.380964: xhci_inc_deq: CTRL 000000005f791c2f: enq 0x0000000061556050(0x0000000061556000) deq 0x0000000061556050(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + -0 [000] d.h2. 36819.380965: xhci_urb_giveback: 2-2 ep0out-control: urb 000000005e4d0b48 pipe 2147484416 slot 2 length 0/0 sgs 0/0 stream 0 flags 00000000 + -0 [000] d.h2. 36819.380966: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4310(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.380991: xhci_urb_enqueue: 2-2 ep0out-control: urb 000000005e4d0b48 pipe 2147484544 slot 2 length 0/18 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.380991: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0100 wIndex 0000 wLength 18 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.380991: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556060(0x0000000061556000) deq 0x0000000061556050(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.380992: xhci_queue_trb: CTRL: Buffer 000000004354e320 length 18 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.380992: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556070(0x0000000061556000) deq 0x0000000061556050(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.380992: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.380992: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556080(0x0000000061556000) deq 0x0000000061556050(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.380992: xhci_ring_ep_doorbell: Ring doorbell for Slot 2 ep0in + -0 [000] d.h2. 36819.381028: xhci_handle_event: EVENT: TRB 0000000061556070 status 'Success' len 0 slot 2 ep 1 type 'Transfer Event' flags e:C + -0 [000] d.h2. 36819.381029: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + -0 [000] d.h2. 36819.381029: xhci_inc_deq: CTRL 000000005f791c2f: enq 0x0000000061556080(0x0000000061556000) deq 0x0000000061556080(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + -0 [000] d.h2. 36819.381029: xhci_urb_giveback: 2-2 ep0out-control: urb 000000005e4d0b48 pipe 2147484544 slot 2 length 18/18 sgs 0/0 stream 0 flags 00110200 + -0 [000] d.h2. 36819.381029: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4320(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.381056: xhci_urb_enqueue: 2-2 ep0out-control: urb 000000005e4d0b48 pipe 2147484544 slot 2 length 0/5 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.381056: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0f00 wIndex 0000 wLength 5 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.381056: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556090(0x0000000061556000) deq 0x0000000061556080(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.381057: xhci_queue_trb: CTRL: Buffer 00000000440f2840 length 5 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.381057: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x00000000615560a0(0x0000000061556000) deq 0x0000000061556080(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.381057: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.381058: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x00000000615560b0(0x0000000061556000) deq 0x0000000061556080(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.381058: xhci_ring_ep_doorbell: Ring doorbell for Slot 2 ep0in + -0 [000] d.h2. 36819.381085: xhci_handle_event: EVENT: TRB 00000000615560a0 status 'Success' len 0 slot 2 ep 1 type 'Transfer Event' flags e:C + -0 [000] d.h2. 36819.381085: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + -0 [000] d.h2. 36819.381085: xhci_inc_deq: CTRL 000000005f791c2f: enq 0x00000000615560b0(0x0000000061556000) deq 0x00000000615560b0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + -0 [000] d.h2. 36819.381086: xhci_urb_giveback: 2-2 ep0out-control: urb 000000005e4d0b48 pipe 2147484544 slot 2 length 5/5 sgs 0/0 stream 0 flags 00110200 + -0 [000] d.h2. 36819.381086: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4330(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.381109: xhci_urb_enqueue: 2-2 ep0out-control: urb 000000005e4d0b48 pipe 2147484544 slot 2 length 0/15 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.381110: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0f00 wIndex 0000 wLength 15 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.381110: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x00000000615560c0(0x0000000061556000) deq 0x00000000615560b0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.381110: xhci_queue_trb: CTRL: Buffer 0000000044bbbd80 length 15 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.381110: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x00000000615560d0(0x0000000061556000) deq 0x00000000615560b0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.381110: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.381110: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x00000000615560e0(0x0000000061556000) deq 0x00000000615560b0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.381110: xhci_ring_ep_doorbell: Ring doorbell for Slot 2 ep0in + -0 [000] d.h2. 36819.381152: xhci_handle_event: EVENT: TRB 00000000615560d0 status 'Success' len 0 slot 2 ep 1 type 'Transfer Event' flags e:C + -0 [000] d.h2. 36819.381153: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + -0 [000] d.h2. 36819.381153: xhci_inc_deq: CTRL 000000005f791c2f: enq 0x00000000615560e0(0x0000000061556000) deq 0x00000000615560e0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + -0 [000] d.h2. 36819.381153: xhci_urb_giveback: 2-2 ep0out-control: urb 000000005e4d0b48 pipe 2147484544 slot 2 length 15/15 sgs 0/0 stream 0 flags 00110200 + -0 [000] d.h2. 36819.381154: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4340(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.381845: xhci_urb_enqueue: 2-2 ep0out-control: urb 000000005e4d0b48 pipe 2147484544 slot 2 length 0/9 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.381848: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0200 wIndex 0000 wLength 9 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.381848: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x00000000615560f0(0x0000000061556000) deq 0x00000000615560e0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.381849: xhci_queue_trb: CTRL: Buffer 0000000044bbbe30 length 9 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.381849: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556100(0x0000000061556000) deq 0x00000000615560e0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.381849: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.381849: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556110(0x0000000061556000) deq 0x00000000615560e0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.381850: xhci_ring_ep_doorbell: Ring doorbell for Slot 2 ep0in + kworker/0:2-9200 [000] d.h1. 36819.381909: xhci_handle_event: EVENT: TRB 0000000061556100 status 'Success' len 0 slot 2 ep 1 type 'Transfer Event' flags e:C + kworker/0:2-9200 [000] d.h1. 36819.381911: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:2-9200 [000] d.h1. 36819.381911: xhci_inc_deq: CTRL 000000005f791c2f: enq 0x0000000061556110(0x0000000061556000) deq 0x0000000061556110(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:2-9200 [000] d.h1. 36819.381913: xhci_urb_giveback: 2-2 ep0out-control: urb 000000005e4d0b48 pipe 2147484544 slot 2 length 9/9 sgs 0/0 stream 0 flags 00110200 + kworker/0:2-9200 [000] d.h1. 36819.381914: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4350(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.381941: xhci_urb_enqueue: 2-2 ep0out-control: urb 000000005e4d0b48 pipe 2147484544 slot 2 length 0/71 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.381942: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0200 wIndex 0000 wLength 71 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.381942: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556120(0x0000000061556000) deq 0x0000000061556110(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.381942: xhci_queue_trb: CTRL: Buffer 00000000425c4360 length 71 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.381942: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556130(0x0000000061556000) deq 0x0000000061556110(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.381942: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.381942: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556140(0x0000000061556000) deq 0x0000000061556110(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.381943: xhci_ring_ep_doorbell: Ring doorbell for Slot 2 ep0in + kworker/0:2-9200 [000] d.h1. 36819.381989: xhci_handle_event: EVENT: TRB 0000000061556130 status 'Success' len 0 slot 2 ep 1 type 'Transfer Event' flags e:C + kworker/0:2-9200 [000] d.h1. 36819.381989: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:2-9200 [000] d.h1. 36819.381989: xhci_inc_deq: CTRL 000000005f791c2f: enq 0x0000000061556140(0x0000000061556000) deq 0x0000000061556140(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:2-9200 [000] d.h1. 36819.381990: xhci_urb_giveback: 2-2 ep0out-control: urb 000000005e4d0b48 pipe 2147484544 slot 2 length 71/71 sgs 0/0 stream 0 flags 00110200 + kworker/0:2-9200 [000] d.h1. 36819.381990: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4360(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.382013: xhci_urb_enqueue: 2-2 ep0out-control: urb 000000005e4d0b48 pipe 2147484544 slot 2 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.382013: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0300 wIndex 0000 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.382013: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556150(0x0000000061556000) deq 0x0000000061556140(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.382013: xhci_queue_trb: CTRL: Buffer 0000000042c44800 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.382014: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556160(0x0000000061556000) deq 0x0000000061556140(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.382014: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.382014: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556170(0x0000000061556000) deq 0x0000000061556140(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.382014: xhci_ring_ep_doorbell: Ring doorbell for Slot 2 ep0in + kworker/0:2-9200 [000] d.h1. 36819.382053: xhci_handle_event: EVENT: TRB 0000000061556150 status 'Short Packet' len 251 slot 2 ep 1 type 'Transfer Event' flags e:C + kworker/0:2-9200 [000] d.h1. 36819.382053: xhci_handle_transfer: CTRL: Buffer 0000000042c44800 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:2-9200 [000] d.h1. 36819.382053: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4370(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:2-9200 [000] d.h1. 36819.382053: xhci_handle_event: EVENT: TRB 0000000061556160 status 'Success' len 0 slot 2 ep 1 type 'Transfer Event' flags e:C + kworker/0:2-9200 [000] d.h1. 36819.382053: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:2-9200 [000] d.h1. 36819.382053: xhci_inc_deq: CTRL 000000005f791c2f: enq 0x0000000061556170(0x0000000061556000) deq 0x0000000061556170(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:2-9200 [000] d.h1. 36819.382054: xhci_urb_giveback: 2-2 ep0out-control: urb 000000005e4d0b48 pipe 2147484544 slot 2 length 4/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:2-9200 [000] d.h1. 36819.382054: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4380(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.382076: xhci_urb_enqueue: 2-2 ep0out-control: urb 000000005e4d0b48 pipe 2147484544 slot 2 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.382076: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0302 wIndex 0409 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.382076: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556180(0x0000000061556000) deq 0x0000000061556170(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.382076: xhci_queue_trb: CTRL: Buffer 0000000042c44800 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.382076: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556190(0x0000000061556000) deq 0x0000000061556170(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.382077: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.382077: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x00000000615561a0(0x0000000061556000) deq 0x0000000061556170(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.382077: xhci_ring_ep_doorbell: Ring doorbell for Slot 2 ep0in + kworker/0:2-9200 [000] d.h2. 36819.382121: xhci_handle_event: EVENT: TRB 0000000061556180 status 'Short Packet' len 221 slot 2 ep 1 type 'Transfer Event' flags e:C + kworker/0:2-9200 [000] d.h2. 36819.382121: xhci_handle_transfer: CTRL: Buffer 0000000042c44800 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:2-9200 [000] d.h2. 36819.382121: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4390(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:2-9200 [000] d.h2. 36819.382121: xhci_handle_event: EVENT: TRB 0000000061556190 status 'Success' len 0 slot 2 ep 1 type 'Transfer Event' flags e:C + kworker/0:2-9200 [000] d.h2. 36819.382121: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:2-9200 [000] d.h2. 36819.382123: xhci_inc_deq: CTRL 000000005f791c2f: enq 0x00000000615561a0(0x0000000061556000) deq 0x00000000615561a0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:2-9200 [000] d.h2. 36819.382123: xhci_urb_giveback: 2-2 ep0out-control: urb 000000005e4d0b48 pipe 2147484544 slot 2 length 34/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:2-9200 [000] d.h2. 36819.382123: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf43a0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.382244: xhci_urb_enqueue: 2-2 ep0out-control: urb 000000005e4d0b48 pipe 2147484544 slot 2 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.382245: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0301 wIndex 0409 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.382246: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x00000000615561b0(0x0000000061556000) deq 0x00000000615561a0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.382246: xhci_queue_trb: CTRL: Buffer 0000000042c44800 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.382246: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x00000000615561c0(0x0000000061556000) deq 0x00000000615561a0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.382247: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.382247: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x00000000615561d0(0x0000000061556000) deq 0x00000000615561a0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.382248: xhci_ring_ep_doorbell: Ring doorbell for Slot 2 ep0in + kworker/0:2-9200 [000] d.h1. 36819.382304: xhci_handle_event: EVENT: TRB 00000000615561b0 status 'Short Packet' len 235 slot 2 ep 1 type 'Transfer Event' flags e:C + kworker/0:2-9200 [000] d.h1. 36819.382305: xhci_handle_transfer: CTRL: Buffer 0000000042c44800 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:2-9200 [000] d.h1. 36819.382306: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf43b0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:2-9200 [000] d.h1. 36819.382306: xhci_handle_event: EVENT: TRB 00000000615561c0 status 'Success' len 0 slot 2 ep 1 type 'Transfer Event' flags e:C + kworker/0:2-9200 [000] d.h1. 36819.382306: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:2-9200 [000] d.h1. 36819.382307: xhci_inc_deq: CTRL 000000005f791c2f: enq 0x00000000615561d0(0x0000000061556000) deq 0x00000000615561d0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:2-9200 [000] d.h1. 36819.382307: xhci_urb_giveback: 2-2 ep0out-control: urb 000000005e4d0b48 pipe 2147484544 slot 2 length 20/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:2-9200 [000] d.h1. 36819.382308: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf43c0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.382348: xhci_urb_enqueue: 2-2 ep0out-control: urb 000000005e4d0b48 pipe 2147484544 slot 2 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.382349: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0303 wIndex 0409 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.382350: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x00000000615561e0(0x0000000061556000) deq 0x00000000615561d0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.382350: xhci_queue_trb: CTRL: Buffer 0000000042c44800 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.382350: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x00000000615561f0(0x0000000061556000) deq 0x00000000615561d0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.382350: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.382351: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556200(0x0000000061556000) deq 0x00000000615561d0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.382351: xhci_ring_ep_doorbell: Ring doorbell for Slot 2 ep0in + -0 [000] d.h2. 36819.382413: xhci_handle_event: EVENT: TRB 00000000615561e0 status 'Short Packet' len 241 slot 2 ep 1 type 'Transfer Event' flags e:C + -0 [000] d.h2. 36819.382413: xhci_handle_transfer: CTRL: Buffer 0000000042c44800 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + -0 [000] d.h2. 36819.382414: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf43d0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + -0 [000] d.h2. 36819.382414: xhci_handle_event: EVENT: TRB 00000000615561f0 status 'Success' len 0 slot 2 ep 1 type 'Transfer Event' flags e:C + -0 [000] d.h2. 36819.382414: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + -0 [000] d.h2. 36819.382415: xhci_inc_deq: CTRL 000000005f791c2f: enq 0x0000000061556200(0x0000000061556000) deq 0x0000000061556200(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + -0 [000] d.h2. 36819.382415: xhci_urb_giveback: 2-2 ep0out-control: urb 000000005e4d0b48 pipe 2147484544 slot 2 length 14/255 sgs 0/0 stream 0 flags 00110200 + -0 [000] d.h2. 36819.382416: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf43e0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.386295: xhci_ring_alloc: INTR 0000000097aaaa90: enq 0x0000000061554000(0x0000000061554000) deq 0x0000000061554000(0x0000000061554000) segs 2 stream 0 bounce 64 cycle 1 + kworker/0:0-3233 [000] ..... 36819.386297: xhci_add_endpoint: State disabled mult 1 max P. Streams 0 interval 1000 us max ESIT payload 64 CErr 3 Type Int IN burst 0 maxp 64 deq 0000000061554001 avg trb len 64 + kworker/0:0-3233 [000] ..... 36819.386303: xhci_ring_alloc: INTR 00000000a3515fc4: enq 0x0000000061531000(0x0000000061531000) deq 0x0000000061531000(0x0000000061531000) segs 2 stream 0 bounce 64 cycle 1 + kworker/0:0-3233 [000] ..... 36819.386303: xhci_add_endpoint: State disabled mult 1 max P. Streams 0 interval 1000 us max ESIT payload 64 CErr 3 Type Int IN burst 0 maxp 64 deq 0000000061531001 avg trb len 64 + kworker/0:0-3233 [000] d..1. 36819.386305: xhci_configure_endpoint_ctrl_ctx: Add: slot 1in 2in + kworker/0:0-3233 [000] d..1. 36819.386306: xhci_configure_endpoint: RS 00000 super-speed Ctx Entries 5 MEL 0 us Port# 2/0 [TT Slot 0 Port# 0 TTT 0 Intr 0] Addr 0 State enabled/disabled + kworker/0:0-3233 [000] d..1. 36819.386310: xhci_queue_trb: CMD: Configure Endpoint Command: ctx 0000000061553000 slot 2 flags d:C + kworker/0:0-3233 [000] d..1. 36819.386310: xhci_inc_enq: CMD 000000003daf44b1: enq 0x000000004fbf30a0(0x000000004fbf3000) deq 0x000000004fbf3090(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.386311: xhci_ring_host_doorbell: Ring doorbell for Command Ring 0 + kworker/0:0-3233 [000] d.h1. 36819.386377: xhci_handle_event: EVENT: TRB 000000004fbf3090 status 'Success' len 0 slot 2 ep 0 type 'Command Completion Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.386377: xhci_handle_command: CMD: Configure Endpoint Command: ctx 0000000061553000 slot 2 flags d:C + kworker/0:0-3233 [000] d.h1. 36819.386379: xhci_inc_deq: CMD 000000003daf44b1: enq 0x000000004fbf30a0(0x000000004fbf3000) deq 0x000000004fbf30a0(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.386379: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf43f0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.386397: xhci_dbg_context_change: Successful Endpoint Configure command + kworker/0:0-3233 [000] d..1. 36819.386427: xhci_queue_trb: CMD: Stop Ring Command: slot 2 sp 0 ep 3 flags C + kworker/0:0-3233 [000] d..1. 36819.386427: xhci_inc_enq: CMD 000000003daf44b1: enq 0x000000004fbf30b0(0x000000004fbf3000) deq 0x000000004fbf30a0(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.386427: xhci_ring_host_doorbell: Ring doorbell for Command Ring 0 + kworker/0:0-3233 [000] d.h1. 36819.386473: xhci_handle_event: EVENT: TRB 000000004fbf30a0 status 'Success' len 0 slot 2 ep 0 type 'Command Completion Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.386474: xhci_handle_command: CMD: Stop Ring Command: slot 2 sp 0 ep 3 flags C + kworker/0:0-3233 [000] d.h1. 36819.386475: xhci_inc_deq: CMD 000000003daf44b1: enq 0x000000004fbf30b0(0x000000004fbf3000) deq 0x000000004fbf30b0(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.386475: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4400(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.386608: xhci_queue_trb: CMD: Configure Endpoint Command: ctx 000000006155a000 slot 2 flags d:C + kworker/0:0-3233 [000] d..1. 36819.386608: xhci_inc_enq: CMD 000000003daf44b1: enq 0x000000004fbf30c0(0x000000004fbf3000) deq 0x000000004fbf30b0(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.386609: xhci_ring_host_doorbell: Ring doorbell for Command Ring 0 + kworker/0:0-3233 [000] d.h1. 36819.386654: xhci_handle_event: EVENT: TRB 000000004fbf30b0 status 'Success' len 0 slot 2 ep 0 type 'Command Completion Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.386654: xhci_handle_command: CMD: Configure Endpoint Command: ctx 000000006155a000 slot 2 flags d:C + kworker/0:0-3233 [000] d.h1. 36819.386655: xhci_inc_deq: CMD 000000003daf44b1: enq 0x000000004fbf30c0(0x000000004fbf3000) deq 0x000000004fbf30c0(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.386655: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4410(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.386840: xhci_queue_trb: CMD: Stop Ring Command: slot 2 sp 0 ep 5 flags C + kworker/0:0-3233 [000] d..1. 36819.386840: xhci_inc_enq: CMD 000000003daf44b1: enq 0x000000004fbf30d0(0x000000004fbf3000) deq 0x000000004fbf30c0(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.386841: xhci_ring_host_doorbell: Ring doorbell for Command Ring 0 + kworker/0:0-3233 [000] d.h1. 36819.386883: xhci_handle_event: EVENT: TRB 000000004fbf30c0 status 'Success' len 0 slot 2 ep 0 type 'Command Completion Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.386884: xhci_handle_command: CMD: Stop Ring Command: slot 2 sp 0 ep 5 flags C + kworker/0:0-3233 [000] d.h1. 36819.386885: xhci_inc_deq: CMD 000000003daf44b1: enq 0x000000004fbf30d0(0x000000004fbf3000) deq 0x000000004fbf30d0(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.386885: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4420(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.386901: xhci_queue_trb: CMD: Configure Endpoint Command: ctx 000000006155a000 slot 2 flags d:C + kworker/0:0-3233 [000] d..1. 36819.386901: xhci_inc_enq: CMD 000000003daf44b1: enq 0x000000004fbf30e0(0x000000004fbf3000) deq 0x000000004fbf30d0(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.386902: xhci_ring_host_doorbell: Ring doorbell for Command Ring 0 + -0 [000] d.h2. 36819.386931: xhci_handle_event: EVENT: TRB 000000004fbf30d0 status 'Success' len 0 slot 2 ep 0 type 'Command Completion Event' flags e:C + -0 [000] d.h2. 36819.386931: xhci_handle_command: CMD: Configure Endpoint Command: ctx 000000006155a000 slot 2 flags d:C + -0 [000] dNh2. 36819.386934: xhci_inc_deq: CMD 000000003daf44b1: enq 0x000000004fbf30e0(0x000000004fbf3000) deq 0x000000004fbf30e0(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + -0 [000] dNh2. 36819.386934: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4430(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.386959: xhci_urb_enqueue: 2-2 ep0out-control: urb 00000000af0ab836 pipe 2147484416 slot 2 length 0/0 sgs 0/0 stream 0 flags 00000000 + kworker/0:0-3233 [000] d..1. 36819.386961: xhci_queue_trb: CTRL: bRequestType 00 bRequest 09 wValue 0001 wIndex 0000 wLength 0 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.386962: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556210(0x0000000061556000) deq 0x0000000061556200(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.386962: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.386962: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556220(0x0000000061556000) deq 0x0000000061556200(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.386963: xhci_ring_ep_doorbell: Ring doorbell for Slot 2 ep0in + kworker/0:0-3233 [000] d.h1. 36819.387074: xhci_handle_event: EVENT: TRB 0000000061556210 status 'Success' len 0 slot 2 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.387076: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d.h1. 36819.387077: xhci_inc_deq: CTRL 000000005f791c2f: enq 0x0000000061556220(0x0000000061556000) deq 0x0000000061556220(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.387078: xhci_urb_giveback: 2-2 ep0out-control: urb 00000000af0ab836 pipe 2147484416 slot 2 length 0/0 sgs 0/0 stream 0 flags 00000000 + kworker/0:0-3233 [000] d.h1. 36819.387081: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4440(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.389004: xhci_urb_enqueue: 2-2 ep0out-control: urb 00000000af0ab836 pipe 2147484544 slot 2 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.389009: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0301 wIndex 0409 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.389010: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556230(0x0000000061556000) deq 0x0000000061556220(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.389011: xhci_queue_trb: CTRL: Buffer 0000000044a81100 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.389011: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556240(0x0000000061556000) deq 0x0000000061556220(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.389011: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.389012: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556250(0x0000000061556000) deq 0x0000000061556220(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.389012: xhci_ring_ep_doorbell: Ring doorbell for Slot 2 ep0in + kworker/0:0-3233 [000] d.h1. 36819.389071: xhci_handle_event: EVENT: TRB 0000000061556230 status 'Short Packet' len 235 slot 2 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.389072: xhci_handle_transfer: CTRL: Buffer 0000000044a81100 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d.h1. 36819.389073: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4450(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.389073: xhci_handle_event: EVENT: TRB 0000000061556240 status 'Success' len 0 slot 2 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.389074: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d.h1. 36819.389074: xhci_inc_deq: CTRL 000000005f791c2f: enq 0x0000000061556250(0x0000000061556000) deq 0x0000000061556250(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.389075: xhci_urb_giveback: 2-2 ep0out-control: urb 00000000af0ab836 pipe 2147484544 slot 2 length 20/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d.h1. 36819.389078: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4460(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.389156: xhci_urb_enqueue: 2-2 ep0out-control: urb 00000000af0ab836 pipe 2147484544 slot 2 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.389157: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0304 wIndex 0409 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.389157: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556260(0x0000000061556000) deq 0x0000000061556250(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.389157: xhci_queue_trb: CTRL: Buffer 0000000044a81800 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.389157: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556270(0x0000000061556000) deq 0x0000000061556250(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.389157: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.389158: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556280(0x0000000061556000) deq 0x0000000061556250(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.389158: xhci_ring_ep_doorbell: Ring doorbell for Slot 2 ep0in + kworker/0:0-3233 [000] d.h1. 36819.389206: xhci_handle_event: EVENT: TRB 0000000061556260 status 'Short Packet' len 201 slot 2 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.389206: xhci_handle_transfer: CTRL: Buffer 0000000044a81800 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d.h1. 36819.389206: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4470(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.389207: xhci_handle_event: EVENT: TRB 0000000061556270 status 'Success' len 0 slot 2 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.389207: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d.h1. 36819.389207: xhci_inc_deq: CTRL 000000005f791c2f: enq 0x0000000061556280(0x0000000061556000) deq 0x0000000061556280(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.389208: xhci_urb_giveback: 2-2 ep0out-control: urb 00000000af0ab836 pipe 2147484544 slot 2 length 54/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d.h1. 36819.389208: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4480(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.389278: xhci_urb_enqueue: 2-2 ep0out-control: urb 00000000af0ab836 pipe 2147484544 slot 2 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.389279: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0303 wIndex 0409 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.389279: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556290(0x0000000061556000) deq 0x0000000061556280(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.389279: xhci_queue_trb: CTRL: Buffer 0000000044a81800 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.389279: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x00000000615562a0(0x0000000061556000) deq 0x0000000061556280(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.389279: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.389279: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x00000000615562b0(0x0000000061556000) deq 0x0000000061556280(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.389280: xhci_ring_ep_doorbell: Ring doorbell for Slot 2 ep0in + kworker/0:0-3233 [000] d.h1. 36819.389326: xhci_handle_event: EVENT: TRB 0000000061556290 status 'Short Packet' len 241 slot 2 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.389326: xhci_handle_transfer: CTRL: Buffer 0000000044a81800 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d.h1. 36819.389327: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4490(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.389327: xhci_handle_event: EVENT: TRB 00000000615562a0 status 'Success' len 0 slot 2 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.389327: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d.h1. 36819.389327: xhci_inc_deq: CTRL 000000005f791c2f: enq 0x00000000615562b0(0x0000000061556000) deq 0x00000000615562b0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.389328: xhci_urb_giveback: 2-2 ep0out-control: urb 00000000af0ab836 pipe 2147484544 slot 2 length 14/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d.h1. 36819.389328: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf44a0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.389361: xhci_urb_enqueue: 2-2 ep0out-control: urb 00000000af0ab836 pipe 2147484416 slot 2 length 0/0 sgs 0/0 stream 0 flags 00000000 + kworker/0:0-3233 [000] d..1. 36819.389362: xhci_queue_trb: CTRL: bRequestType 21 bRequest 0a wValue 0000 wIndex 0000 wLength 0 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.389362: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x00000000615562c0(0x0000000061556000) deq 0x00000000615562b0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.389362: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.389362: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x00000000615562d0(0x0000000061556000) deq 0x00000000615562b0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.389362: xhci_ring_ep_doorbell: Ring doorbell for Slot 2 ep0in + rcu_preempt-19 [000] d.h2. 36819.389401: xhci_handle_event: EVENT: TRB 00000000615562c0 status 'Success' len 0 slot 2 ep 1 type 'Transfer Event' flags e:C + rcu_preempt-19 [000] d.h2. 36819.389401: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + rcu_preempt-19 [000] d.h2. 36819.389401: xhci_inc_deq: CTRL 000000005f791c2f: enq 0x00000000615562d0(0x0000000061556000) deq 0x00000000615562d0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + rcu_preempt-19 [000] d.h2. 36819.389402: xhci_urb_giveback: 2-2 ep0out-control: urb 00000000af0ab836 pipe 2147484416 slot 2 length 0/0 sgs 0/0 stream 0 flags 00000000 + rcu_preempt-19 [000] d.h2. 36819.389402: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf44b0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.389490: xhci_urb_enqueue: 2-2 ep0out-control: urb 00000000af0ab836 pipe 2147484544 slot 2 length 0/58 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.389491: xhci_queue_trb: CTRL: bRequestType 81 bRequest 06 wValue 2200 wIndex 0000 wLength 58 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.389491: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x00000000615562e0(0x0000000061556000) deq 0x00000000615562d0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.389492: xhci_queue_trb: CTRL: Buffer 0000000044fe2140 length 58 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.389492: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x00000000615562f0(0x0000000061556000) deq 0x00000000615562d0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.389492: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.389493: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556300(0x0000000061556000) deq 0x00000000615562d0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.389493: xhci_ring_ep_doorbell: Ring doorbell for Slot 2 ep0in + kworker/u8:1-8345 [000] d.h1. 36819.389529: xhci_handle_event: EVENT: TRB 00000000615562f0 status 'Success' len 0 slot 2 ep 1 type 'Transfer Event' flags e:C + kworker/u8:1-8345 [000] d.h1. 36819.389530: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/u8:1-8345 [000] d.h1. 36819.389530: xhci_inc_deq: CTRL 000000005f791c2f: enq 0x0000000061556300(0x0000000061556000) deq 0x0000000061556300(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/u8:1-8345 [000] d.h1. 36819.389531: xhci_urb_giveback: 2-2 ep0out-control: urb 00000000af0ab836 pipe 2147484544 slot 2 length 58/58 sgs 0/0 stream 0 flags 00110200 + kworker/u8:1-8345 [000] d.h1. 36819.389531: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf44c0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.391677: xhci_urb_enqueue: 2-2 ep0out-control: urb 00000000027af5cd pipe 2147484416 slot 2 length 0/1 sgs 0/0 stream 0 flags 00100004 + kworker/0:0-3233 [000] d..2. 36819.391683: xhci_queue_trb: CTRL: bRequestType 21 bRequest 09 wValue 0200 wIndex 0000 wLength 1 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..2. 36819.391684: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556310(0x0000000061556000) deq 0x0000000061556300(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..2. 36819.391684: xhci_queue_trb: CTRL: Buffer 00000000615ce400 length 1 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:i:e:C + kworker/0:0-3233 [000] d..2. 36819.391684: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556320(0x0000000061556000) deq 0x0000000061556300(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..2. 36819.391685: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..2. 36819.391685: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556330(0x0000000061556000) deq 0x0000000061556300(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..2. 36819.391686: xhci_ring_ep_doorbell: Ring doorbell for Slot 2 ep0in + kworker/0:0-3233 [000] d.h1. 36819.391889: xhci_handle_event: EVENT: TRB 0000000061556320 status 'Success' len 0 slot 2 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.391892: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d.h1. 36819.391894: xhci_inc_deq: CTRL 000000005f791c2f: enq 0x0000000061556330(0x0000000061556000) deq 0x0000000061556330(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.391896: xhci_urb_giveback: 2-2 ep0out-control: urb 00000000027af5cd pipe 2147484416 slot 2 length 1/1 sgs 0/0 stream 0 flags 00100004 + kworker/0:0-3233 [000] d.h1. 36819.391898: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf44d0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.393800: xhci_urb_enqueue: 2-2 ep1in-intr: urb 00000000af0ab836 pipe 1077969792 slot 2 length 0/8 sgs 0/0 stream 0 flags 00000204 + kworker/0:0-3233 [000] d..2. 36819.393807: xhci_queue_trb: INTR: Buffer 00000000615ce300 length 8 TD size 0 intr 0 type 'Normal' flags b:i:I:c:s:I:e:c + kworker/0:0-3233 [000] d..2. 36819.393807: xhci_inc_enq: INTR 0000000097aaaa90: enq 0x0000000061554010(0x0000000061554000) deq 0x0000000061554000(0x0000000061554000) segs 2 stream 0 bounce 64 cycle 1 + kworker/0:0-3233 [000] d..2. 36819.393809: xhci_ring_ep_doorbell: Ring doorbell for Slot 2 ep1in + kworker/0:0-3233 [000] ..... 36819.543872: xhci_urb_enqueue: 2-2 ep0out-control: urb 000000008ad89296 pipe 2147484544 slot 2 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.543879: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0304 wIndex 0409 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.543880: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556340(0x0000000061556000) deq 0x0000000061556330(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.543881: xhci_queue_trb: CTRL: Buffer 0000000046358400 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.543881: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556350(0x0000000061556000) deq 0x0000000061556330(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.543881: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.543881: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556360(0x0000000061556000) deq 0x0000000061556330(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.543883: xhci_ring_ep_doorbell: Ring doorbell for Slot 2 ep0in + kworker/u8:2-9150 [000] d.h1. 36819.543993: xhci_handle_event: EVENT: TRB 0000000061556340 status 'Short Packet' len 201 slot 2 ep 1 type 'Transfer Event' flags e:C + kworker/u8:2-9150 [000] d.h1. 36819.543996: xhci_handle_transfer: CTRL: Buffer 0000000046358400 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/u8:2-9150 [000] d.h1. 36819.543997: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf44e0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/u8:2-9150 [000] d.h1. 36819.543997: xhci_handle_event: EVENT: TRB 0000000061556350 status 'Success' len 0 slot 2 ep 1 type 'Transfer Event' flags e:C + kworker/u8:2-9150 [000] d.h1. 36819.543998: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/u8:2-9150 [000] d.h1. 36819.543998: xhci_inc_deq: CTRL 000000005f791c2f: enq 0x0000000061556360(0x0000000061556000) deq 0x0000000061556360(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/u8:2-9150 [000] d.h1. 36819.544000: xhci_urb_giveback: 2-2 ep0out-control: urb 000000008ad89296 pipe 2147484544 slot 2 length 54/255 sgs 0/0 stream 0 flags 00110200 + kworker/u8:2-9150 [000] d.h1. 36819.544001: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf44f0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.544958: xhci_urb_enqueue: 2-2 ep0out-control: urb 000000008ad89296 pipe 2147484544 slot 2 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.544962: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0303 wIndex 0409 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.544963: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556370(0x0000000061556000) deq 0x0000000061556360(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.544964: xhci_queue_trb: CTRL: Buffer 0000000046358400 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.544964: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556380(0x0000000061556000) deq 0x0000000061556360(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.544964: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.544964: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x0000000061556390(0x0000000061556000) deq 0x0000000061556360(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.544965: xhci_ring_ep_doorbell: Ring doorbell for Slot 2 ep0in + mdev-9249 [000] d.h1. 36819.545057: xhci_handle_event: EVENT: TRB 0000000061556370 status 'Short Packet' len 241 slot 2 ep 1 type 'Transfer Event' flags e:C + mdev-9249 [000] d.h1. 36819.545058: xhci_handle_transfer: CTRL: Buffer 0000000046358400 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + mdev-9249 [000] d.h1. 36819.545059: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4500(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + mdev-9249 [000] d.h1. 36819.545059: xhci_handle_event: EVENT: TRB 0000000061556380 status 'Success' len 0 slot 2 ep 1 type 'Transfer Event' flags e:C + mdev-9249 [000] d.h1. 36819.545059: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + mdev-9249 [000] d.h1. 36819.545060: xhci_inc_deq: CTRL 000000005f791c2f: enq 0x0000000061556390(0x0000000061556000) deq 0x0000000061556390(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + mdev-9249 [000] d.h1. 36819.545061: xhci_urb_giveback: 2-2 ep0out-control: urb 000000008ad89296 pipe 2147484544 slot 2 length 14/255 sgs 0/0 stream 0 flags 00110200 + mdev-9249 [000] d.h1. 36819.545062: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4510(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.545696: xhci_urb_enqueue: 2-2 ep0out-control: urb 000000008ad89296 pipe 2147484416 slot 2 length 0/0 sgs 0/0 stream 0 flags 00000000 + kworker/0:0-3233 [000] d..1. 36819.545699: xhci_queue_trb: CTRL: bRequestType 21 bRequest 0a wValue 0000 wIndex 0001 wLength 0 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.545700: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x00000000615563a0(0x0000000061556000) deq 0x0000000061556390(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.545700: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.545700: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x00000000615563b0(0x0000000061556000) deq 0x0000000061556390(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.545701: xhci_ring_ep_doorbell: Ring doorbell for Slot 2 ep0in + kworker/0:0-3233 [000] d.h1. 36819.545768: xhci_handle_event: EVENT: TRB 00000000615563a0 status 'Success' len 0 slot 2 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.545769: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d.h1. 36819.545770: xhci_inc_deq: CTRL 000000005f791c2f: enq 0x00000000615563b0(0x0000000061556000) deq 0x00000000615563b0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.545772: xhci_urb_giveback: 2-2 ep0out-control: urb 000000008ad89296 pipe 2147484416 slot 2 length 0/0 sgs 0/0 stream 0 flags 00000000 + kworker/0:0-3233 [000] d.h1. 36819.545774: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4520(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.545813: xhci_urb_enqueue: 2-2 ep0out-control: urb 000000008ad89296 pipe 2147484544 slot 2 length 0/160 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.545814: xhci_queue_trb: CTRL: bRequestType 81 bRequest 06 wValue 2200 wIndex 0001 wLength 160 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.545814: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x00000000615563c0(0x0000000061556000) deq 0x00000000615563b0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.545814: xhci_queue_trb: CTRL: Buffer 0000000044440300 length 160 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.545814: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x00000000615563d0(0x0000000061556000) deq 0x00000000615563b0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.545814: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.545815: xhci_inc_enq: CTRL 000000005f791c2f: enq 0x00000000615563e0(0x0000000061556000) deq 0x00000000615563b0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.545816: xhci_ring_ep_doorbell: Ring doorbell for Slot 2 ep0in + mdev-9249 [000] d.h2. 36819.545843: xhci_handle_event: EVENT: TRB 00000000615563d0 status 'Success' len 0 slot 2 ep 1 type 'Transfer Event' flags e:C + mdev-9249 [000] d.h2. 36819.545844: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + mdev-9249 [000] d.h2. 36819.545844: xhci_inc_deq: CTRL 000000005f791c2f: enq 0x00000000615563e0(0x0000000061556000) deq 0x00000000615563e0(0x0000000061556000) segs 2 stream 0 bounce 0 cycle 1 + mdev-9249 [000] d.h2. 36819.545844: xhci_urb_giveback: 2-2 ep0out-control: urb 000000008ad89296 pipe 2147484544 slot 2 length 160/160 sgs 0/0 stream 0 flags 00110200 + mdev-9249 [000] d.h2. 36819.545845: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4530(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.550508: xhci_urb_enqueue: 2-2 ep2in-intr: urb 000000005df44217 pipe 1078002560 slot 2 length 0/9 sgs 0/0 stream 0 flags 00000204 + kworker/0:0-3233 [000] d..2. 36819.550517: xhci_queue_trb: INTR: Buffer 00000000615ce480 length 9 TD size 0 intr 0 type 'Normal' flags b:i:I:c:s:I:e:c + kworker/0:0-3233 [000] d..2. 36819.550518: xhci_inc_enq: INTR 00000000a3515fc4: enq 0x0000000061531010(0x0000000061531000) deq 0x0000000061531000(0x0000000061531000) segs 2 stream 0 bounce 64 cycle 1 + kworker/0:0-3233 [000] d..2. 36819.550520: xhci_ring_ep_doorbell: Ring doorbell for Slot 2 ep2in + kworker/0:0-3233 [000] d..1. 36819.707498: xhci_get_port_status: port 2-2: 0x00001203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: Wake: + kworker/0:0-3233 [000] d..1. 36819.707522: xhci_queue_trb: CMD: Enable Slot Command: flags C + kworker/0:0-3233 [000] d..1. 36819.707523: xhci_inc_enq: CMD 000000003daf44b1: enq 0x000000004fbf30f0(0x000000004fbf3000) deq 0x000000004fbf30e0(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.707524: xhci_ring_host_doorbell: Ring doorbell for Command Ring 0 + kworker/0:0-3233 [000] d.h1. 36819.707585: xhci_handle_event: EVENT: TRB 000000004fbf30e0 status 'Success' len 0 slot 3 ep 0 type 'Command Completion Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.707586: xhci_handle_command: CMD: Enable Slot Command: flags C + kworker/0:0-3233 [000] d.h1. 36819.707587: xhci_inc_deq: CMD 000000003daf44b1: enq 0x000000004fbf30f0(0x000000004fbf3000) deq 0x000000004fbf30f0(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.707587: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4540(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.707646: xhci_ring_alloc: CTRL 00000000dacb45d7: enq 0x0000000045f9d000(0x0000000045f9d000) deq 0x0000000045f9d000(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.707647: xhci_alloc_virt_device: vdev 0000000049a0d127 ctx 5244c000 | 6155a000 num 0 state 0 speed 0 port 0 level 0 slot 0 + kworker/0:0-3233 [000] ..... 36819.707648: xhci_alloc_dev: RS 00000 UNKNOWN speed Ctx Entries 0 MEL 0 us Port# 0/0 [TT Slot 0 Port# 0 TTT 0 Intr 0] Addr 0 State enabled/disabled + kworker/0:0-3233 [000] d..1. 36819.707685: xhci_get_port_status: port 2-2: 0x00001203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.707759: xhci_handle_event: EVENT: TRB 0000000003000000 status 'Success' len 0 slot 0 ep 0 type 'Port Status Change Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.707763: xhci_handle_port_status: port 2-2: 0x00201203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: PRC Wake: + kworker/0:0-3233 [000] d.h1. 36819.707768: xhci_hub_status_data: port 2-0: 0x00001203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.707771: xhci_hub_status_data: port 2-1: 0x00001203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.707774: xhci_hub_status_data: port 2-2: 0x00201203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: PRC Wake: + kworker/0:0-3233 [000] d.h1. 36819.707777: xhci_hub_status_data: port 2-3: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.707781: xhci_hub_status_data: port 2-4: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.707784: xhci_hub_status_data: port 2-5: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.707787: xhci_hub_status_data: port 2-6: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.707790: xhci_hub_status_data: port 2-7: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.707794: xhci_hub_status_data: port 2-8: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.707797: xhci_hub_status_data: port 2-9: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.707800: xhci_hub_status_data: port 2-10: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.707803: xhci_hub_status_data: port 2-11: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] d.h1. 36819.707804: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4550(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.771096: xhci_get_port_status: port 2-2: 0x00201203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: PRC Wake: + kworker/0:0-3233 [000] d..1. 36819.771329: xhci_get_port_status: port 2-2: 0x00001203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: Wake: + kworker/0:0-3233 [000] ..... 36819.825439: xhci_setup_device_slot: RS 00000 UNKNOWN speed Ctx Entries 0 MEL 0 us Port# 0/0 [TT Slot 0 Port# 0 TTT 0 Intr 0] Addr 0 State enabled/disabled + kworker/0:0-3233 [000] ..... 36819.825455: xhci_setup_addressable_virt_device: vdev 0000000049a0d127 ctx 5244c000 | 6155a000 num 0 state 5 speed 5 port 3 level 1 slot 3 + kworker/0:0-3233 [000] ..... 36819.825456: xhci_address_ctx: ctx_64=0, ctx_type=2, ctx_dma=@5244c000, ctx_va=@00000000b9ec1f68 + kworker/0:0-3233 [000] ..... 36819.825459: xhci_address_ctrl_ctx: Add: slot ep0 + kworker/0:0-3233 [000] d..1. 36819.825460: xhci_setup_device: vdev 0000000049a0d127 ctx 5244c000 | 6155a000 num 0 state 5 speed 5 port 3 level 1 slot 3 + kworker/0:0-3233 [000] d..1. 36819.825466: xhci_queue_trb: CMD: Address Device Command: ctx 000000005244c000 slot 3 flags b:C + kworker/0:0-3233 [000] d..1. 36819.825468: xhci_inc_enq: CMD 000000003daf44b1: enq 0x000000004fbf3100(0x000000004fbf3000) deq 0x000000004fbf30f0(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.825470: xhci_ring_host_doorbell: Ring doorbell for Command Ring 0 + kworker/0:2-9200 [000] d.h2. 36819.825604: xhci_handle_event: EVENT: TRB 000000004fbf30f0 status 'Success' len 0 slot 3 ep 0 type 'Command Completion Event' flags e:C + kworker/0:2-9200 [000] d.h2. 36819.825607: xhci_handle_command: CMD: Address Device Command: ctx 000000005244c000 slot 3 flags b:C + kworker/0:2-9200 [000] d.h2. 36819.825610: xhci_handle_cmd_addr_dev: RS 00000 super-speed Ctx Entries 1 MEL 0 us Port# 3/0 [TT Slot 0 Port# 0 TTT 0 Intr 0] Addr 3 State addressed + kworker/0:2-9200 [000] d.h2. 36819.825616: xhci_inc_deq: CMD 000000003daf44b1: enq 0x000000004fbf3100(0x000000004fbf3000) deq 0x000000004fbf3100(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:2-9200 [000] d.h2. 36819.825616: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4560(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.825810: xhci_dbg_address: Successful setup address command + kworker/0:0-3233 [000] ..... 36819.825823: xhci_dbg_address: Op regs DCBAA ptr = 0x0000004fbf2000 + kworker/0:0-3233 [000] ..... 36819.825827: xhci_dbg_address: Slot ID 3 dcbaa entry @000000003f53990b = 0x0000006155a000 + kworker/0:0-3233 [000] ..... 36819.825829: xhci_dbg_address: Output Context DMA address = 0x6155a000 + kworker/0:0-3233 [000] ..... 36819.825830: xhci_address_ctx: ctx_64=0, ctx_type=2, ctx_dma=@5244c000, ctx_va=@00000000b9ec1f68 + kworker/0:0-3233 [000] ..... 36819.825830: xhci_address_ctx: ctx_64=0, ctx_type=1, ctx_dma=@6155a000, ctx_va=@00000000577c8c51 + kworker/0:0-3233 [000] ..... 36819.825831: xhci_dbg_address: Internal device address = 3 + kworker/0:0-3233 [000] ..... 36819.841778: xhci_urb_enqueue: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484800 slot 3 length 0/8 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.841815: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0100 wIndex 0000 wLength 8 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.841817: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d010(0x0000000045f9d000) deq 0x0000000045f9d000(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.841818: xhci_queue_trb: CTRL: Buffer 0000000044fe2600 length 8 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.841818: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d020(0x0000000045f9d000) deq 0x0000000045f9d000(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.841818: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.841818: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d030(0x0000000045f9d000) deq 0x0000000045f9d000(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.841821: xhci_ring_ep_doorbell: Ring doorbell for Slot 3 ep0in + -0 [000] d.h2. 36819.842146: xhci_handle_event: EVENT: TRB 0000000045f9d020 status 'Success' len 0 slot 3 ep 1 type 'Transfer Event' flags e:C + -0 [000] d.h2. 36819.842149: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + -0 [000] d.h2. 36819.842151: xhci_inc_deq: CTRL 00000000dacb45d7: enq 0x0000000045f9d030(0x0000000045f9d000) deq 0x0000000045f9d030(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + -0 [000] d.h2. 36819.842154: xhci_urb_giveback: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484800 slot 3 length 8/8 sgs 0/0 stream 0 flags 00110200 + -0 [000] d.h2. 36819.842160: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4570(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.842462: xhci_urb_enqueue: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484672 slot 3 length 0/0 sgs 0/0 stream 0 flags 00000000 + kworker/0:0-3233 [000] d..1. 36819.842463: xhci_queue_trb: CTRL: bRequestType 00 bRequest 31 wValue 0028 wIndex 0000 wLength 0 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.842464: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d040(0x0000000045f9d000) deq 0x0000000045f9d030(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.842464: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.842464: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d050(0x0000000045f9d000) deq 0x0000000045f9d030(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.842465: xhci_ring_ep_doorbell: Ring doorbell for Slot 3 ep0in + kworker/0:0-3233 [000] d.h1. 36819.842660: xhci_handle_event: EVENT: TRB 0000000045f9d040 status 'Success' len 0 slot 3 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.842661: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d.h1. 36819.842662: xhci_inc_deq: CTRL 00000000dacb45d7: enq 0x0000000045f9d050(0x0000000045f9d000) deq 0x0000000045f9d050(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.842663: xhci_urb_giveback: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484672 slot 3 length 0/0 sgs 0/0 stream 0 flags 00000000 + kworker/0:0-3233 [000] d.h1. 36819.842665: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4580(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.842686: xhci_urb_enqueue: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484800 slot 3 length 0/18 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.842686: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0100 wIndex 0000 wLength 18 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.842686: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d060(0x0000000045f9d000) deq 0x0000000045f9d050(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.842687: xhci_queue_trb: CTRL: Buffer 00000000426adb00 length 18 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.842687: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d070(0x0000000045f9d000) deq 0x0000000045f9d050(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.842687: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.842688: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d080(0x0000000045f9d000) deq 0x0000000045f9d050(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.842688: xhci_ring_ep_doorbell: Ring doorbell for Slot 3 ep0in + kworker/0:0-3233 [000] d.h1. 36819.842748: xhci_handle_event: EVENT: TRB 0000000045f9d070 status 'Success' len 0 slot 3 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.842748: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d.h1. 36819.842748: xhci_inc_deq: CTRL 00000000dacb45d7: enq 0x0000000045f9d080(0x0000000045f9d000) deq 0x0000000045f9d080(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.842749: xhci_urb_giveback: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484800 slot 3 length 18/18 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d.h1. 36819.842749: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4590(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.842769: xhci_urb_enqueue: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484800 slot 3 length 0/5 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.842769: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0f00 wIndex 0000 wLength 5 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.842770: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d090(0x0000000045f9d000) deq 0x0000000045f9d080(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.842770: xhci_queue_trb: CTRL: Buffer 00000000440f22e8 length 5 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.842770: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d0a0(0x0000000045f9d000) deq 0x0000000045f9d080(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.842770: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.842770: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d0b0(0x0000000045f9d000) deq 0x0000000045f9d080(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.842770: xhci_ring_ep_doorbell: Ring doorbell for Slot 3 ep0in + kworker/0:0-3233 [000] d.h1. 36819.843711: xhci_handle_event: EVENT: TRB 0000000045f9d0a0 status 'Success' len 0 slot 3 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.843714: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d.h1. 36819.843716: xhci_inc_deq: CTRL 00000000dacb45d7: enq 0x0000000045f9d0b0(0x0000000045f9d000) deq 0x0000000045f9d0b0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.843719: xhci_urb_giveback: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484800 slot 3 length 5/5 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d.h1. 36819.843723: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf45a0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.843750: xhci_urb_enqueue: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484800 slot 3 length 0/22 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.843752: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0f00 wIndex 0000 wLength 22 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.843752: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d0c0(0x0000000045f9d000) deq 0x0000000045f9d0b0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.843753: xhci_queue_trb: CTRL: Buffer 00000000426adb00 length 22 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.843753: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d0d0(0x0000000045f9d000) deq 0x0000000045f9d0b0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.843753: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.843753: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d0e0(0x0000000045f9d000) deq 0x0000000045f9d0b0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.843754: xhci_ring_ep_doorbell: Ring doorbell for Slot 3 ep0in + -0 [000] d.h2. 36819.843807: xhci_handle_event: EVENT: TRB 0000000045f9d0d0 status 'Success' len 0 slot 3 ep 1 type 'Transfer Event' flags e:C + -0 [000] d.h2. 36819.843807: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + -0 [000] d.h2. 36819.843807: xhci_inc_deq: CTRL 00000000dacb45d7: enq 0x0000000045f9d0e0(0x0000000045f9d000) deq 0x0000000045f9d0e0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + -0 [000] d.h2. 36819.843808: xhci_urb_giveback: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484800 slot 3 length 22/22 sgs 0/0 stream 0 flags 00110200 + -0 [000] d.h2. 36819.843808: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf45b0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.844742: xhci_urb_enqueue: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484800 slot 3 length 0/9 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.844745: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0200 wIndex 0000 wLength 9 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.844746: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d0f0(0x0000000045f9d000) deq 0x0000000045f9d0e0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.844746: xhci_queue_trb: CTRL: Buffer 0000000044bbbee0 length 9 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.844747: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d100(0x0000000045f9d000) deq 0x0000000045f9d0e0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.844747: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.844747: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d110(0x0000000045f9d000) deq 0x0000000045f9d0e0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.844748: xhci_ring_ep_doorbell: Ring doorbell for Slot 3 ep0in + kworker/0:2-9200 [000] d.h2. 36819.844816: xhci_handle_event: EVENT: TRB 0000000045f9d100 status 'Success' len 0 slot 3 ep 1 type 'Transfer Event' flags e:C + kworker/0:2-9200 [000] d.h2. 36819.844818: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:2-9200 [000] d.h2. 36819.844819: xhci_inc_deq: CTRL 00000000dacb45d7: enq 0x0000000045f9d110(0x0000000045f9d000) deq 0x0000000045f9d110(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:2-9200 [000] d.h2. 36819.844821: xhci_urb_giveback: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484800 slot 3 length 9/9 sgs 0/0 stream 0 flags 00110200 + kworker/0:2-9200 [000] d.h2. 36819.844822: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf45c0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.844848: xhci_urb_enqueue: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484800 slot 3 length 0/380 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.844848: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0200 wIndex 0000 wLength 380 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.844848: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d120(0x0000000045f9d000) deq 0x0000000045f9d110(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.844848: xhci_queue_trb: CTRL: Buffer 0000000044576400 length 380 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.844848: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d130(0x0000000045f9d000) deq 0x0000000045f9d110(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.844848: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.844849: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d140(0x0000000045f9d000) deq 0x0000000045f9d110(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.844849: xhci_ring_ep_doorbell: Ring doorbell for Slot 3 ep0in + kworker/0:0-3233 [000] d.h1. 36819.844889: xhci_handle_event: EVENT: TRB 0000000045f9d130 status 'Success' len 0 slot 3 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.844889: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d.h1. 36819.844889: xhci_inc_deq: CTRL 00000000dacb45d7: enq 0x0000000045f9d140(0x0000000045f9d000) deq 0x0000000045f9d140(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.844890: xhci_urb_giveback: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484800 slot 3 length 380/380 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d.h1. 36819.844890: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf45d0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.844910: xhci_urb_enqueue: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484800 slot 3 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.844910: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0300 wIndex 0000 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.844911: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d150(0x0000000045f9d000) deq 0x0000000045f9d140(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.844911: xhci_queue_trb: CTRL: Buffer 000000006151bb00 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.844911: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d160(0x0000000045f9d000) deq 0x0000000045f9d140(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.844911: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.844911: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d170(0x0000000045f9d000) deq 0x0000000045f9d140(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.844912: xhci_ring_ep_doorbell: Ring doorbell for Slot 3 ep0in + kworker/0:2-9200 [000] d.h1. 36819.844963: xhci_handle_event: EVENT: TRB 0000000045f9d150 status 'Short Packet' len 251 slot 3 ep 1 type 'Transfer Event' flags e:C + kworker/0:2-9200 [000] d.h1. 36819.844963: xhci_handle_transfer: CTRL: Buffer 000000006151bb00 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:2-9200 [000] d.h1. 36819.844964: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf45e0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:2-9200 [000] d.h1. 36819.844964: xhci_handle_event: EVENT: TRB 0000000045f9d160 status 'Success' len 0 slot 3 ep 1 type 'Transfer Event' flags e:C + kworker/0:2-9200 [000] d.h1. 36819.844964: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:2-9200 [000] d.h1. 36819.844964: xhci_inc_deq: CTRL 00000000dacb45d7: enq 0x0000000045f9d170(0x0000000045f9d000) deq 0x0000000045f9d170(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:2-9200 [000] d.h1. 36819.844965: xhci_urb_giveback: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484800 slot 3 length 4/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:2-9200 [000] d.h1. 36819.844965: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf45f0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:2-9200 [000] d.s1. 36819.846043: xhci_hub_status_data: port 2-0: 0x00001203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: Wake: + kworker/0:2-9200 [000] d.s1. 36819.846046: xhci_hub_status_data: port 2-1: 0x00001203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: Wake: + kworker/0:2-9200 [000] d.s1. 36819.846051: xhci_hub_status_data: port 2-2: 0x00001203 Powered Connected Enabled Link:U0 PortSpeed:4 Change: Wake: + kworker/0:2-9200 [000] d.s1. 36819.846054: xhci_hub_status_data: port 2-3: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:2-9200 [000] d.s1. 36819.846057: xhci_hub_status_data: port 2-4: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:2-9200 [000] d.s1. 36819.846060: xhci_hub_status_data: port 2-5: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:2-9200 [000] d.s1. 36819.846063: xhci_hub_status_data: port 2-6: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:2-9200 [000] d.s1. 36819.846065: xhci_hub_status_data: port 2-7: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:2-9200 [000] d.s1. 36819.846069: xhci_hub_status_data: port 2-8: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:2-9200 [000] d.s1. 36819.846072: xhci_hub_status_data: port 2-9: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:2-9200 [000] d.s1. 36819.846075: xhci_hub_status_data: port 2-10: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:2-9200 [000] d.s1. 36819.846078: xhci_hub_status_data: port 2-11: 0x000002a0 Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: Wake: + kworker/0:0-3233 [000] ..... 36819.846111: xhci_urb_enqueue: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484800 slot 3 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.846113: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0302 wIndex 0409 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.846113: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d180(0x0000000045f9d000) deq 0x0000000045f9d170(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.846113: xhci_queue_trb: CTRL: Buffer 000000006151bb00 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.846113: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d190(0x0000000045f9d000) deq 0x0000000045f9d170(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.846114: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.846114: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d1a0(0x0000000045f9d000) deq 0x0000000045f9d170(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.846114: xhci_ring_ep_doorbell: Ring doorbell for Slot 3 ep0in + kworker/0:0-3233 [000] d.h2. 36819.846212: xhci_handle_event: EVENT: TRB 0000000045f9d180 status 'Short Packet' len 217 slot 3 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h2. 36819.846213: xhci_handle_transfer: CTRL: Buffer 000000006151bb00 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d.h2. 36819.846213: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4600(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h2. 36819.846213: xhci_handle_event: EVENT: TRB 0000000045f9d190 status 'Success' len 0 slot 3 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h2. 36819.846214: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d.h2. 36819.846214: xhci_inc_deq: CTRL 00000000dacb45d7: enq 0x0000000045f9d1a0(0x0000000045f9d000) deq 0x0000000045f9d1a0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h2. 36819.846251: xhci_urb_giveback: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484800 slot 3 length 38/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d.h2. 36819.846253: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4610(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.846311: xhci_urb_enqueue: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484800 slot 3 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.846311: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0301 wIndex 0409 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.846311: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d1b0(0x0000000045f9d000) deq 0x0000000045f9d1a0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.846311: xhci_queue_trb: CTRL: Buffer 000000006151bb00 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.846311: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d1c0(0x0000000045f9d000) deq 0x0000000045f9d1a0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.846311: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.846312: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d1d0(0x0000000045f9d000) deq 0x0000000045f9d1a0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.846312: xhci_ring_ep_doorbell: Ring doorbell for Slot 3 ep0in + -0 [000] d.h2. 36819.846338: xhci_handle_event: EVENT: TRB 0000000045f9d1b0 status 'Short Packet' len 235 slot 3 ep 1 type 'Transfer Event' flags e:C + -0 [000] d.h2. 36819.846338: xhci_handle_transfer: CTRL: Buffer 000000006151bb00 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + -0 [000] d.h2. 36819.846338: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4620(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + -0 [000] d.h2. 36819.846338: xhci_handle_event: EVENT: TRB 0000000045f9d1c0 status 'Success' len 0 slot 3 ep 1 type 'Transfer Event' flags e:C + -0 [000] d.h2. 36819.846338: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + -0 [000] d.h2. 36819.846339: xhci_inc_deq: CTRL 00000000dacb45d7: enq 0x0000000045f9d1d0(0x0000000045f9d000) deq 0x0000000045f9d1d0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + -0 [000] d.h2. 36819.846339: xhci_urb_giveback: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484800 slot 3 length 20/255 sgs 0/0 stream 0 flags 00110200 + -0 [000] d.h2. 36819.846339: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4630(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.846358: xhci_urb_enqueue: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484800 slot 3 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.846358: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0303 wIndex 0409 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.846359: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d1e0(0x0000000045f9d000) deq 0x0000000045f9d1d0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.846359: xhci_queue_trb: CTRL: Buffer 000000006151bb00 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.846359: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d1f0(0x0000000045f9d000) deq 0x0000000045f9d1d0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.846359: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.846359: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d200(0x0000000045f9d000) deq 0x0000000045f9d1d0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.846359: xhci_ring_ep_doorbell: Ring doorbell for Slot 3 ep0in + kworker/0:0-3233 [000] d.h1. 36819.846390: xhci_handle_event: EVENT: TRB 0000000045f9d1e0 status 'Short Packet' len 181 slot 3 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.846390: xhci_handle_transfer: CTRL: Buffer 000000006151bb00 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d.h1. 36819.846390: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4640(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.846391: xhci_handle_event: EVENT: TRB 0000000045f9d1f0 status 'Success' len 0 slot 3 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.846391: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d.h1. 36819.846391: xhci_inc_deq: CTRL 00000000dacb45d7: enq 0x0000000045f9d200(0x0000000045f9d000) deq 0x0000000045f9d200(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.846391: xhci_urb_giveback: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484800 slot 3 length 74/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d.h1. 36819.846391: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4650(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.852730: xhci_ring_alloc: BULK 00000000d7429d3e: enq 0x00000000614c6000(0x00000000614c6000) deq 0x00000000614c6000(0x00000000614c6000) segs 2 stream 0 bounce 1024 cycle 1 + kworker/0:0-3233 [000] ..... 36819.852734: xhci_add_endpoint: State disabled mult 1 max P. Streams 0 interval 125 us max ESIT payload 0 CErr 3 Type Bulk IN burst 15 maxp 1024 deq 00000000614c6001 avg trb len 0 + kworker/0:0-3233 [000] d..1. 36819.852738: xhci_configure_endpoint_ctrl_ctx: Add: slot 3in + kworker/0:0-3233 [000] d..1. 36819.852739: xhci_configure_endpoint: RS 00000 super-speed Ctx Entries 7 MEL 0 us Port# 3/0 [TT Slot 0 Port# 0 TTT 0 Intr 0] Addr 0 State enabled/disabled + kworker/0:0-3233 [000] d..1. 36819.852746: xhci_queue_trb: CMD: Configure Endpoint Command: ctx 000000005244c000 slot 3 flags d:C + kworker/0:0-3233 [000] d..1. 36819.852746: xhci_inc_enq: CMD 000000003daf44b1: enq 0x000000004fbf3110(0x000000004fbf3000) deq 0x000000004fbf3100(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.852748: xhci_ring_host_doorbell: Ring doorbell for Command Ring 0 + kworker/0:0-3233 [000] d.h1. 36819.852809: xhci_handle_event: EVENT: TRB 000000004fbf3100 status 'Success' len 0 slot 3 ep 0 type 'Command Completion Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.852811: xhci_handle_command: CMD: Configure Endpoint Command: ctx 000000005244c000 slot 3 flags d:C + kworker/0:0-3233 [000] d.h1. 36819.852814: xhci_inc_deq: CMD 000000003daf44b1: enq 0x000000004fbf3110(0x000000004fbf3000) deq 0x000000004fbf3110(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.852814: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4660(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.853042: xhci_dbg_context_change: Successful Endpoint Configure command + kworker/0:0-3233 [000] d..1. 36819.853115: xhci_queue_trb: CMD: Stop Ring Command: slot 3 sp 0 ep 7 flags C + kworker/0:0-3233 [000] d..1. 36819.853116: xhci_inc_enq: CMD 000000003daf44b1: enq 0x000000004fbf3120(0x000000004fbf3000) deq 0x000000004fbf3110(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.853116: xhci_ring_host_doorbell: Ring doorbell for Command Ring 0 + kworker/0:0-3233 [000] d.h1. 36819.853171: xhci_handle_event: EVENT: TRB 000000004fbf3110 status 'Success' len 0 slot 3 ep 0 type 'Command Completion Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.853172: xhci_handle_command: CMD: Stop Ring Command: slot 3 sp 0 ep 7 flags C + kworker/0:0-3233 [000] d.h1. 36819.853174: xhci_inc_deq: CMD 000000003daf44b1: enq 0x000000004fbf3120(0x000000004fbf3000) deq 0x000000004fbf3120(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.853174: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4670(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.853192: xhci_queue_trb: CMD: Configure Endpoint Command: ctx 00000000437c8000 slot 3 flags d:C + kworker/0:0-3233 [000] d..1. 36819.853192: xhci_inc_enq: CMD 000000003daf44b1: enq 0x000000004fbf3130(0x000000004fbf3000) deq 0x000000004fbf3120(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.853192: xhci_ring_host_doorbell: Ring doorbell for Command Ring 0 + -0 [000] d.h2. 36819.853233: xhci_handle_event: EVENT: TRB 000000004fbf3120 status 'Success' len 0 slot 3 ep 0 type 'Command Completion Event' flags e:C + -0 [000] d.h2. 36819.853234: xhci_handle_command: CMD: Configure Endpoint Command: ctx 00000000437c8000 slot 3 flags d:C + -0 [000] dNh2. 36819.853237: xhci_inc_deq: CMD 000000003daf44b1: enq 0x000000004fbf3130(0x000000004fbf3000) deq 0x000000004fbf3130(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + -0 [000] dNh2. 36819.853238: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4680(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.853421: xhci_urb_enqueue: 2-3 ep0out-control: urb 0000000046b41c18 pipe 2147484672 slot 3 length 0/0 sgs 0/0 stream 0 flags 00000000 + kworker/0:0-3233 [000] d..1. 36819.853423: xhci_queue_trb: CTRL: bRequestType 00 bRequest 09 wValue 0001 wIndex 0000 wLength 0 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.853423: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d210(0x0000000045f9d000) deq 0x0000000045f9d200(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.853423: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.853423: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d220(0x0000000045f9d000) deq 0x0000000045f9d200(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.853424: xhci_ring_ep_doorbell: Ring doorbell for Slot 3 ep0in + -0 [000] d.h2. 36819.853556: xhci_handle_event: EVENT: TRB 0000000045f9d210 status 'Success' len 0 slot 3 ep 1 type 'Transfer Event' flags e:C + -0 [000] d.h2. 36819.853557: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + -0 [000] d.h2. 36819.853558: xhci_inc_deq: CTRL 00000000dacb45d7: enq 0x0000000045f9d220(0x0000000045f9d000) deq 0x0000000045f9d220(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + -0 [000] d.h2. 36819.853560: xhci_urb_giveback: 2-3 ep0out-control: urb 0000000046b41c18 pipe 2147484672 slot 3 length 0/0 sgs 0/0 stream 0 flags 00000000 + -0 [000] d.h2. 36819.853562: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4690(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.853607: xhci_urb_enqueue: 2-3 ep0out-control: urb 0000000046b41c18 pipe 2147484800 slot 3 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.853608: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0301 wIndex 0409 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.853608: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d230(0x0000000045f9d000) deq 0x0000000045f9d220(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.853608: xhci_queue_trb: CTRL: Buffer 000000006151b000 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.853608: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d240(0x0000000045f9d000) deq 0x0000000045f9d220(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.853609: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.853609: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d250(0x0000000045f9d000) deq 0x0000000045f9d220(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.853609: xhci_ring_ep_doorbell: Ring doorbell for Slot 3 ep0in + kworker/0:2-9200 [000] d.h1. 36819.853644: xhci_handle_event: EVENT: TRB 0000000045f9d230 status 'Short Packet' len 235 slot 3 ep 1 type 'Transfer Event' flags e:C + kworker/0:2-9200 [000] d.h1. 36819.853645: xhci_handle_transfer: CTRL: Buffer 000000006151b000 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:2-9200 [000] d.h1. 36819.853645: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf46a0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:2-9200 [000] d.h1. 36819.853645: xhci_handle_event: EVENT: TRB 0000000045f9d240 status 'Success' len 0 slot 3 ep 1 type 'Transfer Event' flags e:C + kworker/0:2-9200 [000] d.h1. 36819.853645: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:2-9200 [000] d.h1. 36819.853645: xhci_inc_deq: CTRL 00000000dacb45d7: enq 0x0000000045f9d250(0x0000000045f9d000) deq 0x0000000045f9d250(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:2-9200 [000] d.h1. 36819.853646: xhci_urb_giveback: 2-3 ep0out-control: urb 0000000046b41c18 pipe 2147484800 slot 3 length 20/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:2-9200 [000] d.h1. 36819.853646: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf46b0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.853771: xhci_urb_enqueue: 2-3 ep0out-control: urb 0000000046b41c18 pipe 2147484800 slot 3 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.853772: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0304 wIndex 0409 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.853772: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d260(0x0000000045f9d000) deq 0x0000000045f9d250(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.853773: xhci_queue_trb: CTRL: Buffer 000000006151b300 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.853773: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d270(0x0000000045f9d000) deq 0x0000000045f9d250(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.853773: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.853773: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d280(0x0000000045f9d000) deq 0x0000000045f9d250(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.853773: xhci_ring_ep_doorbell: Ring doorbell for Slot 3 ep0in + -0 [000] d.h2. 36819.853812: xhci_handle_event: EVENT: TRB 0000000045f9d260 status 'Short Packet' len 217 slot 3 ep 1 type 'Transfer Event' flags e:C + -0 [000] d.h2. 36819.853813: xhci_handle_transfer: CTRL: Buffer 000000006151b300 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + -0 [000] d.h2. 36819.853813: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf46c0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + -0 [000] d.h2. 36819.853813: xhci_handle_event: EVENT: TRB 0000000045f9d270 status 'Success' len 0 slot 3 ep 1 type 'Transfer Event' flags e:C + -0 [000] d.h2. 36819.853814: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + -0 [000] d.h2. 36819.853814: xhci_inc_deq: CTRL 00000000dacb45d7: enq 0x0000000045f9d280(0x0000000045f9d000) deq 0x0000000045f9d280(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + -0 [000] d.h2. 36819.853814: xhci_urb_giveback: 2-3 ep0out-control: urb 0000000046b41c18 pipe 2147484800 slot 3 length 38/255 sgs 0/0 stream 0 flags 00110200 + -0 [000] d.h2. 36819.853815: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf46d0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.853876: xhci_urb_enqueue: 2-3 ep0out-control: urb 0000000046b41c18 pipe 2147484800 slot 3 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.853877: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0304 wIndex 0409 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.853877: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d290(0x0000000045f9d000) deq 0x0000000045f9d280(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.853877: xhci_queue_trb: CTRL: Buffer 000000006151b300 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.853877: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d2a0(0x0000000045f9d000) deq 0x0000000045f9d280(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.853877: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.853877: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d2b0(0x0000000045f9d000) deq 0x0000000045f9d280(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.853878: xhci_ring_ep_doorbell: Ring doorbell for Slot 3 ep0in + kworker/u8:1-8345 [000] d.h1. 36819.853905: xhci_handle_event: EVENT: TRB 0000000045f9d290 status 'Short Packet' len 217 slot 3 ep 1 type 'Transfer Event' flags e:C + kworker/u8:1-8345 [000] d.h1. 36819.853906: xhci_handle_transfer: CTRL: Buffer 000000006151b300 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/u8:1-8345 [000] d.h1. 36819.853906: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf46e0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/u8:1-8345 [000] d.h1. 36819.853906: xhci_handle_event: EVENT: TRB 0000000045f9d2a0 status 'Success' len 0 slot 3 ep 1 type 'Transfer Event' flags e:C + kworker/u8:1-8345 [000] d.h1. 36819.853906: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/u8:1-8345 [000] d.h1. 36819.853906: xhci_inc_deq: CTRL 00000000dacb45d7: enq 0x0000000045f9d2b0(0x0000000045f9d000) deq 0x0000000045f9d2b0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/u8:1-8345 [000] d.h1. 36819.853907: xhci_urb_giveback: 2-3 ep0out-control: urb 0000000046b41c18 pipe 2147484800 slot 3 length 38/255 sgs 0/0 stream 0 flags 00110200 + kworker/u8:1-8345 [000] d.h1. 36819.853907: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf46f0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.855618: xhci_urb_enqueue: 2-3 ep0out-control: urb 0000000046b41c18 pipe 2147484800 slot 3 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.855622: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0307 wIndex 0409 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.855622: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d2c0(0x0000000045f9d000) deq 0x0000000045f9d2b0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.855623: xhci_queue_trb: CTRL: Buffer 000000006151b300 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.855623: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d2d0(0x0000000045f9d000) deq 0x0000000045f9d2b0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.855623: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.855624: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d2e0(0x0000000045f9d000) deq 0x0000000045f9d2b0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.855625: xhci_ring_ep_doorbell: Ring doorbell for Slot 3 ep0in + mdev-9270 [000] d.h1. 36819.855690: xhci_handle_event: EVENT: TRB 0000000045f9d2c0 status 'Short Packet' len 223 slot 3 ep 1 type 'Transfer Event' flags e:C + mdev-9270 [000] d.h1. 36819.855691: xhci_handle_transfer: CTRL: Buffer 000000006151b300 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + mdev-9270 [000] d.h1. 36819.855692: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4700(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + mdev-9270 [000] d.h1. 36819.855692: xhci_handle_event: EVENT: TRB 0000000045f9d2d0 status 'Success' len 0 slot 3 ep 1 type 'Transfer Event' flags e:C + mdev-9270 [000] d.h1. 36819.855692: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + mdev-9270 [000] d.h1. 36819.855693: xhci_inc_deq: CTRL 00000000dacb45d7: enq 0x0000000045f9d2e0(0x0000000045f9d000) deq 0x0000000045f9d2e0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + mdev-9270 [000] d.h1. 36819.855694: xhci_urb_giveback: 2-3 ep0out-control: urb 0000000046b41c18 pipe 2147484800 slot 3 length 32/255 sgs 0/0 stream 0 flags 00110200 + mdev-9270 [000] d.h1. 36819.855696: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4710(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.855733: xhci_urb_enqueue: 2-3 ep0out-control: urb 0000000046b41c18 pipe 2147484800 slot 3 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.855733: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0308 wIndex 0409 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.855733: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d2f0(0x0000000045f9d000) deq 0x0000000045f9d2e0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.855733: xhci_queue_trb: CTRL: Buffer 000000006151b300 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.855733: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d300(0x0000000045f9d000) deq 0x0000000045f9d2e0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.855734: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.855734: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d310(0x0000000045f9d000) deq 0x0000000045f9d2e0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.855734: xhci_ring_ep_doorbell: Ring doorbell for Slot 3 ep0in + mdev-9270 [000] d.h2. 36819.855756: xhci_handle_event: EVENT: TRB 0000000045f9d2f0 status 'Short Packet' len 223 slot 3 ep 1 type 'Transfer Event' flags e:C + mdev-9270 [000] d.h2. 36819.855757: xhci_handle_transfer: CTRL: Buffer 000000006151b300 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + mdev-9270 [000] d.h2. 36819.855757: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4720(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + mdev-9270 [000] d.h2. 36819.855757: xhci_handle_event: EVENT: TRB 0000000045f9d300 status 'Success' len 0 slot 3 ep 1 type 'Transfer Event' flags e:C + mdev-9270 [000] d.h2. 36819.855757: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + mdev-9270 [000] d.h2. 36819.855757: xhci_inc_deq: CTRL 00000000dacb45d7: enq 0x0000000045f9d310(0x0000000045f9d000) deq 0x0000000045f9d310(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + mdev-9270 [000] d.h2. 36819.855757: xhci_urb_giveback: 2-3 ep0out-control: urb 0000000046b41c18 pipe 2147484800 slot 3 length 32/255 sgs 0/0 stream 0 flags 00110200 + mdev-9270 [000] d.h2. 36819.855758: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4730(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.857064: xhci_ring_alloc: BULK 00000000083af807: enq 0x0000000044ea1000(0x0000000044ea1000) deq 0x0000000044ea1000(0x0000000044ea1000) segs 2 stream 0 bounce 1024 cycle 1 + kworker/0:0-3233 [000] ..... 36819.857066: xhci_add_endpoint: State disabled mult 1 max P. Streams 0 interval 125 us max ESIT payload 0 CErr 3 Type Bulk IN burst 15 maxp 1024 deq 0000000044ea1001 avg trb len 0 + kworker/0:0-3233 [000] d..1. 36819.857069: xhci_configure_endpoint_ctrl_ctx: Drop: 3in, Add: slot 3in + kworker/0:0-3233 [000] d..1. 36819.857070: xhci_configure_endpoint: RS 00000 super-speed Ctx Entries 7 MEL 0 us Port# 3/0 [TT Slot 0 Port# 0 TTT 0 Intr 0] Addr 0 State enabled/disabled + kworker/0:0-3233 [000] d..1. 36819.857072: xhci_queue_trb: CMD: Configure Endpoint Command: ctx 000000005244c000 slot 3 flags d:C + kworker/0:0-3233 [000] d..1. 36819.857073: xhci_inc_enq: CMD 000000003daf44b1: enq 0x000000004fbf3140(0x000000004fbf3000) deq 0x000000004fbf3130(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.857073: xhci_ring_host_doorbell: Ring doorbell for Command Ring 0 + mdev-9270 [000] d.h2. 36819.857111: xhci_handle_event: EVENT: TRB 000000004fbf3130 status 'Success' len 0 slot 3 ep 0 type 'Command Completion Event' flags e:C + mdev-9270 [000] d.h2. 36819.857112: xhci_handle_command: CMD: Configure Endpoint Command: ctx 000000005244c000 slot 3 flags d:C + mdev-9270 [000] d.h2. 36819.857115: xhci_inc_deq: CMD 000000003daf44b1: enq 0x000000004fbf3140(0x000000004fbf3000) deq 0x000000004fbf3140(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + mdev-9270 [000] d.h2. 36819.857115: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4740(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.858554: xhci_dbg_context_change: Successful Endpoint Configure command + kworker/0:0-3233 [000] ..... 36819.858558: xhci_ring_free: BULK 00000000d7429d3e: enq 0x00000000614c6000(0x00000000614c6000) deq 0x00000000614c6000(0x00000000614c6000) segs 2 stream 0 bounce 1024 cycle 1 + kworker/0:0-3233 [000] ..... 36819.858576: xhci_urb_enqueue: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484672 slot 3 length 0/0 sgs 0/0 stream 0 flags 00000000 + kworker/0:0-3233 [000] d..1. 36819.858578: xhci_queue_trb: CTRL: bRequestType 01 bRequest 0b wValue 0000 wIndex 0001 wLength 0 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.858579: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d320(0x0000000045f9d000) deq 0x0000000045f9d310(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.858579: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.858579: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d330(0x0000000045f9d000) deq 0x0000000045f9d310(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.858580: xhci_ring_ep_doorbell: Ring doorbell for Slot 3 ep0in + -0 [000] d.h2. 36819.858680: xhci_handle_event: EVENT: TRB 0000000045f9d320 status 'Success' len 0 slot 3 ep 1 type 'Transfer Event' flags e:C + -0 [000] d.h2. 36819.858682: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + -0 [000] d.h2. 36819.858683: xhci_inc_deq: CTRL 00000000dacb45d7: enq 0x0000000045f9d330(0x0000000045f9d000) deq 0x0000000045f9d330(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + -0 [000] d.h2. 36819.858684: xhci_urb_giveback: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484672 slot 3 length 0/0 sgs 0/0 stream 0 flags 00000000 + -0 [000] d.h2. 36819.858686: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4750(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.858726: xhci_urb_enqueue: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484800 slot 3 length 0/26 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.858726: xhci_queue_trb: CTRL: bRequestType a1 bRequest 87 wValue 0100 wIndex 0001 wLength 26 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.858726: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d340(0x0000000045f9d000) deq 0x0000000045f9d330(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.858726: xhci_queue_trb: CTRL: Buffer 0000000044df3ee0 length 26 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.858727: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d350(0x0000000045f9d000) deq 0x0000000045f9d330(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.858727: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.858727: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d360(0x0000000045f9d000) deq 0x0000000045f9d330(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.858727: xhci_ring_ep_doorbell: Ring doorbell for Slot 3 ep0in + -0 [000] d.h2. 36819.858770: xhci_handle_event: EVENT: TRB 0000000045f9d350 status 'Success' len 0 slot 3 ep 1 type 'Transfer Event' flags e:C + -0 [000] d.h2. 36819.858771: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + -0 [000] d.h2. 36819.858771: xhci_inc_deq: CTRL 00000000dacb45d7: enq 0x0000000045f9d360(0x0000000045f9d000) deq 0x0000000045f9d360(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + -0 [000] d.h2. 36819.858772: xhci_urb_giveback: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484800 slot 3 length 26/26 sgs 0/0 stream 0 flags 00110200 + -0 [000] d.h2. 36819.858772: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4760(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.858790: xhci_urb_enqueue: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484672 slot 3 length 0/26 sgs 0/0 stream 0 flags 00110000 + kworker/0:0-3233 [000] d..1. 36819.858790: xhci_queue_trb: CTRL: bRequestType 21 bRequest 01 wValue 0100 wIndex 0001 wLength 26 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.858790: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d370(0x0000000045f9d000) deq 0x0000000045f9d360(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.858790: xhci_queue_trb: CTRL: Buffer 0000000044df3ee0 length 26 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:i:e:C + kworker/0:0-3233 [000] d..1. 36819.858791: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d380(0x0000000045f9d000) deq 0x0000000045f9d360(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.858791: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.858791: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d390(0x0000000045f9d000) deq 0x0000000045f9d360(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.858791: xhci_ring_ep_doorbell: Ring doorbell for Slot 3 ep0in + -0 [000] d.h2. 36819.858816: xhci_handle_event: EVENT: TRB 0000000045f9d380 status 'Success' len 0 slot 3 ep 1 type 'Transfer Event' flags e:C + -0 [000] d.h2. 36819.858817: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + -0 [000] d.h2. 36819.858817: xhci_inc_deq: CTRL 00000000dacb45d7: enq 0x0000000045f9d390(0x0000000045f9d000) deq 0x0000000045f9d390(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + -0 [000] d.h2. 36819.858817: xhci_urb_giveback: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484672 slot 3 length 26/26 sgs 0/0 stream 0 flags 00110000 + -0 [000] d.h2. 36819.858818: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4770(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.858830: xhci_urb_enqueue: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484800 slot 3 length 0/26 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.858831: xhci_queue_trb: CTRL: bRequestType a1 bRequest 81 wValue 0100 wIndex 0001 wLength 26 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.858831: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d3a0(0x0000000045f9d000) deq 0x0000000045f9d390(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.858831: xhci_queue_trb: CTRL: Buffer 0000000044df3ee0 length 26 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.858831: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d3b0(0x0000000045f9d000) deq 0x0000000045f9d390(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.858831: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.858831: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d3c0(0x0000000045f9d000) deq 0x0000000045f9d390(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.858831: xhci_ring_ep_doorbell: Ring doorbell for Slot 3 ep0in + -0 [000] d.H2. 36819.858864: xhci_handle_event: EVENT: TRB 0000000045f9d3b0 status 'Success' len 0 slot 3 ep 1 type 'Transfer Event' flags e:C + -0 [000] d.H2. 36819.858864: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + -0 [000] d.H2. 36819.858864: xhci_inc_deq: CTRL 00000000dacb45d7: enq 0x0000000045f9d3c0(0x0000000045f9d000) deq 0x0000000045f9d3c0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + -0 [000] d.H2. 36819.858864: xhci_urb_giveback: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484800 slot 3 length 26/26 sgs 0/0 stream 0 flags 00110200 + -0 [000] d.H2. 36819.858864: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4780(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36819.860215: xhci_urb_enqueue: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484800 slot 3 length 0/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d..1. 36819.860217: xhci_queue_trb: CTRL: bRequestType 80 bRequest 06 wValue 0306 wIndex 0409 wLength 255 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c + kworker/0:0-3233 [000] d..1. 36819.860217: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d3d0(0x0000000045f9d000) deq 0x0000000045f9d3c0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.860218: xhci_queue_trb: CTRL: Buffer 000000006151b100 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d..1. 36819.860218: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d3e0(0x0000000045f9d000) deq 0x0000000045f9d3c0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.860218: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d..1. 36819.860218: xhci_inc_enq: CTRL 00000000dacb45d7: enq 0x0000000045f9d3f0(0x0000000045f9d000) deq 0x0000000045f9d3c0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36819.860218: xhci_ring_ep_doorbell: Ring doorbell for Slot 3 ep0in + kworker/0:0-3233 [000] d.h1. 36819.860300: xhci_handle_event: EVENT: TRB 0000000045f9d3d0 status 'Short Packet' len 203 slot 3 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.860304: xhci_handle_transfer: CTRL: Buffer 000000006151b100 length 255 TD size 0 intr 0 type 'Data Stage' flags i:i:c:s:I:e:C + kworker/0:0-3233 [000] d.h1. 36819.860305: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf4790(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.860305: xhci_handle_event: EVENT: TRB 0000000045f9d3e0 status 'Success' len 0 slot 3 ep 1 type 'Transfer Event' flags e:C + kworker/0:0-3233 [000] d.h1. 36819.860305: xhci_handle_transfer: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C + kworker/0:0-3233 [000] d.h1. 36819.860305: xhci_inc_deq: CTRL 00000000dacb45d7: enq 0x0000000045f9d3f0(0x0000000045f9d000) deq 0x0000000045f9d3f0(0x0000000045f9d000) segs 2 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d.h1. 36819.860307: xhci_urb_giveback: 2-3 ep0out-control: urb 0000000070f0f655 pipe 2147484800 slot 3 length 52/255 sgs 0/0 stream 0 flags 00110200 + kworker/0:0-3233 [000] d.h1. 36819.860308: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf47a0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] ..... 36821.864441: xhci_stop_device: vdev 0000000049a0d127 ctx 5244c000 | 6155a000 num 4 state 7 speed 5 port 3 level 1 slot 3 + kworker/0:0-3233 [000] d..1. 36821.864452: xhci_queue_trb: CMD: Stop Ring Command: slot 3 sp 1 ep 7 flags C + kworker/0:0-3233 [000] d..1. 36821.864454: xhci_inc_enq: CMD 000000003daf44b1: enq 0x000000004fbf3150(0x000000004fbf3000) deq 0x000000004fbf3140(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36821.864454: xhci_queue_trb: CMD: Stop Ring Command: slot 3 sp 1 ep 1 flags C + kworker/0:0-3233 [000] d..1. 36821.864455: xhci_inc_enq: CMD 000000003daf44b1: enq 0x000000004fbf3160(0x000000004fbf3000) deq 0x000000004fbf3140(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:0-3233 [000] d..1. 36821.864456: xhci_ring_host_doorbell: Ring doorbell for Command Ring 0 + kworker/0:2-9200 [000] d.h1. 36821.864558: xhci_handle_event: EVENT: TRB 000000004fbf3140 status 'Success' len 0 slot 3 ep 0 type 'Command Completion Event' flags e:C + kworker/0:2-9200 [000] d.h1. 36821.864559: xhci_handle_command: CMD: Stop Ring Command: slot 3 sp 1 ep 7 flags C + kworker/0:2-9200 [000] d.h1. 36821.864562: xhci_inc_deq: CMD 000000003daf44b1: enq 0x000000004fbf3160(0x000000004fbf3000) deq 0x000000004fbf3150(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:2-9200 [000] d.h1. 36821.864563: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf47b0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:2-9200 [000] d.h1. 36821.864563: xhci_handle_event: EVENT: TRB 000000004fbf3150 status 'Success' len 0 slot 3 ep 0 type 'Command Completion Event' flags e:C + kworker/0:2-9200 [000] d.h1. 36821.864563: xhci_handle_command: CMD: Stop Ring Command: slot 3 sp 1 ep 1 flags C + kworker/0:2-9200 [000] dNh1. 36821.864566: xhci_inc_deq: CMD 000000003daf44b1: enq 0x000000004fbf3160(0x000000004fbf3000) deq 0x000000004fbf3160(0x000000004fbf3000) segs 1 stream 0 bounce 0 cycle 1 + kworker/0:2-9200 [000] dNh1. 36821.864566: xhci_inc_deq: EVENT 0000000025a93397: enq 0x000000004fbf4000(0x000000004fbf4000) deq 0x000000004fbf47c0(0x000000004fbf4000) segs 1 stream 0 bounce 0 cycle 1 diff --git a/kernel/build.rs b/kernel/build.rs index 6cbaa297..9d74a4f8 100644 --- a/kernel/build.rs +++ b/kernel/build.rs @@ -1,8 +1,24 @@ use std::env; use std::path::PathBuf; use std::process::Command; +use std::time::{SystemTime, UNIX_EPOCH}; fn main() { + // Emit a unique build ID based on current timestamp (seconds + subsecond nanos). + // Baked into the kernel boot banner so stale builds are immediately detectable. + let ts = SystemTime::now() + .duration_since(UNIX_EPOCH) + .unwrap_or_default(); + let build_id = format!("{:010x}{:04x}", ts.as_secs(), (ts.subsec_nanos() >> 16) & 0xFFFF); + println!("cargo:rustc-env=BREENIX_BUILD_ID={}", build_id); + // Print to build output so agents and humans can capture the ID without + // extracting it from the binary. Visible as "warning: DEPLOY BUILD_ID: ..." + // during cargo build when build.rs reruns. + println!("cargo:warning=DEPLOY BUILD_ID: {}", build_id); + // Rerun whenever xhci.rs changes (we always `touch` it before building, + // so the build ID is always fresh for each deploy cycle). + println!("cargo:rerun-if-changed=src/drivers/usb/xhci.rs"); + // Get absolute paths from Cargo environment let out_dir = env::var("OUT_DIR").unwrap(); let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap(); diff --git a/kernel/src/arch_impl/aarch64/timer_interrupt.rs b/kernel/src/arch_impl/aarch64/timer_interrupt.rs index dd1902c7..89d1a2e9 100644 --- a/kernel/src/arch_impl/aarch64/timer_interrupt.rs +++ b/kernel/src/arch_impl/aarch64/timer_interrupt.rs @@ -198,100 +198,26 @@ pub extern "C" fn timer_interrupt_handler() { static CPU0_TICK: AtomicU64 = AtomicU64::new(0); let cpu0_tick = CPU0_TICK.fetch_add(1, Ordering::Relaxed) + 1; if cpu0_tick % 2000 == 0 { + // Minimal heartbeat: essential OS + xHCI fields only. + // Detailed xHCI diagnostics are in the lock-free xhci_trace buffer. raw_serial_str(b"\n[HB t="); print_timer_count_decimal(cpu0_tick / TARGET_TIMER_HZ); raw_serial_str(b"s ctx="); print_timer_count_decimal(crate::task::scheduler::context_switch_count()); raw_serial_str(b" sys="); print_timer_count_decimal(crate::tracing::providers::counters::SYSCALL_TOTAL.aggregate()); - raw_serial_str(b" flush="); - print_timer_count_decimal(crate::syscall::graphics::FB_FLUSH_COUNT.load(Ordering::Relaxed)); - raw_serial_str(b" fork="); - print_timer_count_decimal(crate::tracing::providers::counters::FORK_TOTAL.aggregate()); - raw_serial_str(b" exec="); - print_timer_count_decimal(crate::tracing::providers::counters::EXEC_TOTAL.aggregate()); - raw_serial_str(b" cow="); - print_timer_count_decimal(crate::memory::cow_stats::TOTAL_FAULTS.load(Ordering::Relaxed)); - raw_serial_str(b" cowpm="); - print_timer_count_decimal(crate::memory::cow_stats::MANAGER_PATH.load(Ordering::Relaxed)); - raw_serial_str(b" cowcp="); - print_timer_count_decimal(crate::memory::cow_stats::PAGES_COPIED.load(Ordering::Relaxed)); - raw_serial_str(b" cowso="); - print_timer_count_decimal(crate::memory::cow_stats::SOLE_OWNER_OPT.load(Ordering::Relaxed)); - raw_serial_str(b" pty="); - print_timer_count_decimal(crate::tty::pty::pair::PTY_SLAVE_BYTES_WRITTEN.load(Ordering::Relaxed)); - raw_serial_str(b" tgn="); - print_timer_count_decimal(crate::arch_impl::aarch64::context_switch::TTBR_PROCESS_GONE_COUNT.load(Ordering::Relaxed)); - raw_serial_str(b" tlb="); - print_timer_count_decimal(crate::arch_impl::aarch64::context_switch::TTBR_PM_LOCK_BUSY_COUNT.load(Ordering::Relaxed)); - raw_serial_str(b" up="); - print_timer_count_decimal(crate::drivers::usb::xhci::POLL_COUNT.load(Ordering::Relaxed)); - raw_serial_str(b" ue="); - print_timer_count_decimal(crate::drivers::usb::xhci::EVENT_COUNT.load(Ordering::Relaxed)); - raw_serial_str(b" uk="); - print_timer_count_decimal(crate::drivers::usb::xhci::KBD_EVENT_COUNT.load(Ordering::Relaxed)); - raw_serial_str(b" xo="); - print_timer_count_decimal(crate::drivers::usb::xhci::XFER_OTHER_COUNT.load(Ordering::Relaxed)); raw_serial_str(b" xe="); print_timer_count_decimal(crate::drivers::usb::xhci::XO_ERR_COUNT.load(Ordering::Relaxed)); - raw_serial_str(b" xi="); - print_hex_u64(crate::drivers::usb::xhci::XO_LAST_INFO.load(Ordering::Relaxed)); - raw_serial_str(b" mi="); - print_timer_count_decimal(crate::drivers::usb::xhci::MSI_EVENT_COUNT.load(Ordering::Relaxed)); - raw_serial_str(b" psc="); - print_timer_count_decimal(crate::drivers::usb::xhci::PSC_COUNT.load(Ordering::Relaxed)); - raw_serial_str(b" nz="); - print_timer_count_decimal(crate::drivers::usb::hid::NONZERO_KBD_COUNT.load(Ordering::Relaxed)); - raw_serial_str(b" lr="); - print_hex_u64(crate::drivers::usb::hid::LAST_KBD_REPORT_U64.load(Ordering::Relaxed)); - raw_serial_str(b" nk="); - print_timer_count_decimal(crate::drivers::usb::xhci::NKRO_EVENT_COUNT.load(Ordering::Relaxed)); - raw_serial_str(b" nr="); - print_hex_u64(crate::drivers::usb::xhci::LAST_NKRO_REPORT_U64.load(Ordering::Relaxed)); - raw_serial_str(b" DS="); - print_timer_count_decimal(crate::drivers::usb::xhci::DMA_SENTINEL_SURVIVED.load(Ordering::SeqCst)); - raw_serial_str(b" DR="); - print_timer_count_decimal(crate::drivers::usb::xhci::DMA_SENTINEL_REPLACED.load(Ordering::SeqCst)); - raw_serial_str(b" ec="); - print_timer_count_decimal(crate::drivers::usb::ehci::EHCI_CTL_COMPLETIONS.load(Ordering::Relaxed) as u64); - raw_serial_str(b" ee="); - print_timer_count_decimal(crate::drivers::usb::ehci::EHCI_CTL_ERRORS.load(Ordering::Relaxed) as u64); - raw_serial_str(b" ei="); - print_timer_count_decimal(crate::drivers::usb::ehci::EHCI_INT_COMPLETIONS.load(Ordering::Relaxed) as u64); - raw_serial_str(b" us="); - print_hex_u64(crate::drivers::usb::xhci::DIAG_USBSTS.load(Ordering::Relaxed) as u64); - raw_serial_str(b" ps="); - print_hex_u64(crate::drivers::usb::xhci::DIAG_KBD_PORTSC.load(Ordering::Relaxed) as u64); - raw_serial_str(b" ep="); - print_hex_u64(crate::drivers::usb::xhci::DIAG_KBD_EP_STATE.load(Ordering::Relaxed) as u64); - raw_serial_str(b" se="); - print_timer_count_decimal(crate::drivers::usb::xhci::DIAG_SPI_ENABLE_COUNT.load(Ordering::Relaxed)); - raw_serial_str(b" er="); - print_timer_count_decimal(crate::drivers::usb::xhci::ENDPOINT_RESET_COUNT.load(Ordering::Relaxed)); - raw_serial_str(b" ef="); - print_timer_count_decimal(crate::drivers::usb::xhci::ENDPOINT_RESET_FAIL_COUNT.load(Ordering::Relaxed)); - raw_serial_str(b" db="); - print_hex_u64(crate::drivers::usb::xhci::DIAG_DOORBELL_EP_STATE.load(Ordering::Relaxed) as u64); - raw_serial_str(b" fd="); - print_hex_u64(crate::drivers::usb::xhci::DIAG_FIRST_DB.load(Ordering::Relaxed) as u64); + raw_serial_str(b" uk="); + print_timer_count_decimal(crate::drivers::usb::xhci::KBD_EVENT_COUNT.load(Ordering::Relaxed)); raw_serial_str(b" fc="); print_timer_count_decimal(crate::drivers::usb::xhci::DIAG_FIRST_XFER_CC.load(Ordering::Relaxed) as u64); - raw_serial_str(b" tp="); - print_hex_u64(crate::drivers::usb::xhci::DIAG_FIRST_XFER_PTR.load(Ordering::Relaxed)); - raw_serial_str(b" qp="); - print_hex_u64(crate::drivers::usb::xhci::DIAG_FIRST_QUEUED_PHYS.load(Ordering::Relaxed)); - raw_serial_str(b" fs="); - print_hex_u64(crate::drivers::usb::xhci::DIAG_FIRST_XFER_SLEP.load(Ordering::Relaxed) as u64); - raw_serial_str(b" ts="); - print_hex_u64(crate::drivers::usb::xhci::DIAG_FIRST_XFER_STATUS.load(Ordering::Relaxed) as u64); - raw_serial_str(b" tc="); - print_hex_u64(crate::drivers::usb::xhci::DIAG_FIRST_XFER_CONTROL.load(Ordering::Relaxed) as u64); - raw_serial_str(b" gr="); - print_timer_count_decimal(crate::drivers::usb::xhci::EP0_GET_REPORT_COUNT.load(Ordering::Relaxed)); - raw_serial_str(b" gk="); - print_timer_count_decimal(crate::drivers::usb::xhci::EP0_GET_REPORT_OK.load(Ordering::Relaxed)); - raw_serial_str(b" ge="); - print_timer_count_decimal(crate::drivers::usb::xhci::EP0_GET_REPORT_ERR.load(Ordering::Relaxed)); + raw_serial_str(b" er="); + print_timer_count_decimal(crate::drivers::usb::xhci::ENDPOINT_RESET_COUNT.load(Ordering::Relaxed)); + raw_serial_str(b" mi="); + print_timer_count_decimal(crate::drivers::usb::xhci::MSI_EVENT_COUNT.load(Ordering::Relaxed)); + raw_serial_str(b" mf="); + print_hex_u64(crate::drivers::usb::xhci::DIAG_MFINDEX.load(Ordering::Relaxed) as u64); raw_serial_str(b"]\n"); } } @@ -360,6 +286,7 @@ fn print_timer_count_decimal(count: u64) { } } + /// Print a u64 as 16-char zero-padded hexadecimal using raw serial output. fn print_hex_u64(val: u64) { const HEX: [u8; 16] = *b"0123456789abcdef"; diff --git a/kernel/src/drivers/mod.rs b/kernel/src/drivers/mod.rs index 00a4b11b..b26a8cab 100644 --- a/kernel/src/drivers/mod.rs +++ b/kernel/src/drivers/mod.rs @@ -147,15 +147,11 @@ pub fn init() -> usize { // Initialize XHCI USB host controller (keyboard + mouse) // NEC uPD720200: vendor 0x1033, device 0x0194 if let Some(xhci_dev) = pci::find_device(0x1033, 0x0194) { - crate::serial_aarch64::raw_serial_str(b"[drv-dbg] calling xhci::init\n"); match usb::xhci::init(&xhci_dev) { Ok(()) => { - crate::serial_aarch64::raw_serial_str(b"[drv-dbg] xhci init Ok\n"); serial_println!("[drivers] XHCI USB controller initialized"); - crate::serial_aarch64::raw_serial_str(b"[drv-dbg] after serial_println\n"); } Err(e) => { - crate::serial_aarch64::raw_serial_str(b"[drv-dbg] xhci init Err\n"); serial_println!("[drivers] XHCI USB init failed: {}", e); } } diff --git a/kernel/src/drivers/pci.rs b/kernel/src/drivers/pci.rs index e318dfa3..6e5ea1d2 100644 --- a/kernel/src/drivers/pci.rs +++ b/kernel/src/drivers/pci.rs @@ -259,6 +259,29 @@ impl Device { pci_write_config_word(self.bus, self.device, self.function, 0x04, command | (1 << 10)); } + /// Enable legacy INTx interrupts (clear DisINTx bit in PCI Command register). + pub fn enable_intx(&self) { + let command = pci_read_config_word(self.bus, self.device, self.function, 0x04); + pci_write_config_word(self.bus, self.device, self.function, 0x04, command & !(1 << 10)); + } + + /// Disable PCI MSI. Clears the MSI Enable bit in the MSI Message Control register. + /// Returns true if MSI was found and disabled, false if no MSI capability exists. + pub fn disable_msi(&self) -> bool { + if let Some(cap_offset) = self.find_msi_capability() { + let msg_ctrl = pci_read_config_word(self.bus, self.device, self.function, cap_offset + 2); + // Clear bit 0 (MSI Enable) + pci_write_config_word( + self.bus, self.device, self.function, + cap_offset + 2, + msg_ctrl & !0x0001, + ); + true + } else { + false + } + } + /// Find the MSI capability in the PCI capability list. /// /// Returns the config space offset of the MSI capability, or None if not found. diff --git a/kernel/src/drivers/usb/descriptors.rs b/kernel/src/drivers/usb/descriptors.rs index 923c515b..d4b30086 100644 --- a/kernel/src/drivers/usb/descriptors.rs +++ b/kernel/src/drivers/usb/descriptors.rs @@ -101,6 +101,7 @@ pub struct SetupPacket { pub mod descriptor_type { pub const DEVICE: u8 = 1; pub const CONFIGURATION: u8 = 2; + pub const STRING: u8 = 3; pub const INTERFACE: u8 = 4; pub const ENDPOINT: u8 = 5; pub const HID_REPORT: u8 = 0x22; @@ -133,6 +134,7 @@ pub mod request { /// USB HID Class Requests pub mod hid_request { + pub const GET_REPORT: u8 = 0x01; pub const SET_REPORT: u8 = 0x09; pub const SET_IDLE: u8 = 0x0A; pub const SET_PROTOCOL: u8 = 0x0B; diff --git a/kernel/src/drivers/usb/xhci.rs b/kernel/src/drivers/usb/xhci.rs index 218f8cee..35952531 100644 --- a/kernel/src/drivers/usb/xhci.rs +++ b/kernel/src/drivers/usb/xhci.rs @@ -32,7 +32,7 @@ use core::sync::atomic::{AtomicBool, AtomicU32, AtomicU64, Ordering, fence}; use spin::Mutex; use super::descriptors::{ - class_code, descriptor_type, hid_protocol, hid_request, hid_subclass, request, + class_code, descriptor_type, hid_protocol, hid_request, request, DeviceDescriptor, ConfigDescriptor, InterfaceDescriptor, EndpointDescriptor, SetupPacket, }; @@ -43,6 +43,37 @@ use super::descriptors::{ /// HHDM base for memory-mapped access (ARM64). const HHDM_BASE: u64 = 0xFFFF_0000_0000_0000; +/// Minimal init test: skip bandwidth dance and HID class setup. +/// When true, the driver does only: Address β†’ ConfigureEndpoint β†’ SET_CONFIG β†’ queue TRB. +/// Used to isolate whether CC=12 is caused by the bandwidth dance or HID setup steps. +const MINIMAL_INIT: bool = false; + +/// Skip the bandwidth dance (StopEndpoint + re-ConfigureEndpoint per EP). +/// Linux ftrace confirmed: Linux DOES perform the bandwidth dance for HID devices +/// (3 ConfigureEndpoint commands total: 1 batch + Stop+re-ConfigEP per endpoint). +/// Linux also sends SET_CONFIGURATION AFTER the BW dance, not before. +/// Key fix: EP State bits (2:0) of DW0 must be zeroed in the re-ConfigEP input +/// context (RsvdZ per spec). Previously we copied DW0 from the output context +/// which had EP State=3 (Stopped), confusing Parallels' virtual xHC. +/// +/// Set to true to test hypothesis that Parallels' virtual xHC internally rejects +/// Configure Endpoint while endpoint is in Running state ([XhcCmd] type:00000012 +/// state:00000001 not supported) β€” causing CC=12 on subsequent Normal TRBs even +/// though the event ring returns CC=1 for the re-ConfigEP command. +const SKIP_BW_DANCE: bool = true; + +/// Focus debug mode: only initialize the mouse device (slot=1), skip keyboard entirely. +/// Reduces from 4 interrupt endpoints to 2, isolating whether CC=12 is caused by +/// keyboard interference or is a fundamental per-endpoint issue. +const MOUSE_ONLY: bool = false; + +/// Send SET_PROTOCOL(Boot Protocol=0) to HID interfaces. +/// Linux's usbhid driver sends SET_PROTOCOL for boot keyboard (subclass=1, protocol=1) +/// during initial enumeration, but NOT during rebind (confirmed via usbmon on linux-probe VM). +/// Setting false matches the rebind sequence Linux uses. Testing whether SET_PROTOCOL +/// is causing Parallels to internally reset interrupt endpoints (producing CC=12). + + /// NEC XHCI vendor ID. pub const NEC_VENDOR_ID: u16 = 0x1033; /// NEC uPD720200 XHCI device ID. @@ -51,18 +82,15 @@ pub const NEC_XHCI_DEVICE_ID: u16 = 0x0194; /// Maximum device slots we support. const MAX_SLOTS: usize = 32; /// Command ring size in TRBs (last entry reserved for Link TRB). -/// Large command ring to avoid wrapping via Link TRB. -/// Parallels XHCI does not follow Link TRBs (tested: transfer rings fail, -/// command ring also fails after first wrap at 63 commands). With 4096 entries -/// (4095 usable), we get ~2044 ring resets before exhaustion β‰ˆ hours of use. +/// The Link TRB uses TC=bit1 (Toggle Cycle) so the ring wraps indefinitely. +/// Previous "command ring fails after first wrap" was caused by a bug: the +/// Link TRB was using bit5 (IOC) instead of bit1 (TC), so the HC never +/// toggled its cycle bit on wrap and stopped seeing post-wrap commands. const CMD_RING_SIZE: usize = 4096; /// Event ring size in TRBs. const EVENT_RING_SIZE: usize = 64; /// Transfer ring size per endpoint in TRBs (last entry reserved for Link TRB). /// Larger transfer ring reduces the number of Stop EP + Set TR Dequeue resets. -/// Each reset costs 2 command ring entries. With 256 entries (~85 GET_REPORTs -/// per fill) and 4095 usable command ring entries, we get ~2044 resets β‰ˆ 29 min -/// of continuous keyboard polling at 100Hz before command ring exhaustion. const TRANSFER_RING_SIZE: usize = 256; /// Maximum number of HID transfer rings (keyboard + mouse). @@ -100,6 +128,8 @@ mod trb_type { #[allow(dead_code)] mod completion_code { pub const SUCCESS: u32 = 1; + pub const USB_TRANSACTION_ERROR: u32 = 4; + pub const STALL_ERROR: u32 = 6; pub const ENDPOINT_NOT_ENABLED: u32 = 12; pub const SHORT_PACKET: u32 = 13; } @@ -220,14 +250,14 @@ static mut ERST: Aligned64<[ErstEntry; 1]> = Aligned64([ErstEntry::zeroed(); 1]) /// to avoid index collisions. Keyboard = HID_RING_BASE + 0, Mouse = HID_RING_BASE + 1. const HID_RING_BASE: usize = MAX_SLOTS; -/// Total number of transfer rings: MAX_SLOTS for EP0 + 3 for HID interrupt endpoints. -/// hid_idx 0 = boot keyboard (DCI 3), 1 = mouse, 2 = NKRO keyboard (DCI 5). -const NUM_TRANSFER_RINGS: usize = MAX_SLOTS + 3; +/// Total number of transfer rings: MAX_SLOTS for EP0 + 4 for HID interrupt endpoints. +/// hid_idx 0 = boot keyboard (DCI 3), 1 = mouse (DCI 3), 2 = NKRO keyboard (DCI 5), 3 = mouse2 (DCI 5). +const NUM_TRANSFER_RINGS: usize = MAX_SLOTS + 4; /// Transfer rings for device endpoints. /// /// Indices [0..MAX_SLOTS): EP0 control rings, indexed by slot_idx (slot_id - 1). -/// Indices [HID_RING_BASE..HID_RING_BASE+3): HID interrupt rings (keyboard, mouse, NKRO keyboard). +/// Indices [HID_RING_BASE..HID_RING_BASE+4): HID interrupt rings (kbd boot, mouse, kbd NKRO, mouse2). static mut TRANSFER_RINGS: [[Trb; TRANSFER_RING_SIZE]; NUM_TRANSFER_RINGS] = [[Trb::zeroed(); TRANSFER_RING_SIZE]; NUM_TRANSFER_RINGS]; /// Transfer ring enqueue indices. @@ -240,24 +270,49 @@ static mut TRANSFER_CYCLE: [bool; NUM_TRANSFER_RINGS] = [true; NUM_TRANSFER_RING static mut INPUT_CONTEXTS: [AlignedPage<[u8; 4096]>; MAX_SLOTS] = [const { AlignedPage([0u8; 4096]) }; MAX_SLOTS]; +/// Separate Input Context page for bandwidth dance re-ConfigureEndpoint. +/// Must be at a DIFFERENT physical address than INPUT_CONTEXTS to avoid +/// a caching bug in the Parallels virtual xHC where re-ConfigureEndpoint +/// is silently ignored if the Input Context pointer matches the initial +/// ConfigureEndpoint command. +/// Separate Input Context for BW dance re-ConfigureEndpoint commands. +/// Must be at a DIFFERENT physical address than INPUT_CONTEXTS β€” the Parallels +/// virtual xHC requires a distinct pointer for re-ConfigureEndpoint to take effect. +static mut RECONFIG_INPUT_CTX: AlignedPage<[u8; 4096]> = AlignedPage([0u8; 4096]); + /// Device Contexts (output contexts, 2048 bytes each). /// Managed by the controller; we provide physical addresses via DCBAA. static mut DEVICE_CONTEXTS: [AlignedPage<[u8; 4096]>; MAX_SLOTS] = [const { AlignedPage([0u8; 4096]) }; MAX_SLOTS]; /// HID report buffer for keyboard boot interface (8 bytes: modifier + reserved + 6 keycodes). -static mut KBD_REPORT_BUF: Aligned64<[u8; 8]> = Aligned64([0u8; 8]); +static mut KBD_REPORT_BUF: Aligned64<[u8; 64]> = Aligned64([0u8; 64]); /// HID report buffer for NKRO keyboard interface (64 bytes to accommodate any report ID). /// Reports include a Report ID prefix: [report_id, modifiers, reserved, key1..key6, ...]. static mut NKRO_REPORT_BUF: Aligned64<[u8; 64]> = Aligned64([0u8; 64]); /// HID report buffer for mouse (8 bytes: buttons + X + Y + wheel + ...). -static mut MOUSE_REPORT_BUF: Aligned64<[u8; 8]> = Aligned64([0u8; 8]); +static mut MOUSE_REPORT_BUF: Aligned64<[u8; 64]> = Aligned64([0u8; 64]); + +/// HID report buffer for mouse2 (second mouse interface, DCI 5). +static mut MOUSE2_REPORT_BUF: Aligned64<[u8; 64]> = Aligned64([0u8; 64]); /// Scratch buffer for control transfer data stages (256 bytes). static mut CTRL_DATA_BUF: Aligned64<[u8; 256]> = Aligned64([0u8; 256]); + +/// Number of successful GET_REPORT polls for mouse (for heartbeat diagnostics). +pub static GET_REPORT_OK: AtomicU64 = AtomicU64::new(0); + +/// Number of non-zero GET_REPORT responses for mouse (indicates actual movement). +pub static GET_REPORT_NONZERO: AtomicU64 = AtomicU64::new(0); + +/// Number of successful EP0 GET_REPORT polls for keyboard. +/// Use this in heartbeat to verify keyboard polling is active (gk= equivalent). +pub static KBD_GET_REPORT_OK: AtomicU64 = AtomicU64::new(0); + + // ============================================================================= // Controller State // ============================================================================= @@ -295,8 +350,11 @@ struct XhciState { kbd_nkro_endpoint: u8, /// Slot ID for mouse device (0 = not found) mouse_slot: u8, - /// Endpoint DCI for mouse interrupt IN + /// Endpoint DCI for mouse boot interrupt IN (interface 0, DCI 3) mouse_endpoint: u8, + /// Endpoint DCI for mouse2 interrupt IN (interface 1, DCI 5, 0 = not found) + /// Linux ftrace shows the Parallels virtual mouse has two interrupt endpoints. + mouse_nkro_endpoint: u8, } /// Global lock protecting XHCI controller access. @@ -322,6 +380,9 @@ pub static KBD_EVENT_COUNT: AtomicU64 = AtomicU64::new(0); pub static NKRO_EVENT_COUNT: AtomicU64 = AtomicU64::new(0); /// First 8 bytes of last NKRO report buffer (for heartbeat diagnostics). pub static LAST_NKRO_REPORT_U64: AtomicU64 = AtomicU64::new(0); +/// First 8 bytes of last GET_REPORT EP0 response (for heartbeat diagnostics). +/// Lets us see the raw mouse report format and detect movement vs. idle. +pub static LAST_GET_REPORT_U64: AtomicU64 = AtomicU64::new(0); /// Counts transfer events that didn't match kbd/mouse slots or had error CC. pub static XFER_OTHER_COUNT: AtomicU64 = AtomicU64::new(0); /// Last "other" transfer event info: (slot << 16) | (endpoint << 8) | cc. @@ -338,6 +399,7 @@ pub static MSI_EVENT_COUNT: AtomicU64 = AtomicU64::new(0); static MSI_KBD_NEEDS_REQUEUE: AtomicBool = AtomicBool::new(false); static MSI_MOUSE_NEEDS_REQUEUE: AtomicBool = AtomicBool::new(false); static MSI_NKRO_NEEDS_REQUEUE: AtomicBool = AtomicBool::new(false); +static MSI_MOUSE2_NEEDS_REQUEUE: AtomicBool = AtomicBool::new(false); /// Sentinel diagnostic: counts reports where the sentinel byte (0xDE) was NOT overwritten by DMA. pub static DMA_SENTINEL_SURVIVED: AtomicU64 = AtomicU64::new(0); @@ -352,11 +414,11 @@ pub static DIAG_KBD_PORTSC: AtomicU32 = AtomicU32::new(0); pub static DIAG_KBD_EP_STATE: AtomicU32 = AtomicU32::new(0); /// Periodic diagnostic: SPI enable count (how many times SPI was re-enabled). pub static DIAG_SPI_ENABLE_COUNT: AtomicU64 = AtomicU64::new(0); -/// Diagnostic: endpoint state BEFORE doorbell ring in queue_hid_transfer. -/// Format: (pre_state << 4) | post_state for the last transfer queued. +/// Diagnostic counter for doorbell/transfer events (shown as `db=` in heartbeat). pub static DIAG_DOORBELL_EP_STATE: AtomicU32 = AtomicU32::new(0); -/// Diagnostic: endpoint state from the FIRST queue_hid_transfer call only. -/// Format: (pre_state << 4) | post_state. Written once, never overwritten. +/// Diagnostic: last CC received for any GET_REPORT Transfer Event (0xFF = none seen yet). +/// Shown as `fd=` in heartbeat. Distinguishes "no response" (0xFF) from bad CC (12, 4, etc.) +/// vs success (1) or short packet (13). pub static DIAG_FIRST_DB: AtomicU32 = AtomicU32::new(0xFF); /// Diagnostic: CC of the very first Transfer Event seen. pub static DIAG_FIRST_XFER_CC: AtomicU32 = AtomicU32::new(0xFF); @@ -371,21 +433,48 @@ pub static DIAG_FIRST_XFER_STATUS: AtomicU32 = AtomicU32::new(0); /// Diagnostic: Full control DW of the first Transfer Event. pub static DIAG_FIRST_XFER_CONTROL: AtomicU32 = AtomicU32::new(0); -/// Flags set when Transfer Events arrive with error completion codes (e.g., CC=12 -/// Endpoint Not Enabled). Checked by poll_hid_events to trigger Reset Endpoint -/// + Set TR Dequeue Pointer recovery. +/// Flags set when Transfer Events arrive with non-CC=12 error completion codes +/// (e.g., CC=4 USB_TRANSACTION_ERROR, CC=6 STALL_ERROR). These error codes halt +/// the endpoint; poll_hid_events issues Reset Endpoint + Set TR Dequeue Pointer. +/// CC=12 (Endpoint Not Enabled) is handled separately: just re-queue the TRB. static NEEDS_RESET_KBD_BOOT: AtomicBool = AtomicBool::new(false); static NEEDS_RESET_KBD_NKRO: AtomicBool = AtomicBool::new(false); static NEEDS_RESET_MOUSE: AtomicBool = AtomicBool::new(false); +static NEEDS_RESET_MOUSE2: AtomicBool = AtomicBool::new(false); /// Diagnostic: counts successful endpoint resets. pub static ENDPOINT_RESET_COUNT: AtomicU64 = AtomicU64::new(0); /// Diagnostic: counts failed endpoint reset attempts. pub static ENDPOINT_RESET_FAIL_COUNT: AtomicU64 = AtomicU64::new(0); +/// Minimum poll ticks between consecutive resets of the same endpoint. +/// At 200Hz, 20 ticks = 100ms. Prevents the CC=12 reset storm from burning +/// 200 command ring entries per second when no keys are pressed. +const RESET_INTERVAL_TICKS: u64 = 20; +/// Poll tick of the last successful reset for each HID endpoint (for rate limiting). +static KBD_BOOT_RESET_POLL: AtomicU64 = AtomicU64::new(0); +static KBD_NKRO_RESET_POLL: AtomicU64 = AtomicU64::new(0); +static MOUSE_RESET_POLL: AtomicU64 = AtomicU64::new(0); +static MOUSE2_RESET_POLL: AtomicU64 = AtomicU64::new(0); +/// Diagnostic: endpoint output context state immediately after first error CC (0xFF = not seen). +/// Packed: slot<<16 | dci<<8 | state_bits[2:0]. State: 0=Disabled, 1=Running, 3=Halted, 4=Error. +pub static DIAG_EP_STATE_AFTER_CC12: AtomicU32 = AtomicU32::new(0xFF); +/// Diagnostic: endpoint output context state after NEC quirk + SetTRDeq reset (0xFF = not seen). +/// Packed: slot<<16 | dci<<8 | state_bits[2:0]. Should be 1=Running if reset worked. +pub static DIAG_EP_STATE_AFTER_RESET: AtomicU32 = AtomicU32::new(0xFF); +/// Diagnostic: MFINDEX register value (microframe index) for timing analysis. +pub static DIAG_MFINDEX: AtomicU32 = AtomicU32::new(0); /// Maximum number of endpoint resets before giving up. /// Each reset uses 2 command ring entries. With CMD_RING_SIZE=4096 (4095 usable) -/// and ~6 entries used during init, limit to 50 resets (100 cmd ring entries) -/// to preserve command ring capacity for future use. -const MAX_ENDPOINT_RESETS: u64 = 10; +/// CC=12 always halts the endpoint; resets are issued continuously until CC=1. + +/// Whether a GET_REPORT EP0 control transfer is pending for the mouse. +/// Set when TRBs are queued, cleared when the Transfer Event is processed. +static MOUSE_GET_REPORT_PENDING: AtomicBool = AtomicBool::new(false); + +/// Whether the first keyboard interrupt TRBs have been queued. +/// Keyboard TRBs are deferred to poll=300 (after SPI enable at poll=200) +/// to avoid CC=12 that occurs when TRBs are queued during initialization +/// before the MSI pathway is active. Only set once; re-queue via MSI/error handlers. +static KBD_TRB_FIRST_QUEUED: AtomicBool = AtomicBool::new(false); /// Whether initial HID interrupt TRBs have been queued post-init. /// TRBs are deferred until after XHCI_INITIALIZED and SPI enable so the full @@ -393,17 +482,6 @@ const MAX_ENDPOINT_RESETS: u64 = 10; /// processes the first interrupt endpoint transfer. static HID_TRBS_QUEUED: AtomicBool = AtomicBool::new(false); -// EP0 GET_REPORT polling state machine. -// Since interrupt endpoints always return CC=12 on Parallels virtual xHC, -// we poll for keyboard data via GET_REPORT on the working EP0 control pipe. -// State: 0 = IDLE (ready for next request), 1 = PENDING (TRBs queued) -pub static EP0_POLL_STATE: AtomicU32 = AtomicU32::new(0); -/// Count of EP0 GET_REPORT requests queued. -pub static EP0_GET_REPORT_COUNT: AtomicU64 = AtomicU64::new(0); -/// Count of successful EP0 GET_REPORT completions. -pub static EP0_GET_REPORT_OK: AtomicU64 = AtomicU64::new(0); -/// Count of failed EP0 GET_REPORT completions (non-SUCCESS CC). -pub static EP0_GET_REPORT_ERR: AtomicU64 = AtomicU64::new(0); // ============================================================================= // Memory Helpers @@ -463,6 +541,322 @@ fn dma_cache_invalidate(ptr: *const u8, len: usize) { } } +// ============================================================================= +// XHCI Trace Infrastructure (lock-free ring buffer) +// ============================================================================= + +/// Maximum number of trace records. +const XHCI_TRACE_MAX_RECORDS: usize = 512; +/// Maximum bytes for trace payload data. +const XHCI_TRACE_DATA_SIZE: usize = 32768; + +/// Trace operation codes. +#[repr(u8)] +#[derive(Clone, Copy)] +#[allow(dead_code)] +enum XhciTraceOp { + MmioWrite32 = 1, + MmioWrite64 = 2, + MmioRead32 = 3, + CommandSubmit = 10, + CommandComplete = 11, + TransferSubmit = 12, + TransferEvent = 13, + Doorbell = 14, + InputContext = 20, + OutputContext = 21, + TransferRingSetup = 22, + CacheOp = 30, + SetTrDeq = 31, + EpState = 40, + PortStatusChange = 41, + Note = 50, +} + +/// A single trace record. +#[repr(C)] +struct XhciTraceRecord { + seq: u32, + op: u8, + slot: u8, + dci: u8, + _pad: u8, + timestamp: u64, + data_offset: u32, + data_len: u32, +} + +/// Whether tracing is active. +static XHCI_TRACE_ACTIVE: AtomicBool = AtomicBool::new(false); +/// Monotonic sequence number for trace records. +static XHCI_TRACE_SEQ: AtomicU32 = AtomicU32::new(0); +/// Data buffer write cursor. +static XHCI_TRACE_DATA_CURSOR: AtomicU32 = AtomicU32::new(0); + +/// Trace record ring buffer. +static mut XHCI_TRACE_RECORDS: [XhciTraceRecord; XHCI_TRACE_MAX_RECORDS] = { + const ZERO: XhciTraceRecord = XhciTraceRecord { + seq: 0, op: 0, slot: 0, dci: 0, _pad: 0, + timestamp: 0, data_offset: 0xFFFF_FFFF, data_len: 0, + }; + [ZERO; XHCI_TRACE_MAX_RECORDS] +}; + +/// Trace data payload buffer. +static mut XHCI_TRACE_DATA: [u8; XHCI_TRACE_DATA_SIZE] = [0u8; XHCI_TRACE_DATA_SIZE]; + +/// Read the ARM64 counter register for timestamps. +#[inline(always)] +fn trace_timestamp() -> u64 { + let val: u64; + unsafe { + core::arch::asm!("mrs {}, cntvct_el0", out(reg) val, options(nostack, nomem)); + } + val +} + +/// Record a trace event with optional payload data. +fn xhci_trace(op: XhciTraceOp, slot: u8, dci: u8, data: &[u8]) { + if !XHCI_TRACE_ACTIVE.load(Ordering::Relaxed) { + return; + } + + let seq = XHCI_TRACE_SEQ.fetch_add(1, Ordering::Relaxed); + let idx = seq as usize % XHCI_TRACE_MAX_RECORDS; + let ts = trace_timestamp(); + + let (data_offset, data_len) = if !data.is_empty() { + let len = data.len().min(256); // cap per-record payload + let cursor = XHCI_TRACE_DATA_CURSOR.fetch_add(len as u32, Ordering::Relaxed); + let off = cursor as usize % XHCI_TRACE_DATA_SIZE; + // Copy data (may wrap, but that's OK for a ring buffer) + let copy_len = len.min(XHCI_TRACE_DATA_SIZE - off); + unsafe { + let data_ptr = core::ptr::addr_of_mut!(XHCI_TRACE_DATA) as *mut u8; + core::ptr::copy_nonoverlapping( + data.as_ptr(), + data_ptr.add(off), + copy_len, + ); + if copy_len < len { + core::ptr::copy_nonoverlapping( + data.as_ptr().add(copy_len), + data_ptr, + len - copy_len, + ); + } + } + (off as u32, len as u32) + } else { + (0xFFFF_FFFF, 0) + }; + + unsafe { + let rec = &mut *core::ptr::addr_of_mut!(XHCI_TRACE_RECORDS) + .cast::() + .add(idx); + rec.seq = seq; + rec.op = op as u8; + rec.slot = slot; + rec.dci = dci; + rec.timestamp = ts; + rec.data_offset = data_offset; + rec.data_len = data_len; + } +} + +/// Record a short text note (up to 64 chars) in the trace buffer. +fn xhci_trace_note(slot: u8, note: &str) { + let bytes = note.as_bytes(); + let len = bytes.len().min(64); + xhci_trace(XhciTraceOp::Note, slot, 0, &bytes[..len]); +} + +/// Trace a TRB (16 bytes) with the given operation. +#[allow(dead_code)] +fn xhci_trace_trb(op: XhciTraceOp, slot: u8, dci: u8, trb: &Trb) { + let bytes: [u8; 16] = unsafe { + core::mem::transmute_copy(trb) + }; + xhci_trace(op, slot, dci, &bytes); +} + +/// Trace an Input Context before a command. +#[allow(dead_code)] +fn xhci_trace_input_ctx(slot: u8, base: *const u8, ctx_size: usize, max_dci: u8) { + // Capture Input Control Context (first ctx_size bytes) + slot + up to max_dci EP contexts + let total = ((2 + max_dci as usize) * ctx_size).min(256); + let data = unsafe { core::slice::from_raw_parts(base, total) }; + xhci_trace(XhciTraceOp::InputContext, slot, max_dci, data); +} + +/// Trace an Output Context after a command. +#[allow(dead_code)] +fn xhci_trace_output_ctx(slot: u8, base: *const u8, ctx_size: usize, max_dci: u8) { + let total = ((1 + max_dci as usize) * ctx_size).min(256); + let data = unsafe { core::slice::from_raw_parts(base, total) }; + xhci_trace(XhciTraceOp::OutputContext, slot, max_dci, data); +} + +/// Trace a doorbell write. +#[allow(dead_code)] +fn xhci_trace_doorbell(db_base: u64, slot: u8, target: u8) { + let mut buf = [0u8; 12]; + buf[0..8].copy_from_slice(&db_base.to_le_bytes()); + buf[8] = slot; + buf[9] = target; + xhci_trace(XhciTraceOp::Doorbell, slot, target, &buf); +} + +/// Trace a 32-bit MMIO write. +#[allow(dead_code)] +fn xhci_trace_mmio_w32(addr: u64, val: u32) { + let mut buf = [0u8; 12]; + buf[0..8].copy_from_slice(&addr.to_le_bytes()); + buf[8..12].copy_from_slice(&val.to_le_bytes()); + xhci_trace(XhciTraceOp::MmioWrite32, 0, 0, &buf); +} + +/// Trace a 64-bit MMIO write. +#[allow(dead_code)] +fn xhci_trace_mmio_w64(addr: u64, val: u64) { + let mut buf = [0u8; 16]; + buf[0..8].copy_from_slice(&addr.to_le_bytes()); + buf[8..16].copy_from_slice(&val.to_le_bytes()); + xhci_trace(XhciTraceOp::MmioWrite64, 0, 0, &buf); +} + +/// Trace a cache operation. +#[allow(dead_code)] +fn xhci_trace_cache_op(addr: u64, len: u32) { + let mut buf = [0u8; 12]; + buf[0..8].copy_from_slice(&addr.to_le_bytes()); + buf[8..12].copy_from_slice(&len.to_le_bytes()); + xhci_trace(XhciTraceOp::CacheOp, 0, 0, &buf); +} + +/// Dump the xHCI trace buffer to serial in a parseable hex format. +/// Called once after init completes. Uses serial_println which is fine post-init. +#[allow(dead_code)] +fn xhci_trace_dump() { + let total = XHCI_TRACE_SEQ.load(Ordering::Relaxed); + if total == 0 { + crate::serial_println!("=== XHCI_TRACE_START ==="); + crate::serial_println!("(no records)"); + crate::serial_println!("=== XHCI_TRACE_END ==="); + return; + } + + // Determine range: if total <= MAX, dump 0..total. If wrapped, dump last MAX records. + let start = if total as usize <= XHCI_TRACE_MAX_RECORDS { + 0u32 + } else { + total - XHCI_TRACE_MAX_RECORDS as u32 + }; + + crate::serial_println!("=== XHCI_TRACE_START total={} ===", total); + + for seq in start..total { + let idx = seq as usize % XHCI_TRACE_MAX_RECORDS; + let rec = unsafe { + &*core::ptr::addr_of!(XHCI_TRACE_RECORDS) + .cast::() + .add(idx) + }; + + // Op name for readability + let op_name = match rec.op { + 1 => "MMIO_W32", + 2 => "MMIO_W64", + 3 => "MMIO_R32", + 10 => "CMD_SUBMIT", + 11 => "CMD_COMPLETE", + 12 => "XFER_SUBMIT", + 13 => "XFER_EVENT", + 14 => "DOORBELL", + 20 => "INPUT_CTX", + 21 => "OUTPUT_CTX", + 22 => "XFER_RING_SETUP", + 30 => "CACHE_OP", + 31 => "SET_TR_DEQ", + 40 => "EP_STATE", + 41 => "PORT_SC", + 50 => "NOTE", + _ => "UNKNOWN", + }; + + crate::serial_println!( + "T {:04} {:12} S={:02} E={:02} TS={:016X} LEN={:04X}", + rec.seq, op_name, rec.slot, rec.dci, rec.timestamp, rec.data_len, + ); + + // Dump payload in 16-byte hex lines + if rec.data_len > 0 && rec.data_offset != 0xFFFF_FFFF { + let off = rec.data_offset as usize; + let len = rec.data_len as usize; + if off + len <= XHCI_TRACE_DATA_SIZE { + let data = unsafe { + core::slice::from_raw_parts( + core::ptr::addr_of!(XHCI_TRACE_DATA) + .cast::() + .add(off), + len, + ) + }; + + // For NOTE records, print as string + if rec.op == 50 { + if let Ok(s) = core::str::from_utf8(data) { + crate::serial_println!(" \"{}\"", s); + } + continue; + } + + // Print hex in 16-byte rows with 4-byte grouping + let mut i = 0; + while i < len { + let row_end = (i + 16).min(len); + let mut row_str = [0u8; 80]; + let mut pos = 0; + row_str[pos] = b' '; + pos += 1; + row_str[pos] = b' '; + pos += 1; + + let mut j = i; + while j < row_end { + let dw_end = (j + 4).min(row_end); + let mut k = j; + while k < dw_end { + let byte = data[k]; + let hi = byte >> 4; + let lo = byte & 0xF; + row_str[pos] = if hi < 10 { b'0' + hi } else { b'A' + hi - 10 }; + pos += 1; + row_str[pos] = if lo < 10 { b'0' + lo } else { b'A' + lo - 10 }; + pos += 1; + k += 1; + } + if dw_end < row_end { + row_str[pos] = b' '; + pos += 1; + } + j = dw_end; + } + + if let Ok(s) = core::str::from_utf8(&row_str[..pos]) { + crate::serial_println!("{}", s); + } + + i += 16; + } + } + } + } + + crate::serial_println!("=== XHCI_TRACE_END ==="); +} + // ============================================================================= // MMIO Register Access // ============================================================================= @@ -544,10 +938,13 @@ fn enqueue_command(trb: Trb) { let link = Trb { param: cmd_ring_phys, status: 0, - // Link TRB type, Toggle Cycle (TC) bit 5, plus current cycle bit + // Link TRB type, Toggle Cycle (TC=bit1) per xHCI spec. + // TC must be bit 1, NOT bit 5 (which is IOC). Without TC set, + // the HC never toggles its cycle bit on wrap and ignores all + // post-wrap commands, making the ring appear exhausted. control: (trb_type::LINK << 10) | if cycle { 1 } else { 0 } - | (1 << 5), + | (1 << 1), }; core::ptr::write_volatile( &mut (*ring).0[CMD_RING_SIZE - 1] as *mut Trb, @@ -621,6 +1018,11 @@ fn wait_for_event_inner(state: &XhciState, command_only: bool) -> Result Result { let event = wait_for_command(state)?; let cc = event.completion_code(); if cc != completion_code::SUCCESS { - crate::serial_println!("[xhci] EnableSlot failed: completion code {}", cc); + xhci_trace_note(0, "err:enable_slot"); return Err("XHCI EnableSlot failed"); } let slot_id = event.slot_id(); - crate::serial_println!("[xhci] Enabled slot {}", slot_id); + xhci_trace_note(slot_id, "enable_slot"); Ok(slot_id) } @@ -689,9 +1091,14 @@ fn address_device(state: &XhciState, slot_id: u8, port_id: u8) -> Result<(), &'s let input_ctx = &raw mut INPUT_CONTEXTS[slot_idx]; core::ptr::write_bytes((*input_ctx).0.as_mut_ptr(), 0, 4096); - // Zero the output (device) context + // Zero the output (device) context and flush to RAM. + // ARM64 DMA: the xHC writes Output Context to RAM (bypassing cache). + // If we leave dirty zeros in cache, a later cache eviction or our own + // dma_cache_invalidate (dc civac = clean+invalidate) could write stale + // zeros back to RAM, overwriting the xHC's data. Flush immediately. let dev_ctx = &raw mut DEVICE_CONTEXTS[slot_idx]; core::ptr::write_bytes((*dev_ctx).0.as_mut_ptr(), 0, 4096); + dma_cache_clean((*dev_ctx).0.as_ptr(), 4096); let input_base = (*input_ctx).0.as_mut_ptr(); @@ -713,7 +1120,8 @@ fn address_device(state: &XhciState, slot_id: u8, port_id: u8) -> Result<(), &'s let slot_dw0: u32 = (1u32 << 27) | (port_speed << 20); core::ptr::write_volatile(slot_ctx as *mut u32, slot_dw0); - // DW1: Root Hub Port Number (bits 23:16) + // DW1: Root Hub Port Number (bits 23:16), Max Exit Latency (bits 15:0) = 0 + // Per Linux xhci.h: ROOT_HUB_PORT(p) = ((p) & 0xff) << 16 let slot_dw1: u32 = (port_id as u32) << 16; core::ptr::write_volatile(slot_ctx.add(4) as *mut u32, slot_dw1); @@ -739,6 +1147,10 @@ fn address_device(state: &XhciState, slot_id: u8, port_id: u8) -> Result<(), &'s // Each device slot uses its own transfer ring during enumeration. let ring_ptr = &raw mut TRANSFER_RINGS[slot_idx]; core::ptr::write_bytes(ring_ptr as *mut u8, 0, TRANSFER_RING_SIZE * 16); + dma_cache_clean( + &TRANSFER_RINGS[slot_idx] as *const [Trb; TRANSFER_RING_SIZE] as *const u8, + TRANSFER_RING_SIZE * 16, + ); TRANSFER_ENQUEUE[slot_idx] = 0; TRANSFER_CYCLE[slot_idx] = true; @@ -774,7 +1186,10 @@ fn address_device(state: &XhciState, slot_id: u8, port_id: u8) -> Result<(), &'s ); // Build AddressDevice TRB (BSR=0) - // The xHC assigns an address and sends SET_ADDRESS to the device. + // BSR=0: the xHC assigns an address and sends SET_ADDRESS to the device, + // transitioning the slot to Addressed state. Required before ConfigureEndpoint. + // Note: the ftrace agent misidentified the cycle bit (b:C) as the BSR bit β€” + // BSR=1 causes CC=19 (Context State Error) on ConfigureEndpoint. let input_ctx_phys = virt_to_phys(&raw const INPUT_CONTEXTS[slot_idx] as u64); let trb = Trb { param: input_ctx_phys, @@ -788,15 +1203,10 @@ fn address_device(state: &XhciState, slot_id: u8, port_id: u8) -> Result<(), &'s let event = wait_for_command(state)?; let cc = event.completion_code(); if cc != completion_code::SUCCESS { - crate::serial_println!( - "[xhci] AddressDevice slot {} failed: completion code {}", - slot_id, - cc - ); return Err("XHCI AddressDevice failed"); } - crate::serial_println!("[xhci] Addressed device in slot {}", slot_id); + xhci_trace_note(slot_id, "address_device"); Ok(()) } } @@ -840,7 +1250,7 @@ fn enqueue_transfer(hid_idx: usize, trb: Trb) { status: 0, control: (trb_type::LINK << 10) | if cycle { 1 } else { 0 } - | (1 << 5), // TC bit + | (1 << 1), // TC (Toggle Cycle) bit β€” xHCI spec bit 1, not bit 5 }; core::ptr::write_volatile( &mut TRANSFER_RINGS[hid_idx][TRANSFER_RING_SIZE - 1] as *mut Trb, @@ -859,6 +1269,53 @@ fn enqueue_transfer(hid_idx: usize, trb: Trb) { // Control Transfers (Setup -> Data -> Status) // ============================================================================= +/// Reset EP0 (DCI=1) after a STALL or USB Transaction Error. +/// +/// Per xHCI spec section 4.6.8 and 4.10.2.2, any error on a control endpoint +/// halts it. Software must issue Reset Endpoint + Set TR Dequeue Pointer to +/// recover before subsequent control transfers can proceed. +fn reset_control_endpoint(state: &XhciState, slot_id: u8) { + let slot_idx = (slot_id - 1) as usize; + + // Step 1: Reset Endpoint Command for DCI=1 (EP0) + let reset_trb = Trb { + param: 0, + status: 0, + control: (trb_type::RESET_ENDPOINT << 10) + | ((slot_id as u32) << 24) + | (1u32 << 16), + }; + enqueue_command(reset_trb); + ring_doorbell(state, 0, 0); + let _ = wait_for_command(state); + + // Step 2: Reset EP0 transfer ring + unsafe { + let ring = &raw mut TRANSFER_RINGS[slot_idx]; + core::ptr::write_bytes(ring as *mut u8, 0, TRANSFER_RING_SIZE * 16); + dma_cache_clean( + &TRANSFER_RINGS[slot_idx] as *const [Trb; TRANSFER_RING_SIZE] as *const u8, + TRANSFER_RING_SIZE * 16, + ); + TRANSFER_ENQUEUE[slot_idx] = 0; + TRANSFER_CYCLE[slot_idx] = true; + } + + // Step 3: Set TR Dequeue Pointer to ring start with DCS=1 + let ring_phys = virt_to_phys(unsafe { &raw const TRANSFER_RINGS[slot_idx] } as u64); + let set_deq_trb = Trb { + param: ring_phys | 1, + status: 0, + control: (trb_type::SET_TR_DEQUEUE_POINTER << 10) + | ((slot_id as u32) << 24) + | (1u32 << 16), + }; + enqueue_command(set_deq_trb); + ring_doorbell(state, 0, 0); + let _ = wait_for_command(state); + +} + /// Execute a control transfer on a device's default control endpoint (EP0). /// /// Sends a Setup stage TRB, optional Data stage TRB, and Status stage TRB @@ -945,21 +1402,15 @@ fn control_transfer( // This is our EP0 completion let cc = event.completion_code(); if cc != completion_code::SUCCESS && cc != completion_code::SHORT_PACKET { - crate::serial_println!( - "[xhci] Control transfer failed: slot={} cc={}", - slot_id, - cc - ); + // Any error on EP0 halts the endpoint (xHCI spec 4.10.2.2). + // Reset it so subsequent control transfers on this slot work. + reset_control_endpoint(state, slot_id); return Err("XHCI control transfer failed"); } return Ok(()); } // Not our EP0 event β€” stale interrupt endpoint event, skip it - crate::serial_println!( - "[xhci] Skipping stale xfer event: slot={} ep={} cc={}", - ev_slot, ev_ep, event.completion_code(), - ); continue; } @@ -994,10 +1445,6 @@ fn get_device_descriptor_short( control_transfer(state, slot_id, &setup, data_phys, 8, true)?; dma_cache_invalidate((*data_buf).0.as_ptr(), 8); - crate::serial_println!( - "[xhci] Device descriptor (8B): maxpkt0={}", - (*data_buf).0[7], - ); } Ok(()) @@ -1029,21 +1476,6 @@ fn get_device_descriptor( buf.copy_from_slice(&(&(*data_buf).0)[..18]); } - let desc = unsafe { &*(buf.as_ptr() as *const DeviceDescriptor) }; - let bcd_usb = desc.bcd_usb; - let id_vendor = desc.id_vendor; - let id_product = desc.id_product; - crate::serial_println!( - "[xhci] Device descriptor: USB{}.{} class={:#04x} subclass={:#04x} protocol={:#04x} vendor={:#06x} product={:#06x} maxpkt0={}", - bcd_usb >> 8, - (bcd_usb >> 4) & 0xF, - desc.b_device_class, - desc.b_device_sub_class, - desc.b_device_protocol, - id_vendor, - id_product, - desc.b_max_packet_size0, - ); Ok(()) } @@ -1067,10 +1499,56 @@ fn set_isoch_delay( }; control_transfer(state, slot_id, &setup, 0, 0, false)?; - crate::serial_println!("[xhci] SET_ISOCH_DELAY(40ns) sent to slot {}", slot_id); Ok(()) } +/// Read string descriptors from the device, matching Linux's enumeration. +/// +/// Linux reads string descriptors #0 (language IDs), #2 (Product), #1 (Manufacturer), +/// and #3 (Serial Number) during enumeration BEFORE ConfigureEndpoint. The Parallels +/// virtual xHC may require this full enumeration sequence before interrupt endpoints +/// are armed. The string index values come from the device descriptor fields +/// iManufacturer, iProduct, iSerialNumber. +fn read_string_descriptors( + state: &XhciState, + slot_id: u8, + i_manufacturer: u8, + i_product: u8, + i_serial: u8, +) { + // Read string descriptor #0 (supported languages) first + let indices = [0u8, i_product, i_manufacturer, i_serial]; + for &idx in &indices { + if idx == 0 && indices[0] != 0 { + // Only skip if not the language ID descriptor itself + continue; + } + // For string index 0, use wIndex=0. For others, use 0x0409 (English US) + let lang_id: u16 = if idx == 0 { 0 } else { 0x0409 }; + let setup = SetupPacket { + bm_request_type: 0x80, + b_request: request::GET_DESCRIPTOR, + w_value: ((descriptor_type::STRING as u16) << 8) | (idx as u16), + w_index: lang_id, + w_length: 255, + }; + + unsafe { + let data_buf = &raw mut CTRL_DATA_BUF; + core::ptr::write_bytes((*data_buf).0.as_mut_ptr(), 0, 255); + dma_cache_clean((*data_buf).0.as_ptr(), 255); + let data_phys = virt_to_phys(&raw const CTRL_DATA_BUF as u64); + match control_transfer(state, slot_id, &setup, data_phys, 255, true) { + Ok(()) => { + dma_cache_invalidate((*data_buf).0.as_ptr(), 4); + } + Err(_) => { + } + } + } + } +} + /// Read the BOS (Binary Object Store) descriptor from a USB 3.0 device. /// /// Linux reads this after the full device descriptor and before the config descriptor. @@ -1099,12 +1577,7 @@ fn get_bos_descriptor( dma_cache_invalidate((*data_buf).0.as_ptr(), 5); let total_len = u16::from_le_bytes([(*data_buf).0[2], (*data_buf).0[3]]) as usize; - let num_caps = (*data_buf).0[4]; - crate::serial_println!( - "[xhci] BOS descriptor: total_length={} num_device_caps={}", - total_len, num_caps, - ); // Second read: full BOS descriptor if total_len > 5 && total_len <= 64 { @@ -1122,10 +1595,6 @@ fn get_bos_descriptor( control_transfer(state, slot_id, &setup_full, data_phys, total_len as u16, true)?; dma_cache_invalidate((*data_buf).0.as_ptr(), total_len); - crate::serial_println!( - "[xhci] BOS descriptor read complete ({} bytes)", - total_len, - ); } } @@ -1160,15 +1629,8 @@ fn get_config_descriptor( let config_desc = &*((*data_buf).0.as_ptr() as *const ConfigDescriptor); let total_len = config_desc.w_total_length as usize; - crate::serial_println!( - "[xhci] Config descriptor: total_length={} num_interfaces={} config_value={}", - total_len, - config_desc.b_num_interfaces, - config_desc.b_configuration_value, - ); if total_len > 256 { - crate::serial_println!("[xhci] Config descriptor too large ({} bytes), truncating", total_len); } let fetch_len = total_len.min(256) as u16; @@ -1209,7 +1671,7 @@ fn set_configuration( }; control_transfer(state, slot_id, &setup, 0, 0, false)?; - crate::serial_println!("[xhci] Set configuration {} on slot {}", config_value, slot_id); + xhci_trace_note(slot_id, "set_configuration"); Ok(()) } @@ -1218,7 +1680,7 @@ fn set_configuration( /// Linux's USB core sends SET_INTERFACE(alt=0) for each interface during driver /// probe. Parallels' virtual USB device model may require this to activate the /// interface's interrupt endpoints. -#[allow(dead_code)] // Standard USB protocol function, available for future device init +#[allow(dead_code)] fn set_interface( state: &XhciState, slot_id: u8, @@ -1234,10 +1696,6 @@ fn set_interface( }; control_transfer(state, slot_id, &setup, 0, 0, false)?; - crate::serial_println!( - "[xhci] SET_INTERFACE(alt={}) on slot {} iface {}", - alt_setting, slot_id, interface, - ); Ok(()) } @@ -1291,6 +1749,60 @@ fn set_report_leds( Ok(()) } + +/// Send GET_REPORT(Feature) then SET_REPORT(Feature) for a mouse HID interface. +/// +/// Linux's usbhid driver does this for mouse interfaces during enumeration: +/// GET_REPORT(Feature, feature_id, 64B) β†’ read current state +/// SET_REPORT(Feature, feature_id, 2B) β†’ echo first 2 bytes back +/// +/// From Linux ftrace: mouse if0 uses feature_id=0x11, mouse if1 uses 0x12. +fn get_set_feature_report( + state: &XhciState, + slot_id: u8, + interface: u8, + feature_id: u8, +) -> Result<(), &'static str> { + let w_value = 0x0300u16 | (feature_id as u16); + let data_phys = virt_to_phys((&raw const CTRL_DATA_BUF) as u64); + + // Step 1: GET_REPORT(Feature, feature_id, 64 bytes) β€” read current report state + let get_setup = SetupPacket { + bm_request_type: 0xa1, // D2H, Class, Interface + b_request: hid_request::GET_REPORT, + w_value, + w_index: interface as u16, + w_length: 64, + }; + + unsafe { + let data_buf = &raw mut CTRL_DATA_BUF; + core::ptr::write_bytes((*data_buf).0.as_mut_ptr(), 0, 64); + dma_cache_clean((*data_buf).0.as_ptr(), 64); + } + + control_transfer(state, slot_id, &get_setup, data_phys, 64, true)?; + + // Step 2: SET_REPORT(Feature, feature_id, 2 bytes) β€” echo first 2 bytes back + unsafe { + let data_buf = &raw mut CTRL_DATA_BUF; + dma_cache_invalidate((*data_buf).0.as_ptr(), 64); + // First 2 bytes already contain the device's response; re-clean for DMA + dma_cache_clean((*data_buf).0.as_ptr(), 2); + } + + let set_setup = SetupPacket { + bm_request_type: 0x21, // H2D, Class, Interface + b_request: hid_request::SET_REPORT, + w_value, + w_index: interface as u16, + w_length: 2, + }; + + control_transfer(state, slot_id, &set_setup, data_phys, 2, false)?; + Ok(()) +} + /// Fetch and log the HID Report Descriptor for diagnostic purposes. /// /// The Report Descriptor reveals the actual report format: whether Report IDs @@ -1315,52 +1827,10 @@ fn fetch_hid_report_descriptor(state: &XhciState, slot_id: u8, interface: u8, ex let data_phys = virt_to_phys(&raw const CTRL_DATA_BUF as u64); - match control_transfer(state, slot_id, &setup, data_phys, req_len, true) { - Ok(()) => { - dma_cache_invalidate((*data_buf).0.as_ptr(), req_len as usize); - let buf = &(*data_buf).0; - - // Find actual length (trim trailing zeros) - let mut len = req_len as usize; - while len > 0 && buf[len - 1] == 0 { - len -= 1; - } - - crate::serial_println!( - "[xhci] HID Report Descriptor (iface {}, {} bytes):", - interface, len - ); - - // Print in hex, 16 bytes per line - let mut i = 0; - while i < len { - let end = if i + 16 < len { i + 16 } else { len }; - let mut hex_buf = [0u8; 48]; // 16 * 3 = 48 - let mut pos = 0; - for j in i..end { - let hi = buf[j] >> 4; - let lo = buf[j] & 0x0F; - hex_buf[pos] = if hi < 10 { b'0' + hi } else { b'a' + hi - 10 }; - pos += 1; - hex_buf[pos] = if lo < 10 { b'0' + lo } else { b'a' + lo - 10 }; - pos += 1; - hex_buf[pos] = b' '; - pos += 1; - } - // Convert to str for serial_println - if let Ok(s) = core::str::from_utf8(&hex_buf[..pos]) { - crate::serial_println!(" {}", s); - } - i += 16; - } - } - Err(e) => { - crate::serial_println!( - "[xhci] Failed to get HID Report Descriptor (iface {}): {}", - interface, e - ); - } - } + // The control transfer itself is important (matches Linux enumeration + // sequence). Report descriptor data is captured by the trace system + // if tracing is active. + let _ = control_transfer(state, slot_id, &setup, data_phys, req_len, true); } } @@ -1376,6 +1846,7 @@ struct PendingEp { b_interval: u8, ss_max_burst: u8, ss_bytes_per_interval: u16, + ss_mult: u8, } /// Configure all HID interrupt endpoints in a single ConfigureEndpoint command. @@ -1386,6 +1857,12 @@ struct PendingEp { /// ConfigureEndpoint adding DCI 5 silently fails to activate the endpoint /// even though CC=SUCCESS is returned. Batching all endpoints matches Linux /// and works around this emulation limitation. +/// +/// After the initial batch ConfigureEndpoint, performs a "bandwidth dance" +/// (StopEndpoint + re-ConfigureEndpoint per endpoint) matching Linux's +/// xhci_check_bandwidth() behavior. The re-ConfigureEndpoint uses a SEPARATE +/// Input Context buffer (RECONFIG_INPUT_CTX) with ALL endpoint Add flags set, +/// matching Linux's observed behavior where the full Input Context is reused. fn configure_endpoints_batch( state: &XhciState, slot_id: u8, @@ -1418,51 +1895,36 @@ fn configure_endpoints_batch( } core::ptr::write_volatile(input_base.add(0x04) as *mut u32, add_flags); - crate::serial_println!( - "[xhci] ConfigureEndpoint(batch): slot={} add_flags={:#010x} max_dci={}", - slot_id, add_flags, max_dci, - ); - // Slot Context: copy ALL 32 bytes from device output context - // (matches Linux xhci_slot_copy which copies DW0-DW3 + reserved[0..3]). - // The Parallels virtual xHC may use reserved Slot Context fields internally. + // Slot Context: copy DW0-DW2 from device output context, zero DW3. + // Linux's xhci_slot_copy() copies DW0 (dev_info), DW1 (dev_info2), + // DW2 (tt_info), but explicitly zeroes DW3 (dev_state = 0). + // DW3 contains USB Device Address and Slot State which the xHCI spec + // says "should" be 0 in the Input Context for ConfigureEndpoint. + // DW4-DW7 (reserved) are also zeroed. let slot_ctx = input_base.add(ctx_size); let dev_ctx = &raw const DEVICE_CONTEXTS[slot_idx]; dma_cache_invalidate((*dev_ctx).0.as_ptr(), 4096); - for dw_offset in (0..32).step_by(4) { + // Copy DW0, DW1, DW2 from output context + for dw_offset in (0..12).step_by(4) { let val = core::ptr::read_volatile( (*dev_ctx).0.as_ptr().add(dw_offset) as *const u32, ); core::ptr::write_volatile(slot_ctx.add(dw_offset) as *mut u32, val); } + // DW3 = 0 (zero Address and Slot State, matching Linux) + core::ptr::write_volatile(slot_ctx.add(12) as *mut u32, 0u32); + // DW4-DW7 = 0 (reserved) + for dw_offset in (16..32).step_by(4) { + core::ptr::write_volatile(slot_ctx.add(dw_offset) as *mut u32, 0u32); + } + // Update CtxEntries in DW0 let current_slot_dw0 = core::ptr::read_volatile(slot_ctx as *const u32); let current_entries = (current_slot_dw0 >> 27) & 0x1F; let new_entries = current_entries.max(max_dci); let new_slot_dw0 = (current_slot_dw0 & !(0x1F << 27)) | (new_entries << 27); core::ptr::write_volatile(slot_ctx as *mut u32, new_slot_dw0); - // Diagnostic: dump Slot Context DW4-DW7 (reserved fields) from device output - { - let dw4 = core::ptr::read_volatile( - (*dev_ctx).0.as_ptr().add(16) as *const u32, - ); - let dw5 = core::ptr::read_volatile( - (*dev_ctx).0.as_ptr().add(20) as *const u32, - ); - let dw6 = core::ptr::read_volatile( - (*dev_ctx).0.as_ptr().add(24) as *const u32, - ); - let dw7 = core::ptr::read_volatile( - (*dev_ctx).0.as_ptr().add(28) as *const u32, - ); - if dw4 != 0 || dw5 != 0 || dw6 != 0 || dw7 != 0 { - crate::serial_println!( - "[xhci] Slot {} reserved DW4-7: {:#010x} {:#010x} {:#010x} {:#010x}", - slot_id, dw4, dw5, dw6, dw7, - ); - } - } - // Fill in each endpoint context for i in 0..ep_count { if let Some(ref ep) = endpoints[i] { @@ -1497,14 +1959,14 @@ fn configure_endpoints_batch( max_pkt * (max_burst + 1) }; let esit_hi = (esit_payload >> 16) & 0xFF; - // Mult=0 (bits 9:8) for non-isochronous endpoints per xHCI spec Β§6.2.3. - // Linux INPUT context confirmed Mult=0 via ftrace xhci_add_endpoint. - // (The OUTPUT context may show Mult=1 after xHC processing, but - // the INPUT must be 0.) - let ep_dw0: u32 = (esit_hi << 24) | (interval << 16); + // Mult (bits 9:8): parsed from SS EP Companion bmAttributes[1:0]. + // Linux ftrace shows mult=1 (DW0=0x00030100) for Parallels virtual keyboard. + let mult: u32 = ep.ss_mult as u32; + let ep_dw0: u32 = (esit_hi << 24) | (interval << 16) | (mult << 8); core::ptr::write_volatile(ep_ctx as *mut u32, ep_dw0); // EP DW1: CErr=3, EP Type = Interrupt IN (7) + // Bulk IN (6) was tested and also produces CC=12 β€” not type-specific. let ep_type: u32 = 7; let cerr: u32 = 3; let ep_dw1: u32 = (max_pkt << 16) | (max_burst << 8) | (ep_type << 3) | (cerr << 1); @@ -1516,6 +1978,39 @@ fn configure_endpoints_batch( TRANSFER_ENQUEUE[ring_idx] = 0; TRANSFER_CYCLE[ring_idx] = true; + // Initialize Link TRB at the end of the ring (matching Linux). + // Linux's xhci_set_link_trb() places a Link TRB at the last entry + // of each ring segment during ring allocation, BEFORE ConfigureEndpoint. + // The Parallels vxHC may validate ring structure on ConfigureEndpoint. + let ring_phys_for_link = virt_to_phys(&raw const TRANSFER_RINGS[ring_idx] as u64); + let link_trb = Trb { + param: ring_phys_for_link, + status: 0, + // Link TRB type=6, TC (Toggle Cycle) bit 1, cycle=1 (matches DCS) + control: (trb_type::LINK << 10) | (1 << 1) | 1, + }; + core::ptr::write_volatile( + &mut (*ring)[TRANSFER_RING_SIZE - 1] as *mut Trb, + link_trb, + ); + + // Cache-clean the entire transfer ring including Link TRB. + dma_cache_clean( + &TRANSFER_RINGS[ring_idx] as *const [Trb; TRANSFER_RING_SIZE] as *const u8, + TRANSFER_RING_SIZE * 16, + ); + + // Do NOT pre-populate ring[0] before ConfigureEndpoint. + // Linux never queues TRBs before ConfigureEndpoint completes and the + // bandwidth dance finishes. Doing so causes Parallels vxHC to auto-scan + // the ring on ConfigEP completion, return CC=12 (endpoint not yet truly + // enabled), and transition the endpoint to Halted. The subsequent BW dance + // then issues StopEP on a Halted endpoint (spec violation), and re-ConfigEP + // causes another auto-scan β†’ CC=12 β†’ Halted again. TRBs are queued by + // start_hid_polling() after the complete init sequence. + // ring[0] remains zeroed (cycle=0), so the hardware will not process it + // until a real TRB with cycle=1 is placed there and a doorbell is rung. + let ring_phys = virt_to_phys(&raw const TRANSFER_RINGS[ring_idx] as u64); // EP DW2-DW3: TR Dequeue Pointer with DCS = 1 @@ -1534,213 +2029,194 @@ fn configure_endpoints_batch( let ep_dw4: u32 = (esit_lo << 16) | avg_trb_len; core::ptr::write_volatile(ep_ctx.add(0x10) as *mut u32, ep_dw4); - crate::serial_println!( - "[xhci] EP DCI={}: type=Intr_IN maxpkt={} interval={} ring={:#x}", - ep.dci, max_pkt, interval, ring_phys, - ); } } // Cache-clean the entire input context dma_cache_clean(input_base, 4096); - // Issue ONE ConfigureEndpoint command for all endpoints + // Issue batch ConfigureEndpoint using INPUT_CONTEXTS directly. let input_ctx_phys = virt_to_phys(&raw const INPUT_CONTEXTS[slot_idx] as u64); - let trb = Trb { - param: input_ctx_phys, - status: 0, - control: (trb_type::CONFIGURE_ENDPOINT << 10) | ((slot_id as u32) << 24), - }; - enqueue_command(trb); - ring_doorbell(state, 0, 0); + { + let trb = Trb { + param: input_ctx_phys, + status: 0, + control: (trb_type::CONFIGURE_ENDPOINT << 10) | ((slot_id as u32) << 24), + }; + enqueue_command(trb); + ring_doorbell(state, 0, 0); - let event = wait_for_command(state)?; - let cc = event.completion_code(); - if cc != completion_code::SUCCESS { - crate::serial_println!( - "[xhci] ConfigureEndpoint(batch) failed: slot={} cc={}", - slot_id, cc, - ); - return Err("XHCI ConfigureEndpoint failed"); - } - - // Diagnostic: endpoint state after initial ConfigureEndpoint - { - let dev_ctx_diag = &raw const DEVICE_CONTEXTS[slot_idx]; - dma_cache_invalidate((*dev_ctx_diag).0.as_ptr(), 4096); - for i in 0..ep_count { - if let Some(ref ep) = endpoints[i] { - let ep_out = (*dev_ctx_diag).0.as_ptr().add((ep.dci as usize) * ctx_size); - let ep_out_dw0 = core::ptr::read_volatile(ep_out as *const u32); - crate::serial_println!( - "[xhci] After initial ConfigEP: DCI={} state={} DW0={:#010x}", - ep.dci, ep_out_dw0 & 0x7, ep_out_dw0, - ); - } + let event = wait_for_command(state)?; + let cc = event.completion_code(); + if cc != completion_code::SUCCESS { + return Err("XHCI ConfigureEndpoint failed"); } } - // ===================================================================== - // Data toggle reset: Stop Ring + Drop+Add ConfigureEndpoint per EP - // ===================================================================== - // Linux's xhci_endpoint_reset() is called after the initial - // ConfigureEndpoint (via usb_hcd_reset_endpoint during usb_set_interface). - // For each endpoint it: - // 1. Stops the endpoint - // 2. Issues ConfigureEndpoint with BOTH Drop AND Add flags set - // for that specific endpoint, which resets the data toggle / - // sequence number (xHCI spec Β§4.6.6). + // Bandwidth dance: StopEndpoint + re-ConfigureEndpoint per endpoint. // - // Previously Breenix used Add-only (no Drop), which does NOT reset - // the toggle. The Parallels virtual xHC may require this toggle - // reset for interrupt endpoints to function. - for i in 0..ep_count { - if let Some(ref ep) = endpoints[i] { - // Stop Ring for this endpoint - let stop_trb = Trb { - param: 0, - status: 0, - control: (trb_type::STOP_ENDPOINT << 10) - | ((slot_id as u32) << 24) - | ((ep.dci as u32) << 16), - }; - enqueue_command(stop_trb); - ring_doorbell(state, 0, 0); - - let stop_event = wait_for_command(state)?; - let stop_cc = stop_event.completion_code(); - - // Diagnostic: endpoint state after Stop Ring - { - let dev_ctx_diag = &raw const DEVICE_CONTEXTS[slot_idx]; - dma_cache_invalidate((*dev_ctx_diag).0.as_ptr(), 4096); - let ep_out = (*dev_ctx_diag).0.as_ptr().add((ep.dci as usize) * ctx_size); - let ep_out_dw0 = core::ptr::read_volatile(ep_out as *const u32); - crate::serial_println!( - "[xhci] Stop Endpoint DCI={}: cc={} β†’ state={} DW0={:#010x}", - ep.dci, stop_cc, ep_out_dw0 & 0x7, ep_out_dw0, - ); - } - - // Rebuild input context for Drop+Add of this specific endpoint - // (matches Linux xhci_endpoint_reset + xhci_setup_input_ctx_for_config_ep) - core::ptr::write_bytes(input_base, 0, 4096); + // Linux's xhci_check_bandwidth() issues the batch ConfigureEndpoint + // above, then for each endpoint does: StopEndpoint, followed by a + // re-ConfigureEndpoint. This is required by the Parallels virtual xHC β€” + // the initial batch ConfigureEndpoint shows endpoints in Running state + // (output context), but the xHC returns CC=12 (Endpoint Not Enabled) + // on interrupt transfers unless the bandwidth dance is performed. + // + // CRITICAL: Linux uses a DIFFERENT Input Context physical address for + // re-ConfigureEndpoint commands. The Parallels vxHC appears to cache or + // ignore re-ConfigureEndpoint commands that use the same Input Context + // address as the initial ConfigureEndpoint. We use the separate + // RECONFIG_INPUT_CTX buffer to ensure a distinct address. + // + // The re-ConfigureEndpoint uses ALL-EP add_flags (same as initial) and + // the same endpoint contexts. Only the Slot Context is refreshed from + // the Output Context. + if !SKIP_BW_DANCE { + // BW dance: per-endpoint StopEndpoint + re-ConfigureEndpoint. + // + // Linux ftrace showed both BW dance re-ConfigEP commands use the SAME + // physical address (different from the initial ConfigEP address). This + // means Linux builds the re-ConfigEP input context ONCE with ALL endpoints + // and reuses it unchanged β€” it does NOT build a per-endpoint context. + // + // Key insight: Linux uses Drop=0, Add=A0+all_DCIs for the BW dance context, + // identical to the initial ConfigEP add_flags. The only reason to rebuild + // per-iteration is to refresh the target EP's dequeue pointer from the + // output context after StopEndpoint. + // + // Previous attempt (Drop=A(dci), Add=A0+A(dci)) was incorrect β€” the + // ftrace never captured `xhci_configure_endpoint_ctrl_ctx` for the BW + // dance commands, so those per-EP Drop flags were never confirmed. + let reconfig = &raw mut RECONFIG_INPUT_CTX; + let reconfig_base = (*reconfig).0.as_mut_ptr(); + + let reconfig_phys = virt_to_phys(&raw const RECONFIG_INPUT_CTX as u64); - // Drop flags (offset 0x00): drop this endpoint - core::ptr::write_volatile(input_base as *mut u32, 1u32 << ep.dci); - // Add flags (offset 0x04): Slot Context + this endpoint - core::ptr::write_volatile( - input_base.add(0x04) as *mut u32, - (1u32 << 0) | (1u32 << ep.dci), - ); - // Copy Slot Context from device output context - // (matches Linux xhci_slot_copy) - let slot_ctx_reset = input_base.add(ctx_size); - let dev_ctx_for_reset = &raw const DEVICE_CONTEXTS[slot_idx]; - dma_cache_invalidate((*dev_ctx_for_reset).0.as_ptr(), 4096); - for dw_offset in (0..32).step_by(4) { - let val = core::ptr::read_volatile( - (*dev_ctx_for_reset).0.as_ptr().add(dw_offset) as *const u32, - ); - core::ptr::write_volatile( - slot_ctx_reset.add(dw_offset) as *mut u32, - val, + for i in 0..ep_count { + if let Some(ref ep) = endpoints[i] { + let dci = ep.dci; + + // Step 1: Stop Endpoint + let stop_trb = Trb { + param: 0, + status: 0, + control: (trb_type::STOP_ENDPOINT << 10) + | ((slot_id as u32) << 24) + | ((dci as u32) << 16), + }; + enqueue_command(stop_trb); + ring_doorbell(state, 0, 0); + let stop_event = wait_for_command(state)?; + let _stop_cc = stop_event.completion_code(); + // Read output context EP state after StopEP (should be 3=Stopped) + dma_cache_invalidate((*dev_ctx).0.as_ptr(), 4096); + let _stop_ep_state = core::ptr::read_volatile( + (*dev_ctx).0.as_ptr().add((dci as usize) * ctx_size) as *const u32 + ) & 0x7; + let _stop_deq_lo = core::ptr::read_volatile( + (*dev_ctx).0.as_ptr().add((dci as usize) * ctx_size + 8) as *const u32 ); - } - // Copy endpoint context from device output context - // (matches Linux xhci_endpoint_copy) - let ep_ctx_reset = input_base.add((1 + ep.dci as usize) * ctx_size); - let ep_out_src = (*dev_ctx_for_reset) - .0.as_ptr().add((ep.dci as usize) * ctx_size); - for dw_offset in (0..32).step_by(4) { - let val = core::ptr::read_volatile( - ep_out_src.add(dw_offset) as *const u32, - ); + // Step 2: Re-ConfigureEndpoint. + // + // xHCI spec Β§4.6.6: if Add Context flag A[i]=1 and endpoint i is + // Running or Halted, behavior is UNDEFINED. Linux avoids this by + // using per-endpoint Add flags (A0 | A[target_dci] only) via + // xhci_alloc_command_with_ctx() + xhci_setup_input_ctx_for_config_ep(). + // + // Including A[other_ep]=1 for a Running endpoint (our previous approach) + // is a spec violation that Parallels' virtual xHC may handle by silently + // corrupting endpoint state β€” causing CC=12 on the first TRB. + + // Zero RECONFIG_INPUT_CTX. + core::ptr::write_bytes(reconfig_base as *mut u8, 0, 4096); + + // ICC: Drop=0, Add=A0 | A[dci] β€” per-endpoint only (matches Linux). + let per_ep_add_flags: u32 = 1u32 | (1u32 << (dci as u32)); + core::ptr::write_volatile(reconfig_base as *mut u32, 0u32); + core::ptr::write_volatile(reconfig_base.add(4) as *mut u32, per_ep_add_flags); + + // Slot context (at ctx_size offset): copy DW0-DW2 from output ctx, + // zero DW3. Matches Linux's xhci_slot_copy() which explicitly zeroes + // DW3 (dev_state = USB Device Address + Slot State). + let rc_slot = reconfig_base.add(ctx_size); + for dw_offset in (0..12usize).step_by(4) { + let val = core::ptr::read_volatile( + (*dev_ctx).0.as_ptr().add(dw_offset) as *const u32, + ); + core::ptr::write_volatile(rc_slot.add(dw_offset) as *mut u32, val); + } + core::ptr::write_volatile(rc_slot.add(12) as *mut u32, 0u32); + // Update ctx_entries in Slot DW0 to dci (target EP only). + let rc_slot_dw0 = core::ptr::read_volatile(rc_slot as *const u32); core::ptr::write_volatile( - ep_ctx_reset.add(dw_offset) as *mut u32, - val, + rc_slot as *mut u32, + (rc_slot_dw0 & !(0x1F << 27)) | ((dci as u32) << 27), ); - } - - // Overwrite TR Dequeue Pointer with ring start + DCS=1 - // (matches Linux: ep_ctx->deq = ring_dma | cycle_state) - let ring_idx = HID_RING_BASE + ep.hid_idx; - let ring_phys = virt_to_phys( - &raw const TRANSFER_RINGS[ring_idx] as u64, - ); - core::ptr::write_volatile( - ep_ctx_reset.add(0x08) as *mut u32, - (ring_phys as u32) | 1, - ); - core::ptr::write_volatile( - ep_ctx_reset.add(0x0C) as *mut u32, - (ring_phys >> 32) as u32, - ); - - crate::serial_println!( - "[xhci] Drop+Add Reset DCI={}: drop={:#x} add={:#x} ring={:#x}", - ep.dci, 1u32 << ep.dci, - (1u32 << 0) | (1u32 << ep.dci), ring_phys, - ); - dma_cache_clean(input_base, 4096); - - // Issue ConfigureEndpoint with Drop+Add flags - let reconf_trb = Trb { - param: input_ctx_phys, - status: 0, - control: (trb_type::CONFIGURE_ENDPOINT << 10) - | ((slot_id as u32) << 24), - }; - enqueue_command(reconf_trb); - ring_doorbell(state, 0, 0); - - let reconf_event = wait_for_command(state)?; - let reconf_cc = reconf_event.completion_code(); + // ONLY the target endpoint's context: copy from output context. + // Zero EP State bits (2:0) of DW0 β€” RsvdZ in Input Context per spec. + { + let rc_ep = reconfig_base.add((1 + dci as usize) * ctx_size); + let src_ep = (*dev_ctx).0.as_ptr().add(dci as usize * ctx_size); + for dw_offset in (0..20usize).step_by(4) { + let val = core::ptr::read_volatile( + src_ep.add(dw_offset) as *const u32, + ); + let val_clean = if dw_offset == 0 { val & !0x7u32 } else { val }; + core::ptr::write_volatile( + rc_ep.add(dw_offset) as *mut u32, + val_clean, + ); + } + } - // Diagnostic: endpoint state after Drop+Add reset - { - let dev_ctx_diag = &raw const DEVICE_CONTEXTS[slot_idx]; - dma_cache_invalidate((*dev_ctx_diag).0.as_ptr(), 4096); - let ep_out = (*dev_ctx_diag).0.as_ptr().add((ep.dci as usize) * ctx_size); - let ep_out_dw0 = core::ptr::read_volatile(ep_out as *const u32); - crate::serial_println!( - "[xhci] Drop+Add Reset DCI={}: cc={} β†’ state={} DW0={:#010x}", - ep.dci, reconf_cc, ep_out_dw0 & 0x7, ep_out_dw0, + dma_cache_clean(reconfig_base, 4096); + + let reconfig_trb = Trb { + param: reconfig_phys, + status: 0, + control: (trb_type::CONFIGURE_ENDPOINT << 10) + | ((slot_id as u32) << 24) + | 1u32, + }; + enqueue_command(reconfig_trb); + ring_doorbell(state, 0, 0); + let reconfig_event = wait_for_command(state)?; + let _reconfig_cc = reconfig_event.completion_code(); + + // Diagnostic: verify TR Dequeue pointer in output context after re-ConfigEP. + dma_cache_invalidate((*dev_ctx).0.as_ptr(), 4096); + let ep_out_base = (*dev_ctx).0.as_ptr().add((dci as usize) * ctx_size); + let _post_dw0 = core::ptr::read_volatile(ep_out_base as *const u32); + let _post_dw2 = core::ptr::read_volatile(ep_out_base.add(8) as *const u32); + let _post_dw3 = core::ptr::read_volatile(ep_out_base.add(12) as *const u32); + let _ring_phys_check = virt_to_phys( + &raw const TRANSFER_RINGS[HID_RING_BASE + ep.hid_idx] as u64 ); } } } - // Verify: read back device context + // Verify: read back device context after ConfigureEndpoint dma_cache_invalidate((*dev_ctx).0.as_ptr(), 4096); - let slot_out_dw0 = core::ptr::read_volatile((*dev_ctx).0.as_ptr() as *const u32); - let ctx_entries = (slot_out_dw0 >> 27) & 0x1F; - let slot_out_dw3 = core::ptr::read_volatile((*dev_ctx).0.as_ptr().add(12) as *const u32); - let slot_st = (slot_out_dw3 >> 27) & 0x1F; - crate::serial_println!( - "[xhci] Slot {} after batch ConfigureEndpoint: ctx_entries={} slot_state={}", - slot_id, ctx_entries, slot_st, - ); + let _slot_out_dw0 = core::ptr::read_volatile((*dev_ctx).0.as_ptr() as *const u32); + let _slot_out_dw3 = core::ptr::read_volatile((*dev_ctx).0.as_ptr().add(12) as *const u32); for i in 0..ep_count { if let Some(ref ep) = endpoints[i] { let ep_out = (*dev_ctx).0.as_ptr().add((ep.dci as usize) * ctx_size); let ep_out_dw0 = core::ptr::read_volatile(ep_out as *const u32); let ep_state = ep_out_dw0 & 0x7; - let ep_out_dw1 = core::ptr::read_volatile(ep_out.add(4) as *const u32); - crate::serial_println!( - "[xhci] DCI={}: state={} type={} DW0={:#010x}", - ep.dci, ep_state, (ep_out_dw1 >> 3) & 0x7, ep_out_dw0, + let _ep_out_dw1 = core::ptr::read_volatile(ep_out.add(4) as *const u32); + let _ep_out_dw2 = core::ptr::read_volatile(ep_out.add(8) as *const u32); + let _ep_out_dw3 = core::ptr::read_volatile(ep_out.add(12) as *const u32); + let _ring_phys_chk = virt_to_phys( + &raw const TRANSFER_RINGS[HID_RING_BASE + ep.hid_idx] as u64 ); if ep_state == 0 { - crate::serial_println!( - "[xhci] WARNING: DCI {} still Disabled!", - ep.dci, - ); } } } @@ -1784,6 +2260,7 @@ fn configure_hid( interface_number: u8, is_keyboard: bool, is_nkro: bool, // Non-boot HID interface (subclass=0, Report ID protocol) + hid_idx: usize, // Transfer ring index (0=kbd boot, 1=mouse, 2=kbd NKRO, 3=mouse2) dci: u8, hid_report_len: u16, // wDescriptorLength from HID descriptor (0 = unknown) } @@ -1791,6 +2268,7 @@ fn configure_hid( let mut iface_count: usize = 0; let mut found_boot_keyboard = false; let mut found_mouse = false; + let mut found_mouse2 = false; // Pending endpoints for batch ConfigureEndpoint (one command for all EPs) let mut pending_eps: [Option; 4] = [None, None, None, None]; @@ -1818,15 +2296,6 @@ fn configure_hid( }; if iface.b_interface_class == class_code::HID { - let is_boot = iface.b_interface_sub_class == hid_subclass::BOOT; - crate::serial_println!( - "[xhci] Found HID interface: number={} subclass={} protocol={} endpoints={}{}", - iface.b_interface_number, - iface.b_interface_sub_class, - iface.b_interface_protocol, - iface.b_num_endpoints, - if is_boot { " (boot)" } else { " (report)" }, - ); // Parse HID descriptor (type 0x21) for wDescriptorLength. // The HID descriptor immediately follows the interface descriptor. @@ -1846,10 +2315,6 @@ fn configure_hid( config_buf[hid_off + 7], config_buf[hid_off + 8], ]); - crate::serial_println!( - "[xhci] HID descriptor: reportDescLen={}", - hid_report_len, - ); break; } hid_off += hd_len; @@ -1884,39 +2349,46 @@ fn configure_hid( // immediately following this endpoint descriptor let mut ss_max_burst: u8 = 0; let mut ss_bytes_per_interval: u16 = 0; + let mut ss_mult: u8 = 0; let ss_offset = ep_offset + ep_len; if ss_offset + 2 <= config_len { let ss_len = config_buf[ss_offset] as usize; let ss_type = config_buf[ss_offset + 1]; if ss_type == 0x30 && ss_len >= 6 && ss_offset + ss_len <= config_len { ss_max_burst = config_buf[ss_offset + 2]; + // bmAttributes bits[1:0] = Mult (max burst multiplier) + ss_mult = config_buf[ss_offset + 3] & 0x3; ss_bytes_per_interval = u16::from_le_bytes([ config_buf[ss_offset + 4], config_buf[ss_offset + 5], ]); - crate::serial_println!( - "[xhci] SS EP Companion: maxBurst={} bytesPerInterval={}", - ss_max_burst, ss_bytes_per_interval, - ); } } // Determine HID device type and transfer ring index: // hid_idx 0 = boot keyboard (protocol=1, DCI 3) - // hid_idx 1 = boot mouse (protocol=2) + // hid_idx 1 = boot mouse (protocol=2, DCI 3) // hid_idx 2 = NKRO keyboard (subclass=0 protocol=0, DCI 5) + // hid_idx 3 = mouse2 (second mouse interface, DCI 5) + // Linux ftrace: mouse has TWO interrupt EPs (DCI 3 + DCI 5), + // both configured in one ConfigureEndpoint with add_flags=0x29. let (hid_idx, is_keyboard, is_nkro) = if iface.b_interface_protocol == hid_protocol::KEYBOARD { found_boot_keyboard = true; (0usize, true, false) } else if iface.b_interface_protocol == hid_protocol::MOUSE { if found_mouse { - // Skip duplicate mouse interface to avoid ring collision - // (both endpoints would share the same transfer ring) - break; + // Second mouse interface β€” use ring 3 (DCI 5). + // Linux configures both mouse endpoints in one batch. + if found_mouse2 { + break; // Only support two mouse interfaces + } + found_mouse2 = true; + (3usize, false, false) + } else { + found_mouse = true; + (1usize, false, false) } - found_mouse = true; - (1usize, false, false) } else if found_boot_keyboard && iface.b_interface_sub_class == 0 && iface.b_interface_protocol == 0 @@ -1943,6 +2415,7 @@ fn configure_hid( b_interval: ep_desc.b_interval, ss_max_burst, ss_bytes_per_interval, + ss_mult, }); ep_count += 1; } @@ -1953,6 +2426,7 @@ fn configure_hid( interface_number: iface.b_interface_number, is_keyboard, is_nkro, + hid_idx, dci, hid_report_len, }); @@ -1972,28 +2446,30 @@ fn configure_hid( } if iface_count == 0 { - crate::serial_println!("[xhci] No HID interfaces found on slot {}", slot_id); + xhci_trace_note(slot_id, "no_hid_ifaces"); return Ok(()); } // ========================================================================= - // Phase 1b: ConfigureEndpoint BEFORE SET_CONFIGURATION (Linux ordering) + // Phase 1b: ConfigureEndpoint BEFORE SET_CONFIGURATION (correct order) + // + // xHCI spec Β§4.6.6 and Linux usb_set_configuration() both do: + // 1. xhci_check_bandwidth() β†’ issues ConfigureEndpoint xHCI command + // 2. Send SET_CONFIGURATION USB control transfer to device + // + // CC=12 (ENDPOINT_NOT_ENABLED) occurs when this is reversed. // ========================================================================= - // Linux's usb_set_configuration() calls xhci_check_bandwidth() which issues - // the ConfigureEndpoint xHCI command BEFORE sending SET_CONFIGURATION to the - // USB device. This ensures the xHC has transfer rings ready before the device - // activates its endpoints. This order is confirmed by usbmon traces on the - // Parallels Linux reference VM. if ep_count > 0 { configure_endpoints_batch(state, slot_id, &pending_eps, ep_count)?; } // ========================================================================= // Phase 2: SET_CONFIGURATION (USB control transfer to device) + // Sent AFTER ConfigureEndpoint so the xHC has transfer rings ready. // ========================================================================= set_configuration(state, slot_id, config_value)?; - // Diagnostic: dump endpoint states after SET_CONFIGURATION + // Diagnostic: dump endpoint states after ConfigureEndpoint if ep_count > 0 { let slot_idx = (slot_id - 1) as usize; let ctx_size = state.context_size; @@ -2003,91 +2479,97 @@ fn configure_hid( for i in 0..ep_count { if let Some(ref ep) = pending_eps[i] { let ep_out = (*dev_ctx).0.as_ptr().add((ep.dci as usize) * ctx_size); - let ep_out_dw0 = core::ptr::read_volatile(ep_out as *const u32); - crate::serial_println!( - "[xhci] After SET_CONFIG: DCI={} state={} DW0={:#010x}", - ep.dci, ep_out_dw0 & 0x7, ep_out_dw0, - ); + let _ep_out_dw0 = core::ptr::read_volatile(ep_out as *const u32); } } } } - // NOTE: Linux does NOT send SET_INTERFACE(alt=0) during keyboard enumeration. - // Previously Breenix sent SET_INTERFACE for each interface, but this may cause - // the xHC to reset endpoint state. Removed to match Linux behavior. + // NOTE: Linux does NOT send SET_INTERFACE for HID devices (confirmed via + // ftrace). Only slot 3 (composite device, class 0xEF) receives SET_INTERFACE. + // We previously added SET_INTERFACE calls here but that was incorrect. + + // NOTE: CLEAR_FEATURE(ENDPOINT_HALT) was tested but did NOT fix CC=12. + // StopEndpoint + SetTRDequeuePointer was also tested and didn't fix it. + // The Parallels vxHC appears to have a fundamental limitation with interrupt + // endpoint transfers. EP0 GET_REPORT polling is used as a workaround. // ========================================================================= - // Phase 3: HID interface setup + INLINE interrupt TRB queueing + // Phase 3: HID interface setup (matches Linux HID driver probe sequence exactly) // ========================================================================= - // Linux's exact sequence per interface (from ftrace): - // SET_IDLE(0, iface N) β†’ GET_DESCRIPTOR(HID Report, exact_len) β†’ - // SET_REPORT(Output, 1 byte, keyboard only) β†’ queue interrupt TRB + doorbell + // Linux's sequence per interface type (verified via ftrace lines 725-923): + // + // Boot keyboard (iface 0): SET_IDLE(0) β†’ GET_HID_REPORT_DESC β†’ SET_REPORT(LED=0) β†’ ep1in TRB + // NKRO keyboard (iface 1): SET_IDLE(0) β†’ GET_HID_REPORT_DESC β†’ ep2in TRB + // Mouse: GET_REPORT(Feature) + SET_REPORT(Feature) + // Linux NEVER submits interrupt IN URBs for slot 1 (mouse) // - // The interrupt TRB is queued IMMEDIATELY after each interface's HID setup. - // This is critical: the Parallels virtual xHC may internally disable endpoints - // if no TRBs are available on the transfer ring shortly after ConfigureEndpoint. - // wait_for_command() ensures these Transfer Events don't interfere with - // subsequent command ring operations during port scanning. + // Interrupt TRBs are queued INLINE per interface immediately after setup. + // This matches Linux's behavior and avoids the Parallels vxHC timing issue: + // endpoints in Running state with empty rings for too long become internally + // invalid (output context still shows state=1 but HC returns CC=12 on doorbell). for i in 0..iface_count { if let Some(ref info) = ifaces[i] { - // SET_IDLE (all interfaces) - let _ = set_idle(state, slot_id, info.interface_number); - - // GET_DESCRIPTOR(HID Report) with exact length from HID descriptor - fetch_hid_report_descriptor(state, slot_id, info.interface_number, info.hid_report_len); if info.is_nkro { - // NKRO keyboard interface + // NKRO keyboard: SET_IDLE + GET_HID_REPORT_DESC then ep2in TRB. + // Linux sends these for the NKRO interface before ep2in (ftrace lines 900, 911, 923). + if !MINIMAL_INIT { + match set_idle(state, slot_id, info.interface_number) { + Ok(()) => { + } + Err(_) => { + } + } + fetch_hid_report_descriptor(state, slot_id, info.interface_number, info.hid_report_len); + } state.kbd_slot = slot_id; state.kbd_nkro_endpoint = info.dci; - crate::serial_println!( - "[xhci] NKRO keyboard configured: slot={} DCI={}", - slot_id, info.dci - ); - - // TRB queueing deferred to poll_hid_events (after SPI enable) - // to ensure the MSIβ†’GIC SPIβ†’CPU ISR pathway is fully active. - } else { - // Boot/standard HID interface - - // SET_REPORT(LED=0) for keyboard interfaces - if info.is_keyboard { + // No interrupt TRB β€” keyboard uses EP0 GET_REPORT polling (CC=12 workaround). + + } else if info.is_keyboard { + // Boot keyboard: SET_IDLE + GET_HID_REPORT_DESC + SET_REPORT(LED=0) + ep1in TRB. + // Linux ftrace (lines 827, 838, 851, 863): + // SET_IDLE (iface=0) β†’ GET_HID_REPORT_DESC (58 bytes) β†’ SET_REPORT(LED=0) β†’ ep1in TRB + if !MINIMAL_INIT { + match set_idle(state, slot_id, info.interface_number) { + Ok(()) => { + } + Err(_) => { + } + } + fetch_hid_report_descriptor(state, slot_id, info.interface_number, info.hid_report_len); match set_report_leds(state, slot_id, info.interface_number) { Ok(()) => { - crate::serial_println!( - "[xhci] SET_REPORT(LED=0) on slot {} iface {}", - slot_id, info.interface_number - ); } - Err(e) => { - crate::serial_println!( - "[xhci] SET_REPORT(LED) failed on slot {} iface {}: {}", - slot_id, info.interface_number, e - ); + Err(_) => { } } } + state.kbd_slot = slot_id; + state.kbd_endpoint = info.dci; + // No interrupt TRB β€” keyboard uses EP0 GET_REPORT polling (CC=12 workaround). - // Record slot/endpoint - if info.is_keyboard { - state.kbd_slot = slot_id; - state.kbd_endpoint = info.dci; - crate::serial_println!( - "[xhci] Boot keyboard configured: slot={} DCI={}", - slot_id, info.dci - ); + } else { + // Mouse: GET_REPORT(Feature) + SET_REPORT(Feature) only. + // Linux never submits interrupt IN URBs for slot 1 (mouse) β€” uses EP0 + // GET_REPORT Feature polling exclusively. Do NOT queue interrupt TRBs here. + if !MINIMAL_INIT { + let feature_id: u8 = if info.hid_idx == 3 { 0x12 } else { 0x11 }; + match get_set_feature_report(state, slot_id, info.interface_number, feature_id) { + Ok(()) => { + } + Err(_) => { + } + } + } + if info.hid_idx == 3 { + state.mouse_nkro_endpoint = info.dci; } else { state.mouse_slot = slot_id; state.mouse_endpoint = info.dci; - crate::serial_println!( - "[xhci] Mouse configured: slot={} DCI={}", - slot_id, info.dci - ); } - - // TRB queueing deferred to poll_hid_events (after SPI enable) - // to ensure the MSIβ†’GIC SPIβ†’CPU ISR pathway is fully active. + // No interrupt TRB for mouse β€” EP0 GET_REPORT Feature polling handles mouse input. } } } @@ -2098,16 +2580,19 @@ fn configure_hid( /// Queue a Normal TRB on a HID transfer ring to receive an interrupt IN report. fn queue_hid_transfer( state: &XhciState, - hid_idx: usize, // 0 = keyboard, 1 = mouse, 2 = NKRO keyboard + hid_idx: usize, // 0 = kbd boot, 1 = mouse, 2 = kbd NKRO, 3 = mouse2 slot_id: u8, dci: u8, ) -> Result<(), &'static str> { let ring_idx = HID_RING_BASE + hid_idx; - // Determine the physical address and size of the report buffer + // Determine the physical address and size of the report buffer. + // Linux ftrace confirms: xhci_urb_enqueue lengths are the actual data sizes + // (8 bytes for kbd boot, 8 bytes for mouse, 9 bytes for NKRO/mouse2), NOT maxp. let (buf_phys, buf_len) = match hid_idx { 0 => (virt_to_phys((&raw const KBD_REPORT_BUF) as u64), 8usize), 2 => (virt_to_phys((&raw const NKRO_REPORT_BUF) as u64), 9usize), + 3 => (virt_to_phys((&raw const MOUSE2_REPORT_BUF) as u64), 9usize), _ => (virt_to_phys((&raw const MOUSE_REPORT_BUF) as u64), 8usize), }; @@ -2118,18 +2603,23 @@ fn queue_hid_transfer( match hid_idx { 0 => { let buf = &raw mut KBD_REPORT_BUF; - core::ptr::write_bytes((*buf).0.as_mut_ptr(), 0xDE, 8); - dma_cache_clean((*buf).0.as_ptr(), 8); + core::ptr::write_bytes((*buf).0.as_mut_ptr(), 0xDE, 64); + dma_cache_clean((*buf).0.as_ptr(), 64); } 2 => { let buf = &raw mut NKRO_REPORT_BUF; - core::ptr::write_bytes((*buf).0.as_mut_ptr(), 0xDE, 9); - dma_cache_clean((*buf).0.as_ptr(), 9); + core::ptr::write_bytes((*buf).0.as_mut_ptr(), 0xDE, 64); + dma_cache_clean((*buf).0.as_ptr(), 64); + } + 3 => { + let buf = &raw mut MOUSE2_REPORT_BUF; + core::ptr::write_bytes((*buf).0.as_mut_ptr(), 0xDE, 64); + dma_cache_clean((*buf).0.as_ptr(), 64); } _ => { let buf = &raw mut MOUSE_REPORT_BUF; - core::ptr::write_bytes((*buf).0.as_mut_ptr(), 0xDE, 8); - dma_cache_clean((*buf).0.as_ptr(), 8); + core::ptr::write_bytes((*buf).0.as_mut_ptr(), 0xDE, 64); + dma_cache_clean((*buf).0.as_ptr(), 64); } } } @@ -2154,116 +2644,12 @@ fn queue_hid_transfer( ); } - // Read endpoint state BEFORE doorbell ring (diagnostic) - let pre_state = unsafe { - let slot_idx = (slot_id - 1) as usize; - let ctx_size = state.context_size; - let dev_ctx = &raw const DEVICE_CONTEXTS[slot_idx]; - dma_cache_invalidate((*dev_ctx).0.as_ptr(), 4096); - let ep_base = (*dev_ctx).0.as_ptr().add(dci as usize * ctx_size); - core::ptr::read_volatile(ep_base as *const u32) & 0x7 - }; - // Ring the doorbell for this endpoint ring_doorbell(state, slot_id, dci); - // Read endpoint state AFTER doorbell ring (diagnostic) - // Small spin to let the xHC process the doorbell - for _ in 0..100 { - core::hint::spin_loop(); - } - let post_state = unsafe { - let slot_idx = (slot_id - 1) as usize; - let ctx_size = state.context_size; - let dev_ctx = &raw const DEVICE_CONTEXTS[slot_idx]; - dma_cache_invalidate((*dev_ctx).0.as_ptr(), 4096); - let ep_base = (*dev_ctx).0.as_ptr().add(dci as usize * ctx_size); - core::ptr::read_volatile(ep_base as *const u32) & 0x7 - }; - - let db_val = (pre_state << 4) | post_state; - DIAG_DOORBELL_EP_STATE.store(db_val, Ordering::Relaxed); - // Record first-time only (0xFF = unset sentinel) - let _ = DIAG_FIRST_DB.compare_exchange(0xFF, db_val, Ordering::AcqRel, Ordering::Relaxed); - Ok(()) } -/// Queue a GET_REPORT control transfer on EP0 for the keyboard device. -/// -/// This is an asynchronous enqueue β€” completion is handled in the event loop -/// of poll_hid_events and handle_interrupt. Uses CTRL_DATA_BUF as the DMA -/// target (unused after init). -/// -/// GET_REPORT: bmRequestType=0xA1, bRequest=0x01, wValue=0x0100 (Input, ID=0), -/// wIndex=0 (interface 0 = boot keyboard), wLength=8. -fn queue_ep0_get_report(state: &XhciState) { - let slot_id = state.kbd_slot; - if slot_id == 0 { - return; - } - let slot_idx = (slot_id - 1) as usize; - - // Check ring capacity: don't queue if near the end (avoid Link TRB wrap). - // Parallels virtual xHC does not follow Link TRBs on transfer rings. - unsafe { - if TRANSFER_ENQUEUE[slot_idx] + 4 >= TRANSFER_RING_SIZE - 1 { - return; // Ring nearly full - } - } - - // Prepare DMA buffer with sentinel - unsafe { - let data_buf = &raw mut CTRL_DATA_BUF; - core::ptr::write_bytes((*data_buf).0.as_mut_ptr(), 0xBB, 8); - dma_cache_clean((*data_buf).0.as_ptr(), 8); - } - - let data_phys = virt_to_phys((&raw const CTRL_DATA_BUF) as u64); - - let setup = SetupPacket { - bm_request_type: 0xA1, // Class, Interface, Device-to-Host - b_request: 0x01, // GET_REPORT - w_value: 0x0100, // Input report, Report ID 0 - w_index: 0, // Interface 0 (boot keyboard) - w_length: 8, - }; - - let setup_data: u64 = unsafe { - core::ptr::read_unaligned(&setup as *const SetupPacket as *const u64) - }; - - // Setup Stage TRB: IDT (bit 6), TRT=3 (IN data stage), type = SETUP_STAGE - let setup_trb = Trb { - param: setup_data, - status: 8, - control: (trb_type::SETUP_STAGE << 10) | (1 << 6) | (3 << 16), - }; - enqueue_transfer(slot_idx, setup_trb); - - // Data Stage TRB: DIR=IN (bit 16), type = DATA_STAGE - let data_trb = Trb { - param: data_phys, - status: 8, - control: (trb_type::DATA_STAGE << 10) | (1 << 16), - }; - enqueue_transfer(slot_idx, data_trb); - - // Status Stage TRB: DIR=OUT (0) for IN data, IOC (bit 5) - let status_trb = Trb { - param: 0, - status: 0, - control: (trb_type::STATUS_STAGE << 10) | (1 << 5), - }; - enqueue_transfer(slot_idx, status_trb); - - // Ring doorbell for EP0 (DCI=1) - ring_doorbell(state, slot_id, 1); - - EP0_POLL_STATE.store(1, Ordering::Release); - EP0_GET_REPORT_COUNT.fetch_add(1, Ordering::Relaxed); -} - /// Drain any stale events left in the event ring after enumeration. /// /// During enumeration, some xHCI controllers may leave Transfer Events @@ -2289,16 +2675,6 @@ fn drain_stale_events(state: &XhciState) { break; // No more events } - let trb_type_val = trb.trb_type(); - crate::serial_println!( - "[xhci] Draining stale event #{}: type={} slot={} ep={} cc={} param={:#x}", - drained, - trb_type_val, - trb.slot_id(), - (trb.control >> 16) & 0x1F, - trb.completion_code(), - trb.param, - ); // Advance dequeue pointer EVENT_RING_DEQUEUE = (idx + 1) % EVENT_RING_SIZE; @@ -2319,162 +2695,26 @@ fn drain_stale_events(state: &XhciState) { } } if drained > 0 { - crate::serial_println!("[xhci] Drained {} stale events from event ring", drained); + xhci_trace_note(0, "drain_stale"); } else { - crate::serial_println!("[xhci] No stale events in event ring"); } } -/// Test synchronous GET_REPORT and GET_PROTOCOL during init. +/// Read the endpoint state (bits[2:0] of output context DW0) for a given slot/DCI. /// -/// Called after keyboard is configured to diagnose whether Parallels echoes -/// setup packet bytes for class-specific requests or if the issue is -/// specific to the async EP0 polling path. -/// -/// NOTE: Currently disabled in the init sequence because the GET_REPORT -/// responses contaminate KBD_REPORT_BUF with setup packet echoes. -/// Kept for future diagnostics. -#[allow(dead_code)] -fn test_sync_class_requests(state: &XhciState, slot_id: u8) { - // Log physical addresses for diagnostic comparison - let ctrl_buf_phys = virt_to_phys((&raw const CTRL_DATA_BUF) as u64); - let kbd_buf_phys = virt_to_phys((&raw const KBD_REPORT_BUF) as u64); - crate::serial_println!( - "[xhci] Buffer phys addrs: CTRL_DATA_BUF={:#010x} KBD_REPORT_BUF={:#010x}", - ctrl_buf_phys, kbd_buf_phys, - ); - - // Test 1: Synchronous GET_REPORT using CTRL_DATA_BUF - { - let setup = SetupPacket { - bm_request_type: 0xA1, - b_request: 0x01, // GET_REPORT - w_value: 0x0100, // Input report, ID 0 - w_index: 0, - w_length: 8, - }; - - unsafe { - let data_buf = &raw mut CTRL_DATA_BUF; - core::ptr::write_bytes((*data_buf).0.as_mut_ptr(), 0xBB, 8); - dma_cache_clean((*data_buf).0.as_ptr(), 8); - dma_cache_invalidate((*data_buf).0.as_ptr(), 8); - - let data_phys = virt_to_phys(&raw const CTRL_DATA_BUF as u64); - - match control_transfer(state, slot_id, &setup, data_phys, 8, true) { - Ok(()) => { - dma_cache_invalidate((*data_buf).0.as_ptr(), 8); - let buf = &(*data_buf).0; - crate::serial_println!( - "[xhci] Sync GET_REPORT(CTRL_DATA): {:02x} {:02x} {:02x} {:02x} {:02x} {:02x} {:02x} {:02x}", - buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6], buf[7], - ); - } - Err(e) => { - crate::serial_println!("[xhci] Sync GET_REPORT(CTRL_DATA) failed: {}", e); - } - } - } - } - - // Test 2: Synchronous GET_REPORT using KBD_REPORT_BUF - { - let setup = SetupPacket { - bm_request_type: 0xA1, - b_request: 0x01, - w_value: 0x0100, - w_index: 0, - w_length: 8, - }; - - unsafe { - let kbd_buf = &raw mut KBD_REPORT_BUF; - core::ptr::write_bytes((*kbd_buf).0.as_mut_ptr(), 0xCC, 8); - dma_cache_clean((*kbd_buf).0.as_ptr(), 8); - dma_cache_invalidate((*kbd_buf).0.as_ptr(), 8); - - match control_transfer(state, slot_id, &setup, kbd_buf_phys, 8, true) { - Ok(()) => { - dma_cache_invalidate((*kbd_buf).0.as_ptr(), 8); - let buf = &(*kbd_buf).0; - crate::serial_println!( - "[xhci] Sync GET_REPORT(KBD_BUF): {:02x} {:02x} {:02x} {:02x} {:02x} {:02x} {:02x} {:02x}", - buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6], buf[7], - ); - } - Err(e) => { - crate::serial_println!("[xhci] Sync GET_REPORT(KBD_BUF) failed: {}", e); - } - } - } - } - - // Test 3: Synchronous GET_PROTOCOL (should return 1 byte: 0=boot, 1=report) - { - let setup = SetupPacket { - bm_request_type: 0xA1, - b_request: 0x03, // GET_PROTOCOL - w_value: 0, - w_index: 0, - w_length: 1, - }; - - unsafe { - let data_buf = &raw mut CTRL_DATA_BUF; - core::ptr::write_bytes((*data_buf).0.as_mut_ptr(), 0xDD, 8); - dma_cache_clean((*data_buf).0.as_ptr(), 8); - - let data_phys = virt_to_phys(&raw const CTRL_DATA_BUF as u64); - - match control_transfer(state, slot_id, &setup, data_phys, 1, true) { - Ok(()) => { - dma_cache_invalidate((*data_buf).0.as_ptr(), 8); - let buf = &(*data_buf).0; - crate::serial_println!( - "[xhci] Sync GET_PROTOCOL: {:02x} ({})", - buf[0], - if buf[0] == 0 { "boot" } else if buf[0] == 1 { "report" } else { "?" }, - ); - } - Err(e) => { - crate::serial_println!("[xhci] Sync GET_PROTOCOL failed: {}", e); - } - } - } +/// Returns: 0=Disabled, 1=Running, 2=Halted, 3=Stopped, 4=Error, 0=invalid slot/dci. +fn read_output_ep_state(state: &XhciState, slot_id: u8, dci: u8) -> u8 { + if slot_id == 0 || dci == 0 { + return 0; } - - // Test 4: GET_DESCRIPTOR(Device) via sync to verify control transfers still work - { - let setup = SetupPacket { - bm_request_type: 0x80, - b_request: 0x06, // GET_DESCRIPTOR - w_value: 0x0100, // Device descriptor - w_index: 0, - w_length: 8, - }; - - unsafe { - let data_buf = &raw mut CTRL_DATA_BUF; - core::ptr::write_bytes((*data_buf).0.as_mut_ptr(), 0xEE, 8); - dma_cache_clean((*data_buf).0.as_ptr(), 8); - - let data_phys = virt_to_phys(&raw const CTRL_DATA_BUF as u64); - - match control_transfer(state, slot_id, &setup, data_phys, 8, true) { - Ok(()) => { - dma_cache_invalidate((*data_buf).0.as_ptr(), 8); - let buf = &(*data_buf).0; - crate::serial_println!( - "[xhci] Sync GET_DESC(Device): {:02x} {:02x} {:02x} {:02x} {:02x} {:02x} {:02x} {:02x}", - buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6], buf[7], - ); - } - Err(e) => { - crate::serial_println!("[xhci] Sync GET_DESC(Device) failed: {}", e); - } - } - } + let slot_idx = (slot_id - 1) as usize; + let ctx_size = state.context_size; + unsafe { + let dev_ctx = &raw const DEVICE_CONTEXTS[slot_idx]; + dma_cache_invalidate((*dev_ctx).0.as_ptr(), 4096); + let ep_base = (*dev_ctx).0.as_ptr().add(dci as usize * ctx_size); + let ep_dw0 = core::ptr::read_volatile(ep_base as *const u32); + (ep_dw0 & 0x7) as u8 } } @@ -2492,46 +2732,18 @@ fn dump_endpoint_contexts(state: &XhciState) { dma_cache_invalidate((*dev_ctx).0.as_ptr(), 4096); // Slot Context DW0 - let slot_dw0 = core::ptr::read_volatile((*dev_ctx).0.as_ptr() as *const u32); - let slot_state = (slot_dw0 >> 27) & 0x1F; - let ctx_entries = slot_dw0 >> 27; + let _slot_dw0 = core::ptr::read_volatile((*dev_ctx).0.as_ptr() as *const u32); - crate::serial_println!( - "[xhci] Post-init slot {} context: state={} entries={}", - state.kbd_slot, slot_state, ctx_entries & 0x1F, - ); // Dump each endpoint DCI we care about (full 5 DWORDs) for &dci in &[state.kbd_endpoint, state.kbd_nkro_endpoint] { if dci == 0 { continue; } let ep_base = (*dev_ctx).0.as_ptr().add(dci as usize * ctx_size); - let ep_dw0 = core::ptr::read_volatile(ep_base as *const u32); - let ep_dw1 = core::ptr::read_volatile(ep_base.add(4) as *const u32); - let ep_dw2 = core::ptr::read_volatile(ep_base.add(8) as *const u32); - let ep_dw3 = core::ptr::read_volatile(ep_base.add(12) as *const u32); - let ep_dw4 = core::ptr::read_volatile(ep_base.add(16) as *const u32); - let ep_state = ep_dw0 & 0x7; - let ep_type = (ep_dw1 >> 3) & 0x7; - let max_pkt = (ep_dw1 >> 16) & 0xFFFF; - let cerr = (ep_dw1 >> 1) & 0x3; - let interval = (ep_dw0 >> 16) & 0xFF; - let tr_deq = ((ep_dw3 as u64) << 32) | (ep_dw2 as u64 & !0xF); - let dcs = ep_dw2 & 1; - let avg_trb = ep_dw4 & 0xFFFF; - let max_esit_lo = (ep_dw4 >> 16) & 0xFFFF; - - crate::serial_println!( - "[xhci] DCI={}: state={} type={} maxpkt={} cerr={} interval={} DCS={}", - dci, ep_state, ep_type, max_pkt, cerr, interval, dcs, - ); - crate::serial_println!( - "[xhci] DW0={:#010x} DW1={:#010x} DW2={:#010x} DW3={:#010x} DW4={:#010x}", - ep_dw0, ep_dw1, ep_dw2, ep_dw3, ep_dw4, - ); - crate::serial_println!( - "[xhci] TR_deq={:#010x} avg_trb={} max_esit_lo={}", - tr_deq, avg_trb, max_esit_lo, - ); + let _ep_dw0 = core::ptr::read_volatile(ep_base as *const u32); + let _ep_dw1 = core::ptr::read_volatile(ep_base.add(4) as *const u32); + let _ep_dw2 = core::ptr::read_volatile(ep_base.add(8) as *const u32); + let _ep_dw3 = core::ptr::read_volatile(ep_base.add(12) as *const u32); + } } } @@ -2545,25 +2757,27 @@ fn dump_endpoint_contexts(state: &XhciState) { dma_cache_invalidate((*dev_ctx).0.as_ptr(), 4096); let dci = state.mouse_endpoint; let ep_base = (*dev_ctx).0.as_ptr().add(dci as usize * ctx_size); - let ep_dw0 = core::ptr::read_volatile(ep_base as *const u32); - let ep_dw1 = core::ptr::read_volatile(ep_base.add(4) as *const u32); - let ep_dw2 = core::ptr::read_volatile(ep_base.add(8) as *const u32); - let ep_dw3 = core::ptr::read_volatile(ep_base.add(12) as *const u32); - let ep_dw4 = core::ptr::read_volatile(ep_base.add(16) as *const u32); - crate::serial_println!( - "[xhci] Mouse slot {} DCI={}: DW0={:#010x} DW1={:#010x} DW2={:#010x} DW3={:#010x} DW4={:#010x}", - state.mouse_slot, dci, ep_dw0, ep_dw1, ep_dw2, ep_dw3, ep_dw4, - ); + let _ep_dw0 = core::ptr::read_volatile(ep_base as *const u32); + let _ep_dw1 = core::ptr::read_volatile(ep_base.add(4) as *const u32); + let _ep_dw2 = core::ptr::read_volatile(ep_base.add(8) as *const u32); + let _ep_dw3 = core::ptr::read_volatile(ep_base.add(12) as *const u32); } } } -/// Wait for a Command Completion event, ignoring Transfer Events and other +/// Wait for a Command Completion event, passing through Transfer Events and other /// async events. Used during endpoint recovery in timer context β€” no logging. /// +/// Transfer Events consumed here are re-flagged via NEEDS_RESET_* so the poll +/// loop doesn't miss endpoint errors that arrive while waiting for commands. +/// /// Returns the completion code, or an error on timeout. fn wait_for_command_completion(state: &XhciState) -> Result { - let mut timeout = 500_000u32; // Shorter timeout for timer context + // 10K iterations Γ— ~60ns = ~600ΞΌs max. Virtual xHC (Parallels) responds in + // microseconds; real hardware would need more. Keeping this short is critical: + // this function is called from poll_hid_events in the timer IRQ handler, so + // blocking here starves the scheduler and prevents heartbeats. + let mut timeout = 10_000u32; loop { unsafe { let ring = &raw const EVENT_RING; @@ -2595,8 +2809,79 @@ fn wait_for_command_completion(state: &XhciState) -> Result { if trb_type_val == trb_type::COMMAND_COMPLETION { return Ok(trb.completion_code()); } - // Consumed non-command event (Transfer Event, PSC, etc.) - // β€” fall through to timeout check. + // For Transfer Events consumed while waiting: re-flag NEEDS_RESET_* + // so the next poll_hid_events call handles them. Without this, error + // completions for other endpoints are silently lost, leaving those + // endpoints permanently halted with no pending TRBs. + if trb_type_val == trb_type::TRANSFER_EVENT { + let slot = trb.slot_id(); + let endpoint = ((trb.control >> 16) & 0x1F) as u8; + let cc = trb.completion_code(); + + // GET_REPORT EP0 response: handle it here since the event arrives + // while we're spinning for the interrupt endpoint Reset Endpoint + // command completion. Without PENDING check, late responses that + // arrive after the 200-tick stale-clear are also caught here. + // Post-enumeration, the only EP0 events from mouse_slot are GET_REPORT. + if slot == state.mouse_slot + && endpoint == 1 + { + MOUSE_GET_REPORT_PENDING.store(false, Ordering::Release); + // Record last CC seen (fd= heartbeat field, 0xFF = no event yet). + DIAG_FIRST_DB.store(cc, Ordering::Relaxed); + if cc == completion_code::SUCCESS || cc == completion_code::SHORT_PACKET { + GET_REPORT_OK.fetch_add(1, Ordering::Relaxed); + let buf = &raw const CTRL_DATA_BUF; + dma_cache_invalidate((*buf).0.as_ptr(), 8); + let report = &(&(*buf).0)[..8]; + if report.iter().any(|&b| b != 0) { + GET_REPORT_NONZERO.fetch_add(1, Ordering::Relaxed); + super::hid::process_mouse_report(report); + } + } + } else if cc != completion_code::SUCCESS && cc != completion_code::SHORT_PACKET { + // CC=12 during a command wait: endpoint is halted but re-flagging + // NEEDS_RESET_* here causes cascading resets (each reset's command + // wait sees the other endpoint's CC=12, triggering another reset). + // Use MSI_*_NEEDS_REQUEUE to defer: the next timer tick's state + // check will set NEEDS_RESET_* if the endpoint is still Halted. + // Other error CCs (CC=4, CC=6) are genuine errors: reset directly. + if cc == completion_code::ENDPOINT_NOT_ENABLED { + if slot == state.kbd_slot && endpoint == state.kbd_endpoint { + MSI_KBD_NEEDS_REQUEUE.store(true, Ordering::Release); + } else if slot == state.kbd_slot + && state.kbd_nkro_endpoint != 0 + && endpoint == state.kbd_nkro_endpoint + { + MSI_NKRO_NEEDS_REQUEUE.store(true, Ordering::Release); + } else if slot == state.mouse_slot && endpoint == state.mouse_endpoint { + MSI_MOUSE_NEEDS_REQUEUE.store(true, Ordering::Release); + } else if slot == state.mouse_slot + && state.mouse_nkro_endpoint != 0 + && endpoint == state.mouse_nkro_endpoint + { + MSI_MOUSE2_NEEDS_REQUEUE.store(true, Ordering::Release); + } + } else { + if slot == state.kbd_slot && endpoint == state.kbd_endpoint { + NEEDS_RESET_KBD_BOOT.store(true, Ordering::Release); + } else if slot == state.kbd_slot + && state.kbd_nkro_endpoint != 0 + && endpoint == state.kbd_nkro_endpoint + { + NEEDS_RESET_KBD_NKRO.store(true, Ordering::Release); + } else if slot == state.mouse_slot && endpoint == state.mouse_endpoint { + NEEDS_RESET_MOUSE.store(true, Ordering::Release); + } else if slot == state.mouse_slot + && state.mouse_nkro_endpoint != 0 + && endpoint == state.mouse_nkro_endpoint + { + NEEDS_RESET_MOUSE2.store(true, Ordering::Release); + } + } + } + } + // Consumed non-command event β€” fall through to timeout check. } } timeout -= 1; @@ -2609,24 +2894,27 @@ fn wait_for_command_completion(state: &XhciState) -> Result { /// Reset a halted endpoint and requeue a HID transfer TRB. /// -/// Per xHCI spec section 4.6.8: -/// 1. Issue Reset Endpoint Command (TRB type 14) -/// 2. Issue Set TR Dequeue Pointer Command (TRB type 16) to ring start -/// 3. Requeue a Normal TRB for HID polling +/// Two paths based on current endpoint state (inferred from Reset Endpoint CC): /// -/// Called from poll_hid_events (timer context). Uses raw_serial_char breadcrumbs -/// and wait_for_command_completion (no logging). +/// Halted β†’ Reset EP (CC=1) β†’ Stopped β†’ zero ring β†’ Set TR Deq β†’ queue TRB +/// Running/Stopped β†’ Reset EP fails (CC=9) β†’ skip ring reset β†’ queue TRB at +/// current TRANSFER_ENQUEUE (HC dequeue already valid) +/// +/// The "skip ring reset" path is correct because the HC's dequeue pointer is +/// already positioned at the slot where the failed TRB was processed. Writing a +/// new TRB there and ringing the doorbell resumes the endpoint without disrupting +/// the HC's ring state. +/// +/// Called from poll_hid_events (timer context). Uses wait_for_command_completion (no logging). fn reset_halted_endpoint( state: &XhciState, slot_id: u8, dci: u8, hid_idx: usize, ) -> Result<(), &'static str> { - crate::serial_aarch64::raw_serial_char(b'R'); // breadcrumb: Reset EP start - let ring_idx = HID_RING_BASE + hid_idx; - // Step 1: Reset Endpoint Command + // Step 1: Reset Endpoint Command (valid only for Halted endpoints). let reset_trb = Trb { param: 0, status: 0, @@ -2640,17 +2928,34 @@ fn reset_halted_endpoint( let cc = wait_for_command_completion(state)?; if cc != completion_code::SUCCESS { - crate::serial_aarch64::raw_serial_char(b'!'); // breadcrumb: Reset EP failed ENDPOINT_RESET_FAIL_COUNT.fetch_add(1, Ordering::Relaxed); - return Err("Reset Endpoint command failed"); + // Endpoint is Running or Stopped (not Halted). Reset Endpoint is only valid + // for Halted endpoints β€” CC=9 (Context State Error) is expected here. + // Skip ring zero and Set TR Dequeue Pointer: the HC's dequeue is still valid + // (it processed the last TRB and advanced naturally). Just requeue at the + // current TRANSFER_ENQUEUE position and ring the doorbell. + let result = queue_hid_transfer(state, hid_idx, slot_id, dci); + ENDPOINT_RESET_COUNT.fetch_add(1, Ordering::Relaxed); + return result; } - crate::serial_aarch64::raw_serial_char(b'S'); // breadcrumb: Set TR Deq - - // Step 2: Zero transfer ring and reset state to beginning + // Step 2: Zero transfer ring, add Link TRB, and reset state to beginning unsafe { let ring = &raw mut TRANSFER_RINGS[ring_idx]; core::ptr::write_bytes(ring as *mut u8, 0, TRANSFER_RING_SIZE * 16); + + // Re-initialize Link TRB at end of ring (matching Linux ring structure) + let ring_phys_link = virt_to_phys(&raw const TRANSFER_RINGS[ring_idx] as u64); + let link = Trb { + param: ring_phys_link, + status: 0, + control: (trb_type::LINK << 10) | (1 << 1) | 1, // Link, TC, cycle=1 + }; + core::ptr::write_volatile( + &mut (*ring)[TRANSFER_RING_SIZE - 1] as *mut Trb, + link, + ); + dma_cache_clean( &TRANSFER_RINGS[ring_idx] as *const [Trb; TRANSFER_RING_SIZE] as *const u8, TRANSFER_RING_SIZE * 16, @@ -2673,53 +2978,49 @@ fn reset_halted_endpoint( let cc2 = wait_for_command_completion(state)?; if cc2 != completion_code::SUCCESS { - crate::serial_aarch64::raw_serial_char(b'?'); // breadcrumb: Set TR Deq failed ENDPOINT_RESET_FAIL_COUNT.fetch_add(1, Ordering::Relaxed); - return Err("Set TR Dequeue Pointer command failed"); + // Don't abort β€” fall through to requeue anyway so the endpoint has a fresh TRB. + } + + // Read endpoint state from output context after reset (NEC quirk + SetTRDeq). + // Tells us if the endpoint is Running (1) or still Stopped/Halted. + unsafe { + if DIAG_EP_STATE_AFTER_RESET.load(Ordering::Relaxed) == 0xFF { + let slot_idx = (slot_id - 1) as usize; + let ep_out = DEVICE_CONTEXTS[slot_idx] + .0 + .as_ptr() + .add(dci as usize * state.context_size); + dma_cache_invalidate(ep_out, 4); + let dw0 = core::ptr::read_volatile(ep_out as *const u32); + let ep_state = dw0 & 0x7; + DIAG_EP_STATE_AFTER_RESET.store( + ((slot_id as u32) << 16) | ((dci as u32) << 8) | ep_state, + Ordering::Relaxed, + ); + } } // Step 4: Requeue a HID transfer TRB queue_hid_transfer(state, hid_idx, slot_id, dci)?; ENDPOINT_RESET_COUNT.fetch_add(1, Ordering::Relaxed); - crate::serial_aarch64::raw_serial_char(b'r'); // breadcrumb: Reset EP complete Ok(()) } -/// Post-enumeration setup: drain stale events and dump diagnostics. +/// Post-enumeration setup: drain stale events, mark HID polling as active. /// -/// Initial HID transfer TRBs are now queued INLINE during configure_hid -/// (matching Linux's exact sequence). This function only needs to drain -/// any stale events and dump DMA addresses for diagnostic purposes. +/// Both keyboard and mouse use EP0 GET_REPORT polling (CC=12 workaround) rather +/// than interrupt IN endpoints. No interrupt TRBs are queued here. The timer +/// poll section (poll_hid_events) starts GET_REPORT transfers after poll=300. fn start_hid_polling(state: &XhciState) { - // Drain any leftover events from enumeration + // Drain any stale Transfer Events that may have been generated during + // port scanning or previous enumeration attempts. drain_stale_events(state); - // Diagnostic: dump DMA buffer physical addresses for verification - unsafe { - let kbd_buf_phys = virt_to_phys((&raw const KBD_REPORT_BUF) as u64); - let mouse_buf_phys = virt_to_phys((&raw const MOUSE_REPORT_BUF) as u64); - let nkro_buf_phys = virt_to_phys((&raw const NKRO_REPORT_BUF) as u64); - let ring0_phys = virt_to_phys(&raw const TRANSFER_RINGS[HID_RING_BASE] as u64); - let ring1_phys = virt_to_phys(&raw const TRANSFER_RINGS[HID_RING_BASE + 1] as u64); - let ring2_phys = virt_to_phys(&raw const TRANSFER_RINGS[HID_RING_BASE + 2] as u64); - crate::serial_println!( - "[xhci] DMA phys: kbd_buf={:#010x} mouse_buf={:#010x} nkro_buf={:#010x}", - kbd_buf_phys, mouse_buf_phys, nkro_buf_phys, - ); - crate::serial_println!( - "[xhci] DMA phys: ring0={:#010x} ring1={:#010x} ring2={:#010x}", - ring0_phys, ring1_phys, ring2_phys, - ); - } - - crate::serial_println!( - "[xhci] HID polling: TRBs already queued inline during configure_hid (kbd={} nkro={} mouse={})", - state.kbd_slot != 0 && state.kbd_endpoint != 0, - state.kbd_nkro_endpoint != 0, - state.mouse_slot != 0, - ); + HID_TRBS_QUEUED.store(true, Ordering::Release); + // Keyboard and mouse both poll via EP0 GET_REPORT β€” no interrupt TRBs. } // ============================================================================= @@ -2728,34 +3029,24 @@ fn start_hid_polling(state: &XhciState) { /// Scan all root hub ports for connected devices, enumerate, and configure HID devices. fn scan_ports(state: &mut XhciState) -> Result<(), &'static str> { - crate::serial_println!( - "[xhci] Scanning {} ports...", - state.max_ports, - ); // Dump PORTSC of all ports (especially USB 2.0 ports 12-13) for port in 0..state.max_ports as u64 { let portsc_addr = state.op_base + 0x400 + port * 0x10; let portsc = read32(portsc_addr); - let speed = (portsc >> 10) & 0xF; let ccs = portsc & 1; - let ped = (portsc >> 1) & 1; if ccs != 0 || port >= 12 { - crate::serial_println!( - "[xhci] Port {} PORTSC={:#010x} CCS={} PED={} speed={}", - port, portsc, ccs, ped, speed, - ); } } let mut slots_used: u8 = 0; - let max_enumerate: u8 = 4; // Only enumerate first few connected devices + // MOUSE_ONLY: enumerate only 1 device (mouse on port 0), skip keyboard/composite. + let max_enumerate: u8 = if MOUSE_ONLY { 1 } else { 4 }; for port in 0..state.max_ports as u64 { - // Stop early if we've found both keyboard and mouse - if state.kbd_slot != 0 && state.mouse_slot != 0 { - break; - } + // DIAGNOSTIC: Don't break early β€” enumerate ALL connected devices. + // Linux enumerates all 3 connected ports; skipping Port 2 may cause + // the Parallels virtual xHC to leave keyboard interrupt endpoints disabled. // Limit total devices to avoid issues with unsupported devices if slots_used >= max_enumerate { break; @@ -2769,24 +3060,11 @@ fn scan_ports(state: &mut XhciState) -> Result<(), &'static str> { continue; } - let port_speed = (portsc >> 10) & 0xF; - crate::serial_println!( - "[xhci] Port {}: connected (PORTSC={:#010x}, speed={})", - port, - portsc, - match port_speed { - 1 => "Full", - 2 => "Low", - 3 => "High", - 4 => "Super", - _ => "Unknown", - }, - ); + // Check if port is enabled (PED, bit 1) if portsc & (1 << 1) == 0 { // Port not enabled - perform a port reset - crate::serial_println!("[xhci] Port {}: resetting...", port); // Write PR (Port Reset, bit 4). // Note: PORTSC is a mix of RW, RW1C, and RO bits. We must preserve @@ -2804,7 +3082,6 @@ fn scan_ports(state: &mut XhciState) -> Result<(), &'static str> { ) .is_err() { - crate::serial_println!("[xhci] Port {}: reset timeout", port); continue; } @@ -2814,35 +3091,26 @@ fn scan_ports(state: &mut XhciState) -> Result<(), &'static str> { let portsc_final = read32(portsc_addr); if portsc_final & (1 << 1) == 0 { - crate::serial_println!("[xhci] Port {}: still not enabled after reset", port); continue; } - crate::serial_println!( - "[xhci] Port {}: enabled after reset (PORTSC={:#010x})", - port, - portsc_final, - ); } // Enable Slot for this device let slot_id = match enable_slot(state) { Ok(id) => id, - Err(e) => { - crate::serial_println!("[xhci] Port {}: enable_slot failed: {}", port, e); + Err(_) => { continue; } }; if slot_id == 0 { - crate::serial_println!("[xhci] Port {}: got slot_id 0, skipping", port); continue; } slots_used += 1; // Address Device (port numbers are 1-based) - if let Err(e) = address_device(state, slot_id, port as u8 + 1) { - crate::serial_println!("[xhci] Port {}: address_device failed: {}", port, e); + if let Err(_) = address_device(state, slot_id, port as u8 + 1) { continue; } @@ -2856,45 +3124,49 @@ fn scan_ports(state: &mut XhciState) -> Result<(), &'static str> { // This exact ordering is confirmed by Parallels Linux VM ftrace capture. // Step 1: Short device descriptor (8 bytes) - if let Err(e) = get_device_descriptor_short(state, slot_id) { - crate::serial_println!("[xhci] Port {}: get_device_descriptor(8) failed: {}", port, e); + if let Err(_) = get_device_descriptor_short(state, slot_id) { continue; } // Step 2: SET_ISOCH_DELAY (between the two descriptor reads) - if let Err(e) = set_isoch_delay(state, slot_id) { - crate::serial_println!( - "[xhci] Port {}: SET_ISOCH_DELAY failed: {} (non-fatal)", port, e - ); + if let Err(_) = set_isoch_delay(state, slot_id) { } // Step 3: Full device descriptor (18 bytes) let mut desc_buf = [0u8; 18]; - if let Err(e) = get_device_descriptor(state, slot_id, &mut desc_buf) { - crate::serial_println!("[xhci] Port {}: get_device_descriptor(18) failed: {}", port, e); + if let Err(_) = get_device_descriptor(state, slot_id, &mut desc_buf) { continue; } // Step 4: BOS descriptor - if let Err(e) = get_bos_descriptor(state, slot_id) { - crate::serial_println!( - "[xhci] Port {}: GET_BOS_DESCRIPTOR failed: {} (non-fatal)", port, e - ); + if let Err(_) = get_bos_descriptor(state, slot_id) { } // Get Configuration Descriptor let mut config_buf = [0u8; 256]; let config_len = match get_config_descriptor(state, slot_id, &mut config_buf) { Ok(len) => len, - Err(e) => { - crate::serial_println!("[xhci] Port {}: get_config_descriptor failed: {}", port, e); + Err(_) => { continue; } }; + // Step 5b: String descriptors (matching Linux enumeration sequence). + // Linux reads string descriptors #0, #2, #1, #3 before ConfigureEndpoint. + // The Parallels virtual xHC may require this to fully initialize the device. + { + let desc = unsafe { &*(desc_buf.as_ptr() as *const DeviceDescriptor) }; + read_string_descriptors( + state, + slot_id, + desc.i_manufacturer, + desc.i_product, + desc.i_serial_number, + ); + } + // Configure HID devices - if let Err(e) = configure_hid(state, slot_id, &config_buf, config_len) { - crate::serial_println!("[xhci] Port {}: configure_hid failed: {}", port, e); + if let Err(_) = configure_hid(state, slot_id, &config_buf, config_len) { } } @@ -2919,11 +3191,10 @@ fn setup_xhci_msi(pci_dev: &crate::drivers::pci::Device) -> u32 { // Step 1: Find MSI capability in PCI config space let msi_cap = match pci_dev.find_msi_capability() { Some(offset) => { - crate::serial_println!("[xhci] Found MSI capability at PCI config offset {:#x}", offset); offset } None => { - crate::serial_println!("[xhci] No MSI capability found, using polling mode"); + xhci_trace_note(0, "no_msi_cap"); return 0; } }; @@ -2946,17 +3217,13 @@ fn setup_xhci_msi(pci_dev: &crate::drivers::pci::Device) -> u32 { crate::platform_config::gicv2m_spi_count(), ) } else { - crate::serial_println!("[xhci] GICv2m not found at {:#x}, using polling mode", PARALLELS_GICV2M_BASE); + xhci_trace_note(0, "err:gicv2m"); return 0; }; - crate::serial_println!( - "[xhci] GICv2m at {:#x}: SPI base={}, count={}", - base, spi_base, spi_count, - ); if spi_count == 0 { - crate::serial_println!("[xhci] GICv2m has no available SPIs"); + xhci_trace_note(0, "err:no_spis"); return 0; } @@ -2971,10 +3238,6 @@ fn setup_xhci_msi(pci_dev: &crate::drivers::pci::Device) -> u32 { pci_dev.configure_msi(msi_cap, msi_address, msi_data); pci_dev.disable_intx(); - crate::serial_println!( - "[xhci] MSI configured: address={:#010x} data={:#06x} (SPI {}, INTID {})", - msi_address, msi_data, spi, intid, - ); // Step 5: Configure GIC for this SPI (edge-triggered). // @@ -2983,7 +3246,6 @@ fn setup_xhci_msi(pci_dev: &crate::drivers::pci::Device) -> u32 { // doorbell writes, so the SPI won't fire even though it's enabled. gic::configure_spi_edge_triggered(intid); - crate::serial_println!("[xhci] GIC SPI {} configured (edge-triggered, INTID {})", spi, intid); intid } @@ -2999,16 +3261,7 @@ fn setup_xhci_msi(pci_dev: &crate::drivers::pci::Device) -> u32 { /// 6. Start the controller /// 7. Scan ports and enumerate connected USB devices pub fn init(pci_dev: &crate::drivers::pci::Device) -> Result<(), &'static str> { - crate::serial_println!("[xhci] Initializing XHCI controller..."); - crate::serial_println!( - "[xhci] PCI device: {:02x}:{:02x}.{} [{:04x}:{:04x}] IRQ={}", - pci_dev.bus, - pci_dev.device, - pci_dev.function, - pci_dev.vendor_id, - pci_dev.device_id, - pci_dev.interrupt_line, - ); + xhci_trace_note(0, "init_start"); // 1. Enable bus mastering + memory space pci_dev.enable_bus_master(); @@ -3016,54 +3269,28 @@ pub fn init(pci_dev: &crate::drivers::pci::Device) -> Result<(), &'static str> { // 2. Map BAR0 via HHDM let bar = pci_dev.get_mmio_bar().ok_or("XHCI: no MMIO BAR found")?; - crate::serial_println!( - "[xhci] BAR0: phys={:#010x} size={:#x}", - bar.address, - bar.size, - ); let base = HHDM_BASE + bar.address; // 3. Read capability registers let cap_word = read32(base); let cap_length = (cap_word & 0xFF) as u8; - let hci_version = (cap_word >> 16) & 0xFFFF; let hcsparams1 = read32(base + 0x04); - let hcsparams2 = read32(base + 0x08); + let _hcsparams2 = read32(base + 0x08); let hccparams1 = read32(base + 0x10); let db_offset = read32(base + 0x14) & !0x3u32; let rts_offset = read32(base + 0x18) & !0x1Fu32; let max_slots = (hcsparams1 & 0xFF) as u8; - let max_intrs = ((hcsparams1 >> 8) & 0x7FF) as u16; let max_ports = ((hcsparams1 >> 24) & 0xFF) as u8; let context_size = if hccparams1 & (1 << 2) != 0 { 64 } else { 32 }; // Check for scratchpad buffers - let scratch_hi = (hcsparams2 >> 21) & 0x1F; - let scratch_lo = (hcsparams2 >> 27) & 0x1F; - let num_scratch = (scratch_hi << 5) | scratch_lo; let op_base = base + cap_length as u64; let rt_base = base + rts_offset as u64; let db_base = base + db_offset as u64; - crate::serial_println!( - "[xhci] Capabilities: version={:#06x} caplength={} max_slots={} max_ports={} max_intrs={} ctx_size={} scratch={}", - hci_version, - cap_length, - max_slots, - max_ports, - max_intrs, - context_size, - num_scratch, - ); - crate::serial_println!( - "[xhci] Offsets: op={:#x} rt={:#x} db={:#x}", - cap_length, - rts_offset, - db_offset, - ); // 3b. Walk Extended Capabilities list for Supported Protocol info. // HCCPARAMS1 bits 31:16 = xECP (xHCI Extended Capabilities Pointer) in DWORDs from base. @@ -3078,29 +3305,15 @@ pub fn init(pci_dev: &crate::drivers::pci::Device) -> Result<(), &'static str> { if cap_id == 2 { // Supported Protocol Capability (ID=2) // DW0: cap_id(7:0), next(15:8), minor_rev(23:16), major_rev(31:24) - let minor_rev = (ecap_dw0 >> 16) & 0xFF; - let major_rev = (ecap_dw0 >> 24) & 0xFF; // DW1: Name String (ASCII, e.g., "USB ") - let name = read32(ecap_addr + 4); + let _name = read32(ecap_addr + 4); // DW2: compatible_port_offset(7:0), compatible_port_count(15:8), // protocol_defined(27:16), protocol_speed_id_count(31:28) - let dw2 = read32(ecap_addr + 8); - let port_offset = dw2 & 0xFF; - let port_count = (dw2 >> 8) & 0xFF; + let _dw2 = read32(ecap_addr + 8); // DW3: protocol slot type (3:0) let _dw3 = read32(ecap_addr + 12); - let name_bytes = name.to_le_bytes(); - crate::serial_println!( - "[xhci] Supported Protocol: USB {}.{} name='{}{}{}{}' ports={}-{} (offset={} count={})", - major_rev, minor_rev, - name_bytes[0] as char, name_bytes[1] as char, - name_bytes[2] as char, name_bytes[3] as char, - port_offset, port_offset + port_count - 1, - port_offset, port_count, - ); } else if cap_id != 0 { - crate::serial_println!("[xhci] ExtCap ID={} at offset {:#x}", cap_id, ecap_addr - base); } if next_ptr == 0 { @@ -3109,7 +3322,6 @@ pub fn init(pci_dev: &crate::drivers::pci::Device) -> Result<(), &'static str> { ecap_addr += next_ptr as u64 * 4; } } else { - crate::serial_println!("[xhci] No Extended Capabilities list"); } // 4. Stop controller: clear USBCMD.RS, wait for USBSTS.HCH @@ -3119,7 +3331,7 @@ pub fn init(pci_dev: &crate::drivers::pci::Device) -> Result<(), &'static str> { write32(op_base, usbcmd & !1); wait_for(|| read32(op_base + 0x04) & 1 != 0, 100_000) .map_err(|_| "XHCI: timeout waiting for HCH")?; - crate::serial_println!("[xhci] Controller stopped"); + xhci_trace_note(0, "ctrl_stopped"); } // 5. Reset: set USBCMD.HCRST, wait for clear @@ -3129,17 +3341,15 @@ pub fn init(pci_dev: &crate::drivers::pci::Device) -> Result<(), &'static str> { // Wait for CNR (Controller Not Ready, bit 11 of USBSTS) to clear wait_for(|| read32(op_base + 0x04) & (1 << 11) == 0, 100_000) .map_err(|_| "XHCI: timeout waiting for CNR clear")?; - crate::serial_println!("[xhci] Controller reset complete"); + xhci_trace_note(0, "ctrl_reset"); // 6. Set MaxSlotsEn let slots_en = max_slots.min(MAX_SLOTS as u8); write32(op_base + 0x38, slots_en as u32); // CONFIG register - crate::serial_println!("[xhci] MaxSlotsEn set to {}", slots_en); // 6b. Set DNCTRL (Device Notification Control) β€” match Linux (0x02) // Bit 1 (N1) enables Function Wake device notifications. write32(op_base + 0x14, 0x02); - crate::serial_println!("[xhci] DNCTRL set to {:#06x}", read32(op_base + 0x14)); // 7. Set DCBAAP (Device Context Base Address Array Pointer) let dcbaa_phys = virt_to_phys((&raw const DCBAA) as u64); @@ -3150,7 +3360,6 @@ pub fn init(pci_dev: &crate::drivers::pci::Device) -> Result<(), &'static str> { dma_cache_clean((*dcbaa).0.as_ptr() as *const u8, 256 * core::mem::size_of::()); } write64(op_base + 0x30, dcbaa_phys); - crate::serial_println!("[xhci] DCBAAP set to phys={:#010x}", dcbaa_phys); // 8. Set Command Ring Control Register (CRCR) let cmd_ring_phys = virt_to_phys((&raw const CMD_RING) as u64); @@ -3164,7 +3373,6 @@ pub fn init(pci_dev: &crate::drivers::pci::Device) -> Result<(), &'static str> { } // CRCR: physical address | RCS (Ring Cycle State) = 1 write64(op_base + 0x18, cmd_ring_phys | 1); - crate::serial_println!("[xhci] CRCR set to phys={:#010x}", cmd_ring_phys); // 9. Set up Event Ring for Interrupter 0 let event_ring_phys = virt_to_phys((&raw const EVENT_RING) as u64); @@ -3197,23 +3405,16 @@ pub fn init(pci_dev: &crate::drivers::pci::Device) -> Result<(), &'static str> { // ERSTBA (Event Ring Segment Table Base Address) - must be written AFTER ERSTSZ write64(ir0 + 0x10, erst_phys); - crate::serial_println!( - "[xhci] Event ring: phys={:#010x} ERST phys={:#010x}", - event_ring_phys, - erst_phys, - ); // 10. Enable interrupts on Interrupter 0 // Set IMOD (Interrupt Moderation) β€” match Linux (0xa0 = 160 * 250ns = 40Β΅s) write32(ir0 + 0x04, 0x000000a0); - crate::serial_println!("[xhci] IMOD set to {:#06x}", read32(ir0 + 0x04)); let iman = read32(ir0); write32(ir0, iman | 2); // IMAN.IE = 1 // 11. Start controller: USBCMD.RS=1, INTE=1 let usbcmd = read32(op_base); write32(op_base, usbcmd | 1 | (1 << 2)); // RS=1, INTE=1 - crate::serial_println!("[xhci] Controller started (USBCMD={:#010x})", read32(op_base)); // 12. Set up PCI MSI AFTER starting the controller. // @@ -3236,7 +3437,7 @@ pub fn init(pci_dev: &crate::drivers::pci::Device) -> Result<(), &'static str> { // Verify controller is running let usbsts = read32(op_base + 0x04); if usbsts & 1 != 0 { - crate::serial_println!("[xhci] WARNING: Controller halted after start (USBSTS={:#010x})", usbsts); + xhci_trace_note(0, "err:ctrl_halted"); } // 13. Create state with IRQ already set @@ -3255,6 +3456,7 @@ pub fn init(pci_dev: &crate::drivers::pci::Device) -> Result<(), &'static str> { kbd_nkro_endpoint: 0, mouse_slot: 0, mouse_endpoint: 0, + mouse_nkro_endpoint: 0, }; // 14. Scan ports and configure HID devices. @@ -3262,18 +3464,10 @@ pub fn init(pci_dev: &crate::drivers::pci::Device) -> Result<(), &'static str> { // MSI is configured at PCI level (address/data written to xHC before RS=1, // matching Linux's pci_alloc_irq_vectors). GIC SPI is NOT yet enabled β€” // enumeration uses direct event ring polling via wait_for_event/wait_for_command. - if let Err(e) = scan_ports(&mut xhci_state) { - crate::serial_println!("[xhci] Port scanning error: {}", e); + if let Err(_) = scan_ports(&mut xhci_state) { + xhci_trace_note(0, "err:port_scan"); } - crate::serial_println!( - "[xhci] Scan complete: kbd_slot={} kbd_ep={} kbd_nkro_ep={} mouse_slot={} mouse_ep={}", - xhci_state.kbd_slot, - xhci_state.kbd_endpoint, - xhci_state.kbd_nkro_endpoint, - xhci_state.mouse_slot, - xhci_state.mouse_endpoint, - ); // 15. Store state and set INITIALIZED before enabling GIC SPI. // @@ -3286,13 +3480,6 @@ pub fn init(pci_dev: &crate::drivers::pci::Device) -> Result<(), &'static str> { XHCI_INITIALIZED.store(true, Ordering::Release); // 16. Queue initial HID transfers. - // - // NOTE: test_sync_class_requests is intentionally DISABLED. It sends - // GET_REPORT on EP0 which writes stale data to KBD_REPORT_BUF. The Parallels - // xHCI emulation appears to cache this response and replay it on the interrupt - // endpoint, causing all interrupt transfers to return the GET_REPORT setup - // packet echo instead of actual HID reports. Linux doesn't do GET_REPORT - // during HID init β€” it just queues the interrupt URB and waits. let xhci_state_ref = unsafe { (*(&raw const XHCI_STATE)).as_ref().unwrap() }; @@ -3301,65 +3488,44 @@ pub fn init(pci_dev: &crate::drivers::pci::Device) -> Result<(), &'static str> { // This verifies SET_CONFIGURATION and Phase 3 didn't reset the endpoint states. dump_endpoint_contexts(xhci_state_ref); - // Queue initial HID transfer TRBs IMMEDIATELY after init. - // The endpoints are Running after ConfigureEndpoint. If we delay, the Parallels - // virtual xHC autonomously polls the interrupt endpoints and transitions them to - // Stopped state when the transfer ring is empty. With TRBs queued, the xHC has - // data to fetch and keeps the endpoints Running. - start_hid_polling(xhci_state_ref); - HID_POLLING_STARTED.store(true, Ordering::Release); - - // Synchronous diagnostic: wait for the first Transfer Event right after - // queueing TRBs. This happens during init (before timer), so we get - // immediate feedback without any concurrency issues. - crate::serial_println!("[xhci] Waiting for first Transfer Event (sync)..."); - unsafe { - let mut timeout = 5_000_000u32; - loop { - let ring = &raw const EVENT_RING; - let idx = EVENT_RING_DEQUEUE; - let cycle = EVENT_RING_CYCLE; - - dma_cache_invalidate( - &(*ring).0[idx] as *const Trb as *const u8, - core::mem::size_of::(), - ); - - let trb = core::ptr::read_volatile(&(*ring).0[idx]); - let trb_cycle = trb.control & 1 != 0; - - if trb_cycle == cycle { - let tt = trb.trb_type(); - let cc = trb.completion_code(); - let slot = trb.slot_id(); - let ep = (trb.control >> 16) & 0x1F; - crate::serial_println!( - "[xhci] SYNC event: type={} CC={} slot={} ep={} param={:#010x} status={:#010x} control={:#010x}", - tt, cc, slot, ep, trb.param, trb.status, trb.control, - ); - - // Advance dequeue - EVENT_RING_DEQUEUE = (idx + 1) % EVENT_RING_SIZE; - if EVENT_RING_DEQUEUE == 0 { - EVENT_RING_CYCLE = !cycle; - } - let ir0 = xhci_state_ref.rt_base + 0x20; - let erdp_phys = virt_to_phys(&raw const EVENT_RING as u64) - + (EVENT_RING_DEQUEUE as u64) * 16; - write64(ir0 + 0x18, erdp_phys | (1 << 3)); - break; + // Post-init Halted endpoint recovery. + // + // Keyboard interrupt IN endpoints (DCI=3, DCI=5) may be Halted due to CC=12 stale + // events from enumeration. We do NOT reset or requeue them β€” keyboard now uses EP0 + // GET_REPORT polling exclusively. Let the keyboard interrupt endpoints stay Halted. + // + // Mouse interrupt IN endpoints are reset/requeued if Halted (they may also be used). + { + let s = xhci_state_ref; + // Keyboard: just log state, do NOT reset (EP0 GET_REPORT polling handles input). + if s.kbd_slot != 0 { + let _kbd_boot_state = read_output_ep_state(s, s.kbd_slot, s.kbd_endpoint); + if s.kbd_nkro_endpoint != 0 { + let _kbd_nkro_state = read_output_ep_state(s, s.kbd_slot, s.kbd_nkro_endpoint); } - - timeout -= 1; - if timeout == 0 { - crate::serial_println!("[xhci] SYNC: No event within timeout (5M spins)"); - break; + } + let mouse_state = read_output_ep_state(s, s.mouse_slot, s.mouse_endpoint); + if mouse_state == 2 { + if let Err(_) = reset_halted_endpoint(s, s.mouse_slot, s.mouse_endpoint, 1) { } - core::hint::spin_loop(); + } else if s.mouse_slot != 0 { + } + let mouse2_state = read_output_ep_state(s, s.mouse_slot, s.mouse_nkro_endpoint); + if mouse2_state == 2 { + if let Err(_) = reset_halted_endpoint(s, s.mouse_slot, s.mouse_nkro_endpoint, 3) { + } + } else if s.mouse_nkro_endpoint != 0 { } } - crate::serial_println!("[xhci] Initialization complete (MSI IRQ={})", irq); + // Drain stale events and re-queue HID transfer TRBs. + // Initial TRBs were already queued inline in configure_hid() Phase 3 to prevent + // the Parallels vxHC from stopping endpoints during the scan_ports gap. + // start_hid_polling drains any leftover events and queues fresh TRBs. + start_hid_polling(xhci_state_ref); + HID_POLLING_STARTED.store(true, Ordering::Release); + + xhci_trace_note(0, "init_complete"); Ok(()) } @@ -3402,12 +3568,10 @@ pub fn handle_interrupt() { // before we touch xHC registers (which could trigger new MSIs). // clear_spi_pending removes any MSI that arrived between the GIC // delivering this interrupt and the disable taking effect. - crate::serial_aarch64::raw_serial_char(b'I'); // breadcrumb: ISR entry if state.irq != 0 { crate::arch_impl::aarch64::gic::disable_spi(state.irq); crate::arch_impl::aarch64::gic::clear_spi_pending(state.irq); } - crate::serial_aarch64::raw_serial_char(b'D'); // breadcrumb: SPI disabled // try_lock: IRQ context must never spin on a lock. let _guard = match XHCI_LOCK.try_lock() { @@ -3494,34 +3658,51 @@ pub fn handle_interrupt() { let report = &(*report_buf).0; super::hid::process_mouse_report(report); MSI_MOUSE_NEEDS_REQUEUE.store(true, Ordering::Release); - } - // EP0 GET_REPORT completion (DCI=1, boot keyboard) - else if endpoint == 1 && slot == state.kbd_slot - && EP0_POLL_STATE.load(Ordering::Acquire) == 1 + } else if slot == state.mouse_slot + && state.mouse_nkro_endpoint != 0 + && endpoint == state.mouse_nkro_endpoint { - let data_buf = &raw const CTRL_DATA_BUF; - dma_cache_invalidate((*data_buf).0.as_ptr(), 8); - let buf = &(*data_buf).0; - super::hid::process_keyboard_report(buf); - KBD_EVENT_COUNT.fetch_add(1, Ordering::Relaxed); - EP0_GET_REPORT_OK.fetch_add(1, Ordering::Relaxed); - EP0_POLL_STATE.store(0, Ordering::Release); + // Mouse2 (second mouse interface, DCI 5) + let report_buf = &raw const MOUSE2_REPORT_BUF; + dma_cache_invalidate((*report_buf).0.as_ptr(), 9); + let report = &(*report_buf).0; + super::hid::process_mouse_report(report); + MSI_MOUSE2_NEEDS_REQUEUE.store(true, Ordering::Release); + } else if slot == state.mouse_slot + && endpoint == 1 + && HID_TRBS_QUEUED.load(Ordering::Relaxed) + { + // EP0 GET_REPORT response consumed by MSI handler. + // The MSI fires before the timer event loop runs, so all + // GET_REPORT Transfer Events arrive here, not in poll_hid_events. + MOUSE_GET_REPORT_PENDING.store(false, Ordering::Release); + DIAG_FIRST_DB.store(cc, Ordering::Relaxed); + GET_REPORT_OK.fetch_add(1, Ordering::Relaxed); + let buf = &raw const CTRL_DATA_BUF; + dma_cache_invalidate((*buf).0.as_ptr(), 8); + let report = &(&(*buf).0)[..8]; + let snap = u64::from_le_bytes([ + report[0], report[1], report[2], report[3], + report[4], report[5], report[6], report[7], + ]); + LAST_GET_REPORT_U64.store(snap, Ordering::Relaxed); + if report.iter().any(|&b| b != 0) { + GET_REPORT_NONZERO.fetch_add(1, Ordering::Relaxed); + super::hid::process_mouse_report(report); + } } } else { - // Error CC (e.g., CC=12 Endpoint Not Enabled) β€” - // set recovery flags for poll_hid_events to handle. - // Don't attempt recovery from IRQ context. + // Error CC on HID interrupt endpoint. All error CCs (including + // CC=12) halt the endpoint on Parallels virtual xHC. Reset + // Endpoint is required to recover. The rate limiter in + // poll_hid_events caps reset rate to RESET_INTERVAL_TICKS to + // prevent command ring saturation. XO_ERR_COUNT.fetch_add(1, Ordering::Relaxed); XO_LAST_INFO.store( ((slot as u64) << 16) | ((endpoint as u64) << 8) | (cc as u64), Ordering::Relaxed, ); - if endpoint == 1 && slot == state.kbd_slot - && EP0_POLL_STATE.load(Ordering::Acquire) == 1 - { - EP0_GET_REPORT_ERR.fetch_add(1, Ordering::Relaxed); - EP0_POLL_STATE.store(0, Ordering::Release); - } else if slot == state.kbd_slot && endpoint == state.kbd_endpoint { + if slot == state.kbd_slot && endpoint == state.kbd_endpoint { NEEDS_RESET_KBD_BOOT.store(true, Ordering::Release); } else if slot == state.kbd_slot && state.kbd_nkro_endpoint != 0 @@ -3530,6 +3711,11 @@ pub fn handle_interrupt() { NEEDS_RESET_KBD_NKRO.store(true, Ordering::Release); } else if slot == state.mouse_slot && endpoint == state.mouse_endpoint { NEEDS_RESET_MOUSE.store(true, Ordering::Release); + } else if slot == state.mouse_slot + && state.mouse_nkro_endpoint != 0 + && endpoint == state.mouse_nkro_endpoint + { + NEEDS_RESET_MOUSE2.store(true, Ordering::Release); } } } @@ -3559,7 +3745,6 @@ pub fn handle_interrupt() { } } - crate::serial_aarch64::raw_serial_char(b'i'); // breadcrumb: ISR exit } // ============================================================================= @@ -3653,7 +3838,44 @@ pub fn poll_hid_events() { 0xFF, cc, Ordering::AcqRel, Ordering::Relaxed, ); - if cc == completion_code::SUCCESS || cc == completion_code::SHORT_PACKET { + // EP0 GET_REPORT response (non-blocking async path). + // Primary path: PENDING=true means we're expecting a response right now. + // Secondary path: PENDING=false (stale-cleared) but event still arrived β€” + // late responses are valid and must update gk/fd. + // Post-enumeration, the only EP0 events for mouse_slot are GET_REPORT. + if slot == state.mouse_slot + && endpoint == 1 + && MOUSE_GET_REPORT_PENDING.load(Ordering::Acquire) + { + MOUSE_GET_REPORT_PENDING.store(false, Ordering::Release); + // Record last CC seen (fd= heartbeat field, 0xFF = no event yet). + DIAG_FIRST_DB.store(cc, Ordering::Relaxed); + if cc == completion_code::SUCCESS || cc == completion_code::SHORT_PACKET { + GET_REPORT_OK.fetch_add(1, Ordering::Relaxed); + let buf = &raw const CTRL_DATA_BUF; + dma_cache_invalidate((*buf).0.as_ptr(), 8); + let report = &(&(*buf).0)[..8]; + if report.iter().any(|&b| b != 0) { + GET_REPORT_NONZERO.fetch_add(1, Ordering::Relaxed); + super::hid::process_mouse_report(report); + } + } + // Event consumed β€” advance dequeue and continue event loop + } else if slot == state.mouse_slot && endpoint == 1 { + // Late response: PENDING was stale-cleared but Transfer Event arrived + // anyway. Catch it here so gk and fd reflect these successes. + DIAG_FIRST_DB.store(cc, Ordering::Relaxed); + if cc == completion_code::SUCCESS || cc == completion_code::SHORT_PACKET { + GET_REPORT_OK.fetch_add(1, Ordering::Relaxed); + let buf = &raw const CTRL_DATA_BUF; + dma_cache_invalidate((*buf).0.as_ptr(), 8); + let report = &(&(*buf).0)[..8]; + if report.iter().any(|&b| b != 0) { + GET_REPORT_NONZERO.fetch_add(1, Ordering::Relaxed); + super::hid::process_mouse_report(report); + } + } + } else if cc == completion_code::SUCCESS || cc == completion_code::SHORT_PACKET { // NKRO keyboard interrupt endpoint (DCI 5, interface 1) // Parallels sends actual keystrokes on this endpoint. if slot == state.kbd_slot @@ -3699,7 +3921,7 @@ pub fn poll_hid_events() { super::hid::process_keyboard_report(report); let _ = queue_hid_transfer(state, 0, state.kbd_slot, state.kbd_endpoint); } - // Mouse interrupt endpoint event + // Mouse interrupt endpoint event (DCI 3) else if slot == state.mouse_slot && endpoint == state.mouse_endpoint { let report_buf = &raw const MOUSE_REPORT_BUF; dma_cache_invalidate((*report_buf).0.as_ptr(), 8); @@ -3707,17 +3929,16 @@ pub fn poll_hid_events() { super::hid::process_mouse_report(report); let _ = queue_hid_transfer(state, 1, state.mouse_slot, state.mouse_endpoint); } - // EP0 GET_REPORT completion (DCI=1, boot keyboard) - else if endpoint == 1 && slot == state.kbd_slot - && EP0_POLL_STATE.load(Ordering::Acquire) == 1 + // Mouse2 interrupt endpoint event (DCI 5) + else if slot == state.mouse_slot + && state.mouse_nkro_endpoint != 0 + && endpoint == state.mouse_nkro_endpoint { - let data_buf = &raw const CTRL_DATA_BUF; - dma_cache_invalidate((*data_buf).0.as_ptr(), 8); - let buf = &(*data_buf).0; - super::hid::process_keyboard_report(buf); - KBD_EVENT_COUNT.fetch_add(1, Ordering::Relaxed); - EP0_GET_REPORT_OK.fetch_add(1, Ordering::Relaxed); - EP0_POLL_STATE.store(0, Ordering::Release); + let report_buf = &raw const MOUSE2_REPORT_BUF; + dma_cache_invalidate((*report_buf).0.as_ptr(), 9); + let report = &(*report_buf).0; + super::hid::process_mouse_report(report); + let _ = queue_hid_transfer(state, 3, state.mouse_slot, state.mouse_nkro_endpoint); } else { XFER_OTHER_COUNT.fetch_add(1, Ordering::Relaxed); XO_LAST_INFO.store( @@ -3726,19 +3947,37 @@ pub fn poll_hid_events() { ); } } else { - // Error CC β€” set recovery flags + // Error CC on HID interrupt endpoint. All error CCs (including + // CC=12) halt the endpoint on Parallels virtual xHC. Reset + // Endpoint is required to recover. The rate limiter in the + // NEEDS_RESET_* block below caps reset rate to RESET_INTERVAL_TICKS + // to prevent command ring saturation. XFER_OTHER_COUNT.fetch_add(1, Ordering::Relaxed); XO_ERR_COUNT.fetch_add(1, Ordering::Relaxed); XO_LAST_INFO.store( ((slot as u64) << 16) | ((endpoint as u64) << 8) | (cc as u64), Ordering::Relaxed, ); - if endpoint == 1 && slot == state.kbd_slot - && EP0_POLL_STATE.load(Ordering::Acquire) == 1 + // Read endpoint state from output context on first error CC. + // Diagnostic: tells us the state after CC=12 (Running=1, Halted=2, etc.) + if DIAG_EP_STATE_AFTER_CC12.load(Ordering::Relaxed) == 0xFF + && slot > 0 + && (slot as usize) <= MAX_SLOTS { - EP0_GET_REPORT_ERR.fetch_add(1, Ordering::Relaxed); - EP0_POLL_STATE.store(0, Ordering::Release); - } else if slot == state.kbd_slot && endpoint == state.kbd_endpoint { + let slot_idx = (slot - 1) as usize; + let ep_out = DEVICE_CONTEXTS[slot_idx] + .0 + .as_ptr() + .add(endpoint as usize * state.context_size); + dma_cache_invalidate(ep_out, 4); + let dw0 = core::ptr::read_volatile(ep_out as *const u32); + let ep_state = dw0 & 0x7; + DIAG_EP_STATE_AFTER_CC12.store( + ((slot as u32) << 16) | ((endpoint as u32) << 8) | ep_state, + Ordering::Relaxed, + ); + } + if slot == state.kbd_slot && endpoint == state.kbd_endpoint { NEEDS_RESET_KBD_BOOT.store(true, Ordering::Release); } else if slot == state.kbd_slot && state.kbd_nkro_endpoint != 0 @@ -3747,6 +3986,11 @@ pub fn poll_hid_events() { NEEDS_RESET_KBD_NKRO.store(true, Ordering::Release); } else if slot == state.mouse_slot && endpoint == state.mouse_endpoint { NEEDS_RESET_MOUSE.store(true, Ordering::Release); + } else if slot == state.mouse_slot + && state.mouse_nkro_endpoint != 0 + && endpoint == state.mouse_nkro_endpoint + { + NEEDS_RESET_MOUSE2.store(true, Ordering::Release); } } } @@ -3774,7 +4018,7 @@ pub fn poll_hid_events() { } // Requeue HID transfers requested by the MSI interrupt handler. - // The IRQ handler can't requeue directly (MSI storm on virtual XHCI). + // The IRQ handler defers requeue to timer context (avoids MSI storm on virtual XHCI). if MSI_KBD_NEEDS_REQUEUE.swap(false, Ordering::AcqRel) && state.kbd_slot != 0 { let _ = queue_hid_transfer(state, 0, state.kbd_slot, state.kbd_endpoint); } @@ -3787,52 +4031,73 @@ pub fn poll_hid_events() { if MSI_MOUSE_NEEDS_REQUEUE.swap(false, Ordering::AcqRel) && state.mouse_slot != 0 { let _ = queue_hid_transfer(state, 1, state.mouse_slot, state.mouse_endpoint); } - - // EP0 GET_REPORT polling: queue periodic GET_REPORT on EP0 control pipe. - // Interrupt endpoints always return CC=12 on Parallels virtual xHC, but - // EP0 control transfers work. Poll at 4 Hz (every 50 timer ticks). - let poll = POLL_COUNT.load(Ordering::Relaxed); - if EP0_POLL_STATE.load(Ordering::Acquire) == 0 - && poll >= 400 // Wait 2 seconds after boot - && poll % 50 == 0 // 4 Hz + if MSI_MOUSE2_NEEDS_REQUEUE.swap(false, Ordering::AcqRel) + && state.mouse_slot != 0 + && state.mouse_nkro_endpoint != 0 { - queue_ep0_get_report(state); + let _ = queue_hid_transfer(state, 3, state.mouse_slot, state.mouse_nkro_endpoint); } - // Recover halted endpoints (CC=12 Endpoint Not Enabled, etc.) - // Reset Endpoint + Set TR Dequeue Pointer + requeue transfer TRB. - // Rate-limited to preserve command ring capacity (each reset uses 2 entries). - let resets_so_far = ENDPOINT_RESET_COUNT.load(Ordering::Relaxed); - if resets_so_far < MAX_ENDPOINT_RESETS { - if NEEDS_RESET_KBD_BOOT.swap(false, Ordering::AcqRel) - && state.kbd_slot != 0 - && state.kbd_endpoint != 0 - { + // Recover halted endpoints after errors. Rate-limited to RESET_INTERVAL_TICKS + // to prevent the CC=12 reset storm: on Parallels virtual xHC, CC=12 immediately + // halts the endpoint and occurs on every poll when no data is available. + // Without rate limiting, resets saturate the command ring at 200/s. + // With 20-tick backoff (100ms at 200Hz), resets cap at 10/s per endpoint. + let poll = POLL_COUNT.load(Ordering::Relaxed); + if NEEDS_RESET_KBD_BOOT.swap(false, Ordering::AcqRel) + && state.kbd_slot != 0 + && state.kbd_endpoint != 0 + { + let last = KBD_BOOT_RESET_POLL.load(Ordering::Relaxed); + if poll.saturating_sub(last) >= RESET_INTERVAL_TICKS { + KBD_BOOT_RESET_POLL.store(poll, Ordering::Relaxed); let _ = reset_halted_endpoint(state, state.kbd_slot, state.kbd_endpoint, 0); + } else { + NEEDS_RESET_KBD_BOOT.store(true, Ordering::Release); } - if NEEDS_RESET_KBD_NKRO.swap(false, Ordering::AcqRel) - && state.kbd_slot != 0 - && state.kbd_nkro_endpoint != 0 - { + } + if NEEDS_RESET_KBD_NKRO.swap(false, Ordering::AcqRel) + && state.kbd_slot != 0 + && state.kbd_nkro_endpoint != 0 + { + let last = KBD_NKRO_RESET_POLL.load(Ordering::Relaxed); + if poll.saturating_sub(last) >= RESET_INTERVAL_TICKS { + KBD_NKRO_RESET_POLL.store(poll, Ordering::Relaxed); let _ = reset_halted_endpoint(state, state.kbd_slot, state.kbd_nkro_endpoint, 2); + } else { + NEEDS_RESET_KBD_NKRO.store(true, Ordering::Release); } - if NEEDS_RESET_MOUSE.swap(false, Ordering::AcqRel) - && state.mouse_slot != 0 - && state.mouse_endpoint != 0 - { + } + if NEEDS_RESET_MOUSE.swap(false, Ordering::AcqRel) + && state.mouse_slot != 0 + && state.mouse_endpoint != 0 + { + let last = MOUSE_RESET_POLL.load(Ordering::Relaxed); + if poll.saturating_sub(last) >= RESET_INTERVAL_TICKS { + MOUSE_RESET_POLL.store(poll, Ordering::Relaxed); let _ = reset_halted_endpoint(state, state.mouse_slot, state.mouse_endpoint, 1); + } else { + NEEDS_RESET_MOUSE.store(true, Ordering::Release); + } + } + if NEEDS_RESET_MOUSE2.swap(false, Ordering::AcqRel) + && state.mouse_slot != 0 + && state.mouse_nkro_endpoint != 0 + { + let last = MOUSE2_RESET_POLL.load(Ordering::Relaxed); + if poll.saturating_sub(last) >= RESET_INTERVAL_TICKS { + MOUSE2_RESET_POLL.store(poll, Ordering::Relaxed); + let _ = reset_halted_endpoint(state, state.mouse_slot, state.mouse_nkro_endpoint, 3); + } else { + NEEDS_RESET_MOUSE2.store(true, Ordering::Release); } - } else { - // Clear flags without acting β€” command ring capacity exhausted - NEEDS_RESET_KBD_BOOT.store(false, Ordering::Relaxed); - NEEDS_RESET_KBD_NKRO.store(false, Ordering::Relaxed); - NEEDS_RESET_MOUSE.store(false, Ordering::Relaxed); } // Deferred MSI activation. // SPI 53 is enabled after a stabilization period (200 polls = 1 second) - // to avoid interfering with init. Initial TRBs are queued at poll=250 - // (after SPI enable) so the full interrupt pathway is active. + // to avoid interfering with init. Initial TRBs are queued at poll=300 + // (after SPI enable) so the full interrupt pathway is active when the xHC + // processes the first interrupt endpoint transfer. let poll = POLL_COUNT.load(Ordering::Relaxed); if state.irq != 0 && poll >= 200 { // Enable SPI for MSI delivery (handle_interrupt disables on each fire) @@ -3841,23 +4106,34 @@ pub fn poll_hid_events() { DIAG_SPI_ENABLE_COUNT.fetch_add(1, Ordering::Relaxed); } - // Deferred initial TRB queueing: queue the first interrupt TRBs AFTER - // SPI is enabled so the full MSIβ†’GIC SPIβ†’CPU ISRβ†’IMAN.IP ack pathway - // is active. This avoids the CC=12 (Endpoint Not Enabled) errors seen - // when TRBs are queued during init before the interrupt path is ready. + // Ensure HID_TRBS_QUEUED is set after initialization completes. if poll >= 250 && !HID_TRBS_QUEUED.load(Ordering::Acquire) { HID_TRBS_QUEUED.store(true, Ordering::Release); - if state.mouse_slot != 0 && state.mouse_endpoint != 0 { - let _ = queue_hid_transfer(state, 1, state.mouse_slot, state.mouse_endpoint); - } - if state.kbd_slot != 0 && state.kbd_endpoint != 0 { + } + + // Deferred keyboard interrupt TRB queue: queue the FIRST keyboard interrupt TRBs + // at poll=300, AFTER the SPI/MSI pathway is fully active. Queuing during init + // (before MSI) causes CC=12 on Parallels virtual xHCI. After MSI is enabled, the + // xHC can deliver Transfer Events to the CPU, and the interrupt endpoint works. + if poll == 300 + && state.kbd_slot != 0 + && !KBD_TRB_FIRST_QUEUED.load(Ordering::Acquire) + { + KBD_TRB_FIRST_QUEUED.store(true, Ordering::Release); + if state.kbd_endpoint != 0 { let _ = queue_hid_transfer(state, 0, state.kbd_slot, state.kbd_endpoint); } - if state.kbd_slot != 0 && state.kbd_nkro_endpoint != 0 { + if state.kbd_nkro_endpoint != 0 { let _ = queue_hid_transfer(state, 2, state.kbd_slot, state.kbd_nkro_endpoint); } } + // NOTE: Mouse EP0 GET_REPORT polling is disabled. + // The Parallels virtual xHC echoes the 8-byte setup packet back as the "data" + // response (LAST_GET_REPORT_U64 = 0x00080000010001a1 = GET_REPORT setup bytes), + // causing phantom mouse clicks (buttons=0xA1) and cursor drift (deltaX=1). + // Mouse input will be handled via interrupt IN endpoints when that path is working. + // Periodic diagnostic: dump controller + endpoint state every 2000 polls (~10s) if poll > 0 && poll % 2000 == 0 { unsafe { diff --git a/kernel/src/main_aarch64.rs b/kernel/src/main_aarch64.rs index 969ae12a..68093188 100644 --- a/kernel/src/main_aarch64.rs +++ b/kernel/src/main_aarch64.rs @@ -310,6 +310,7 @@ pub extern "C" fn kernel_main(hw_config_ptr: u64) -> ! { serial_println!(); serial_println!("========================================"); serial_println!(" Breenix ARM64 Kernel Starting"); + serial_println!(" BUILD_ID: {}", env!("BREENIX_BUILD_ID")); serial_println!("========================================"); serial_println!(); diff --git a/scripts/compare-xhci-traces.py b/scripts/compare-xhci-traces.py new file mode 100755 index 00000000..c68c529c --- /dev/null +++ b/scripts/compare-xhci-traces.py @@ -0,0 +1,372 @@ +#!/usr/bin/env python3 +"""Compare Breenix xHCI trace with Linux ftrace for head-to-head analysis. + +Usage: + python3 scripts/compare-xhci-traces.py \\ + --breenix /tmp/breenix-xhci-trace.txt \\ + --linux docs/linux-xhci-trace-raw.txt + +Parses both traces and produces a side-by-side comparison of: + - Command sequence (Enable Slot, Address Device, Configure Endpoint, etc.) + - Input Context fields (Control, Slot, EP DWORDs) + - Completion codes + - Endpoint states +""" + +import sys +import re +import argparse +from dataclasses import dataclass, field +from typing import Optional + +# Import parser functions from sibling module +sys.path.insert(0, sys.path[0]) +from importlib.util import spec_from_file_location, module_from_spec +import os + +# Re-use parse logic from parse-xhci-trace.py +SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) + + +def load_parser(): + """Load parse-xhci-trace.py as a module.""" + spec = spec_from_file_location( + "parse_xhci_trace", + os.path.join(SCRIPT_DIR, "parse-xhci-trace.py"), + ) + mod = module_from_spec(spec) + spec.loader.exec_module(mod) + return mod + + +# xHCI TRB type codes +TRB_ENABLE_SLOT = 9 +TRB_ADDRESS_DEVICE = 11 +TRB_CONFIGURE_ENDPOINT = 12 +TRB_STOP_ENDPOINT = 15 +TRB_SET_TR_DEQUEUE = 16 +TRB_COMMAND_COMPLETION = 33 + + +@dataclass +class LinuxCommand: + """A command extracted from Linux ftrace.""" + timestamp: float + trb_type: str # "Enable Slot", "Address Device", etc. + slot: int = 0 + flags: str = "" + completion_code: str = "" + raw_line: str = "" + + +@dataclass +class BreenixCommand: + """A command extracted from Breenix trace.""" + seq: int + trb_type: int + trb_type_name: str + slot: int + op: str = "" # CMD_SUBMIT, CMD_COMPLETE, XFER_SUBMIT, XFER_EVENT + param: int = 0 + cc: int = 0 + cc_name: str = "" + + +def parse_linux_ftrace(filepath: str) -> list: + """Parse Linux ftrace to extract xHCI commands and their completions.""" + commands = [] + + with open(filepath) as f: + lines = f.readlines() + + # Patterns for Linux ftrace xHCI events + cmd_pattern = re.compile( + r"(\d+\.\d+):\s+xhci_queue_trb:\s+CMD:\s+(.+)" + ) + event_pattern = re.compile( + r"(\d+\.\d+):\s+xhci_handle_event:\s+EVENT:\s+TRB\s+([0-9a-fA-F]+)\s+status\s+'([^']+)'\s+len\s+(\d+)\s+slot\s+(\d+)\s+ep\s+(\d+)\s+type\s+'([^']+)'" + ) + handle_cmd_pattern = re.compile( + r"(\d+\.\d+):\s+xhci_handle_command:\s+CMD:\s+(.+)" + ) + ctx_pattern = re.compile( + r"(\d+\.\d+):\s+xhci_(?:address|configure)_ctx:\s+(.+)" + ) + address_pattern = re.compile( + r"(\d+\.\d+):\s+xhci_address_ctx:\s+(.*?)Ctx Entries\s+(\d+).*?Port#\s+(\d+)/(\d+).*?Addr\s+(\d+)\s+State\s+(\S+)" + ) + configure_pattern = re.compile( + r"(\d+\.\d+):\s+xhci_configure_endpoint_ctx:\s+(.+)" + ) + + pending_cmd = None + + for line in lines: + line = line.strip() + + # Queue TRB (command submission) + m = cmd_pattern.search(line) + if m: + ts = float(m.group(1)) + cmd_str = m.group(2).strip() + cmd = LinuxCommand( + timestamp=ts, + trb_type=cmd_str.split(":")[0].strip() if ":" in cmd_str else cmd_str.split(" flags")[0].strip(), + raw_line=line, + ) + # Extract slot from flags like "b:C s:1" + slot_m = re.search(r's:(\d+)', cmd_str) + if slot_m: + cmd.slot = int(slot_m.group(1)) + commands.append(cmd) + pending_cmd = cmd + continue + + # Command completion event + m = event_pattern.search(line) + if m: + ts = float(m.group(1)) + status = m.group(3) + slot = int(m.group(5)) + event_type = m.group(7) + if event_type == "Command Completion Event" and pending_cmd: + pending_cmd.completion_code = status + pending_cmd.slot = slot if slot else pending_cmd.slot + continue + + return commands + + +def parse_breenix_trace(filepath: str) -> list: + """Parse Breenix trace dump to extract commands.""" + parser = load_parser() + + with open(filepath) as f: + text = f.read() + + trace_section = parser.extract_trace_section(text) + if not trace_section: + print(f"ERROR: No XHCI_TRACE_START/END in {filepath}") + return [] + + records = parser.parse_trace(trace_section) + commands = [] + + for rec in records: + if rec.op in ("CMD_SUBMIT", "CMD_COMPLETE", "XFER_SUBMIT", "XFER_EVENT"): + if len(rec.data) >= 16: + trb = parser.parse_trb(rec.data) + cmd = BreenixCommand( + seq=rec.seq, + trb_type=trb["trb_type"], + trb_type_name=trb["trb_type_name"], + slot=trb["slot_id"] or rec.slot, + op=rec.op, + param=trb["param"], + cc=trb["cc"], + cc_name=trb["cc_name"], + ) + commands.append(cmd) + + return commands, records + + +def compare_command_sequences(breenix_cmds, linux_cmds): + """Compare the command sequences between Breenix and Linux.""" + print(f"\n{'='*80}") + print("COMMAND SEQUENCE COMPARISON") + print(f"{'='*80}") + + # Filter to just CMD_SUBMIT records from Breenix (command ring submissions only) + breenix_submits = [c for c in breenix_cmds if c.op == "CMD_SUBMIT"] + + # Build a map of CMD_COMPLETE by seq proximity (next CMD_COMPLETE after each CMD_SUBMIT) + breenix_completions = [c for c in breenix_cmds if c.op == "CMD_COMPLETE"] + cc_map = {} # submit_seq -> completion + for sub in breenix_submits: + for comp in breenix_completions: + if comp.seq > sub.seq: + cc_map[sub.seq] = comp + break + + print(f" Breenix: {len(breenix_submits)} command submissions") + print(f" Linux: {len(linux_cmds)} commands") + print() + + # Compare command types in order + bi = 0 + li = 0 + matches = 0 + mismatches = 0 + + while bi < len(breenix_submits) and li < len(linux_cmds): + bc = breenix_submits[bi] + lc = linux_cmds[li] + + b_name = bc.trb_type_name + l_name = lc.trb_type + + # Normalize names for comparison + b_norm = b_name.lower().replace(" ", "_").replace("-", "_") + l_norm = l_name.lower().replace(" ", "_").replace("-", "_").replace("command", "").strip("_") + + matched = False + # Check if they're the same type of command + if b_norm == l_norm or b_name in l_name or l_name.startswith(b_name.split()[0]): + matched = True + + symbol = " " if matched else "!!" + + # Get completion code for Breenix command + comp = cc_map.get(bc.seq) + b_cc = f"CC={comp.cc_name}" if comp else "CC=?" + + print(f" {symbol} #{bi:3d} Breenix: {b_name:30s} slot={bc.slot:2d} {b_cc}") + print(f" {symbol} #{li:3d} Linux: {l_name:30s} slot={lc.slot:2d} CC={lc.completion_code}") + + if matched: + matches += 1 + else: + mismatches += 1 + print() + + bi += 1 + li += 1 + + print(f"\nSummary: {matches} matches, {mismatches} mismatches") + if bi < len(breenix_submits): + print(f" Breenix has {len(breenix_submits) - bi} extra commands:") + for i in range(bi, len(breenix_submits)): + bc = breenix_submits[i] + comp = cc_map.get(bc.seq) + b_cc = f"CC={comp.cc_name}" if comp else "" + print(f" #{i:3d} {bc.trb_type_name:30s} slot={bc.slot} {b_cc}") + if li < len(linux_cmds): + print(f" Linux has {len(linux_cmds) - li} extra commands:") + for i in range(li, len(linux_cmds)): + lc = linux_cmds[i] + print(f" #{i:3d} {lc.trb_type:30s} slot={lc.slot} CC={lc.completion_code}") + + +def compare_input_contexts(breenix_records, ctx_size=64): + """Display all Input Context snapshots from Breenix trace for manual comparison.""" + print(f"\n{'='*80}") + print("INPUT CONTEXT SNAPSHOTS (for manual comparison with Linux)") + print(f"{'='*80}") + + parser = load_parser() + + for rec in breenix_records: + if rec.op not in ("INPUT_CTX", "OUTPUT_CTX"): + continue + + ctx_type = "Input" if rec.op == "INPUT_CTX" else "Output" + print(f"\n--- {ctx_type} Context [seq={rec.seq} slot={rec.slot}] ---") + + entries = parser.parse_context(rec.data, ctx_size) + if rec.op == "INPUT_CTX": + labels = ["Control", "Slot"] + [f"EP{i}" for i in range(1, 32)] + else: + labels = ["Slot"] + [f"EP{i}" for i in range(1, 32)] + + for i, entry in enumerate(entries): + if all(dw == 0 for dw in entry) and i > 1: + continue + label = labels[i] if i < len(labels) else f"Entry{i}" + dw_strs = [f"{dw:08X}" for dw in entry[:8]] + print(f" {label:10s}: {' '.join(dw_strs)}") + + # Decode key fields + if label == "Control" and len(entry) >= 2: + drop_flags = entry[0] + add_flags = entry[1] + add_bits = [] + for bit in range(32): + if add_flags & (1 << bit): + add_bits.append(f"A{bit}") + print(f" Drop={drop_flags:#010x} Add={add_flags:#010x} ({'+'.join(add_bits)})") + + if label == "Slot" and len(entry) >= 4: + dw0 = entry[0] + ctx_entries = (dw0 >> 27) & 0x1F + speed = (dw0 >> 20) & 0xF + route = dw0 & 0xFFFFF + dw1 = entry[1] + port = (dw1 >> 16) & 0xFF + print(f" CtxEntries={ctx_entries} Speed={speed} Route={route:#07x} Port={port}") + + if label.startswith("EP") and len(entry) >= 5: + dw0 = entry[0] + interval = (dw0 >> 16) & 0xFF + mult = (dw0 >> 8) & 0x3 + ep_state = dw0 & 0x7 + + dw1 = entry[1] + max_pkt = (dw1 >> 16) & 0xFFFF + max_burst = (dw1 >> 8) & 0xFF + ep_type = (dw1 >> 3) & 0x7 + cerr = (dw1 >> 1) & 0x3 + + dw2 = entry[2] + dw3 = entry[3] + tr_deq = ((dw3 & 0xFFFFFFFF) << 32) | (dw2 & 0xFFFFFFF0) + dcs = dw2 & 1 + + dw4 = entry[4] + avg_trb = dw4 & 0xFFFF + max_esit_lo = (dw4 >> 16) & 0xFFFF + + ep_type_names = {0: "NotValid", 1: "IsochOut", 2: "BulkOut", 3: "IntrOut", + 4: "Control", 5: "IsochIn", 6: "BulkIn", 7: "IntrIn"} + state_names = {0: "Disabled", 1: "Running", 2: "Halted", 3: "Stopped", 4: "Error"} + + print(f" State={state_names.get(ep_state, '?')} Type={ep_type_names.get(ep_type, '?')} " + f"MaxPkt={max_pkt} MaxBurst={max_burst} CErr={cerr} Interval={interval} Mult={mult}") + print(f" TRDeq={tr_deq:#018x} DCS={dcs} AvgTRB={avg_trb} MaxESIT_Lo={max_esit_lo}") + + +def main(): + ap = argparse.ArgumentParser(description="Compare Breenix and Linux xHCI traces") + ap.add_argument("--breenix", required=True, help="Breenix serial log or extracted trace") + ap.add_argument("--linux", help="Linux ftrace file (optional)") + ap.add_argument("--ctx-size", type=int, default=32, help="Context entry size (32 or 64)") + args = ap.parse_args() + + # Parse Breenix trace + print(f"Parsing Breenix trace: {args.breenix}") + breenix_cmds, breenix_records = parse_breenix_trace(args.breenix) + print(f" Found {len(breenix_cmds)} command/event records, {len(breenix_records)} total records") + + # Parse Linux ftrace if provided + if args.linux: + print(f"Parsing Linux ftrace: {args.linux}") + linux_cmds = parse_linux_ftrace(args.linux) + print(f" Found {len(linux_cmds)} commands") + + # Command sequence comparison + compare_command_sequences(breenix_cmds, linux_cmds) + + # Always show Input/Output Context details + compare_input_contexts(breenix_records, args.ctx_size) + + # Show completion code summary + print(f"\n{'='*80}") + print("COMPLETION CODE SUMMARY") + print(f"{'='*80}") + for rec in breenix_records: + if rec.op in ("CMD_COMPLETE", "XFER_EVENT") and len(rec.data) >= 16: + parser = load_parser() + trb = parser.parse_trb(rec.data) + cc = trb["cc"] + cc_name = trb["cc_name"] + trb_type_name = trb["trb_type_name"] + slot = trb["slot_id"] + ep = trb["endpoint"] + if cc != 1 and cc != 13: # Not SUCCESS or SHORT_PACKET + print(f" !! seq={rec.seq:4d} {rec.op:14s} {trb_type_name:30s} slot={slot} ep={ep} CC={cc} ({cc_name})") + else: + print(f" seq={rec.seq:4d} {rec.op:14s} {trb_type_name:30s} slot={slot} ep={ep} CC={cc} ({cc_name})") + + +if __name__ == "__main__": + main() diff --git a/scripts/parallels/build-efi.sh b/scripts/parallels/build-efi.sh index df243d5a..d404d938 100755 --- a/scripts/parallels/build-efi.sh +++ b/scripts/parallels/build-efi.sh @@ -78,13 +78,17 @@ dd if=/dev/zero of="$EFI_IMG" bs=1m count=$IMG_SIZE_MB 2>/dev/null FAT_IMG="$OUTPUT_DIR/esp.fat32.img" dd if=/dev/zero of="$FAT_IMG" bs=1m count=$((IMG_SIZE_MB - 1)) 2>/dev/null -# Format as FAT32 using newfs_msdos (macOS) -if command -v newfs_msdos &>/dev/null; then - newfs_msdos -F 32 -S 512 "$FAT_IMG" 2>/dev/null +# Format as FAT32. Prefer mformat (mtools) since it works on raw files on macOS. +# newfs_msdos requires a block device and fails on plain files. +if command -v mformat &>/dev/null; then + mformat -i "$FAT_IMG" -F :: elif command -v mkfs.fat &>/dev/null; then mkfs.fat -F 32 "$FAT_IMG" +elif command -v newfs_msdos &>/dev/null; then + # newfs_msdos only works on block devices, not raw files; kept as last resort + newfs_msdos -F 32 -S 512 "$FAT_IMG" else - echo "ERROR: No FAT32 formatter found (need newfs_msdos or mkfs.fat)" + echo "ERROR: No FAT32 formatter found (need mtools/mformat, mkfs.fat, or newfs_msdos)" exit 1 fi diff --git a/scripts/parallels/deploy-to-vm.sh b/scripts/parallels/deploy-to-vm.sh index 0f264df5..8aa6f42e 100755 --- a/scripts/parallels/deploy-to-vm.sh +++ b/scripts/parallels/deploy-to-vm.sh @@ -1,116 +1,213 @@ #!/bin/bash -# Deploy the Breenix EFI disk image to a Parallels Desktop VM. +# Deploy Breenix to the Parallels Desktop VM. # -# Prerequisites: -# - Parallels Desktop installed with prlctl/prlsrvctl available -# - A VM named "breenix-dev" exists (or specify via --vm) -# - EFI image built via ./scripts/parallels/build-efi.sh +# This script packages the already-built kernel + UEFI loader into a +# Parallels .hdd disk image, reconfigures the VM, and optionally starts it. +# It does NOT build anything β€” run build-efi.sh --kernel first. # # Usage: -# ./scripts/parallels/deploy-to-vm.sh # Deploy to "breenix-dev" VM -# ./scripts/parallels/deploy-to-vm.sh --vm myvm # Deploy to specific VM -# ./scripts/parallels/deploy-to-vm.sh --boot # Deploy and boot -# ./scripts/parallels/deploy-to-vm.sh --serial # Deploy, boot, tail serial +# ./scripts/parallels/deploy-to-vm.sh # Deploy only (don't start) +# ./scripts/parallels/deploy-to-vm.sh --boot # Deploy and start VM +# +# Typical workflow: +# touch kernel/src/drivers/usb/xhci.rs +# scripts/parallels/build-efi.sh --kernel +# scripts/parallels/deploy-to-vm.sh --boot +# sleep 50 +# cat /tmp/breenix-parallels-serial.log | grep "BUILD_ID" set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" -EFI_IMG="$PROJECT_ROOT/target/parallels/breenix-efi.img" -VM_NAME="breenix-dev" -DO_BOOT=false -DO_SERIAL=false - -while [[ $# -gt 0 ]]; do - case "$1" in - --vm) VM_NAME="$2"; shift 2 ;; - --boot) DO_BOOT=true; shift ;; - --serial) DO_SERIAL=true; DO_BOOT=true; shift ;; - *) echo "Unknown argument: $1"; exit 1 ;; + +PARALLELS_DIR="$PROJECT_ROOT/target/parallels" +SERIAL_LOG="/tmp/breenix-parallels-serial.log" +HDD_DIR="$PARALLELS_DIR/breenix-efi.hdd" +EXT2_HDD_DIR="$PARALLELS_DIR/breenix-ext2.hdd" +EXT2_DISK="$PROJECT_ROOT/target/ext2-aarch64.img" +PARALLELS_VM="breenix-dev" +BOOT=false + +for arg in "$@"; do + case "$arg" in + --boot) BOOT=true ;; + --vm) PARALLELS_VM="$2"; shift ;; + *) echo "Unknown argument: $arg"; exit 1 ;; esac done -# Verify prerequisites +# Check for required tools if ! command -v prlctl &>/dev/null; then echo "ERROR: prlctl not found. Is Parallels Desktop installed?" exit 1 fi - -if [ ! -f "$EFI_IMG" ]; then - echo "ERROR: EFI image not found at $EFI_IMG" - echo "Run ./scripts/parallels/build-efi.sh first" +if ! command -v prl_disk_tool &>/dev/null; then + echo "ERROR: prl_disk_tool not found. Is Parallels Desktop installed?" exit 1 fi -# Check if VM exists -if ! prlctl list --all 2>/dev/null | grep -q "$VM_NAME"; then - echo "VM '$VM_NAME' not found. Available VMs:" - prlctl list --all - echo "" - echo "Create a VM with:" - echo " prlctl create $VM_NAME --ostype linux --arch aarch64" - echo " prlctl set $VM_NAME --efi-boot on" - echo " prlctl set $VM_NAME --device-set hdd0 --image $EFI_IMG --type plain" +# Verify built artifacts exist +LOADER_EFI="$PROJECT_ROOT/target/aarch64-unknown-uefi/release/parallels-loader.efi" +KERNEL_ELF="$PROJECT_ROOT/target/aarch64-breenix/release/kernel-aarch64" + +if [ ! -f "$LOADER_EFI" ]; then + echo "ERROR: UEFI loader not found at $LOADER_EFI" + echo "Run: cargo build --release --target aarch64-unknown-uefi -p parallels-loader" + exit 1 +fi +if [ ! -f "$KERNEL_ELF" ]; then + echo "ERROR: Kernel not found at $KERNEL_ELF" + echo "Run: scripts/parallels/build-efi.sh --kernel" exit 1 fi -# Stop VM if running -VM_STATUS=$(prlctl status "$VM_NAME" 2>/dev/null | awk '{print $NF}') -if [ "$VM_STATUS" = "running" ] || [ "$VM_STATUS" = "paused" ]; then - echo "Stopping VM '$VM_NAME'..." - prlctl stop "$VM_NAME" --kill 2>/dev/null || true - sleep 2 +LOADER_SIZE=$(stat -f%z "$LOADER_EFI" 2>/dev/null || stat -c%s "$LOADER_EFI") +KERNEL_SIZE=$(stat -f%z "$KERNEL_ELF" 2>/dev/null || stat -c%s "$KERNEL_ELF") +KERNEL_MTIME=$(stat -f "%Sm" "$KERNEL_ELF" 2>/dev/null || stat -c "%y" "$KERNEL_ELF") + +echo "=== Packaging Parallels EFI disk ===" +echo " Loader: $LOADER_SIZE bytes" +echo " Kernel: $KERNEL_SIZE bytes (built $KERNEL_MTIME)" + +# Check if kernel binary contains a BUILD_ID (diagnostic) +if command -v strings &>/dev/null; then + BUILD_ID_IN_BINARY=$(strings "$KERNEL_ELF" | grep "BUILD_ID:" | head -1 || true) + if [ -n "$BUILD_ID_IN_BINARY" ]; then + echo " $BUILD_ID_IN_BINARY" + else + echo " WARNING: No BUILD_ID found in kernel binary (stale build?)" + fi fi -# Attach the EFI disk image -echo "=== Deploying EFI Image to VM '$VM_NAME' ===" -echo "Image: $EFI_IMG ($(stat -f%z "$EFI_IMG" 2>/dev/null || stat -c%s "$EFI_IMG") bytes)" +mkdir -p "$PARALLELS_DIR" -# Remove existing disk and attach new one -# First, try to detach any existing hdd0 -prlctl set "$VM_NAME" --device-del hdd0 2>/dev/null || true +# Create GPT+FAT32 disk image using hdiutil (native macOS) +DMG_PATH="$PARALLELS_DIR/efi-temp.dmg" +rm -f "$DMG_PATH" +hdiutil create -size 64m -fs FAT32 -volname BREENIX -layout GPTSPUD "$DMG_PATH" >/dev/null 2>&1 -# Copy image to VM's directory for Parallels to manage -VM_DIR=$(prlctl list --info "$VM_NAME" 2>/dev/null | grep "Home:" | sed 's/.*Home: *//' | tr -d ' ') -if [ -z "$VM_DIR" ]; then - VM_DIR="$HOME/Parallels/$VM_NAME.pvm" +VOLUME=$(hdiutil attach "$DMG_PATH" 2>/dev/null | grep -o '/Volumes/[^ ]*' | head -1) +if [ -z "$VOLUME" ] || [ ! -d "$VOLUME" ]; then + echo "ERROR: Failed to mount FAT32 disk image" + rm -f "$DMG_PATH" + exit 1 fi -DEST_IMG="$VM_DIR/breenix-efi.img" -echo "Copying to: $DEST_IMG" -cp "$EFI_IMG" "$DEST_IMG" +mkdir -p "$VOLUME/EFI/BOOT" +mkdir -p "$VOLUME/EFI/BREENIX" +cp "$LOADER_EFI" "$VOLUME/EFI/BOOT/BOOTAA64.EFI" +cp "$KERNEL_ELF" "$VOLUME/EFI/BREENIX/KERNEL" +hdiutil detach "$VOLUME" >/dev/null 2>&1 + +# Convert DMG to raw disk image +RAW_IMG="$PARALLELS_DIR/efi-raw.img" +rm -f "$RAW_IMG" "${RAW_IMG}.cdr" +hdiutil convert "$DMG_PATH" -format UDTO -o "$RAW_IMG" >/dev/null 2>&1 +mv "${RAW_IMG}.cdr" "$RAW_IMG" +rm -f "$DMG_PATH" + +# Patch GPT partition type from "Microsoft Basic Data" to "EFI System Partition" +# so UEFI firmware recognizes the ESP and auto-boots BOOTAA64.EFI +python3 "$PROJECT_ROOT/scripts/parallels/patch-gpt-esp.py" "$RAW_IMG" + +# Wrap EFI disk in Parallels .hdd format +rm -rf "$HDD_DIR" +prl_disk_tool create --hdd "$HDD_DIR" --size 64M >/dev/null 2>&1 +HDS_FILE=$(find "$HDD_DIR" -name "*.hds" | head -1) +if [ -z "$HDS_FILE" ]; then + echo "ERROR: No .hds file found in $HDD_DIR" + rm -f "$RAW_IMG" + exit 1 +fi +cp "$RAW_IMG" "$HDS_FILE" +rm -f "$RAW_IMG" +echo " EFI disk: $HDD_DIR" + +# Wrap ext2 data disk if available +if [ -f "$EXT2_DISK" ]; then + EXT2_SIZE_MB=$(( ($(stat -f%z "$EXT2_DISK" 2>/dev/null || stat -c%s "$EXT2_DISK") + 1048575) / 1048576 )) + rm -rf "$EXT2_HDD_DIR" + prl_disk_tool create --hdd "$EXT2_HDD_DIR" --size "${EXT2_SIZE_MB}M" >/dev/null 2>&1 + EXT2_HDS=$(find "$EXT2_HDD_DIR" -name "*.hds" | head -1) + if [ -n "$EXT2_HDS" ]; then + cp "$EXT2_DISK" "$EXT2_HDS" + echo " ext2 disk: $EXT2_HDD_DIR (${EXT2_SIZE_MB}MB)" + fi +fi -# Attach as plain disk (not expanding) -prlctl set "$VM_NAME" --device-add hdd --image "$DEST_IMG" --type plain --position 0 2>/dev/null || \ - echo "WARNING: Could not attach disk via prlctl. You may need to attach it manually in Parallels settings." +echo "" +echo "=== Configuring Parallels VM '$PARALLELS_VM' ===" + +# Create VM if it doesn't exist +if ! prlctl list --all 2>/dev/null | grep -q "$PARALLELS_VM"; then + echo "Creating VM '$PARALLELS_VM'..." + prlctl create "$PARALLELS_VM" --ostype linux --distribution linux --no-hdd + prlctl set "$PARALLELS_VM" --memsize 2048 + prlctl set "$PARALLELS_VM" --cpus 4 +fi -# Ensure EFI boot is enabled -prlctl set "$VM_NAME" --efi-boot on 2>/dev/null || true +# Force-stop the VM +echo "Stopping VM (force kill)..." +prlctl stop "$PARALLELS_VM" --kill 2>/dev/null || true -echo "" -echo "=== Deployment Complete ===" - -if [ "$DO_BOOT" = true ]; then - echo "Starting VM '$VM_NAME'..." - prlctl start "$VM_NAME" - - if [ "$DO_SERIAL" = true ]; then - echo "Waiting for serial output..." - SERIAL_LOG="$VM_DIR/serial.log" - # Parallels serial port output - check common locations - sleep 3 - if [ -f "$SERIAL_LOG" ]; then - tail -f "$SERIAL_LOG" - else - echo "Serial log not found at $SERIAL_LOG" - echo "Configure serial port in Parallels VM settings to redirect to file." - echo "Check VM output in Parallels Desktop window." - fi +# Poll until confirmed stopped +for i in $(seq 1 20); do + VM_STATUS=$(prlctl status "$PARALLELS_VM" 2>/dev/null | awk '{print $NF}') + if [ "$VM_STATUS" = "stopped" ]; then + echo "VM is stopped." + break fi + if [ "$i" -eq 20 ]; then + echo "WARNING: VM did not stop after 20s. Proceeding anyway." + echo "If stuck, run: sudo pkill -9 -f prl_disp_service" + fi + sleep 1 +done + +# Configure VM: EFI boot, remove all SATA devices, attach our disks +prlctl set "$PARALLELS_VM" --efi-boot on 2>/dev/null || true + +for dev in hdd0 hdd1 hdd2 hdd3 cdrom0 cdrom1; do + prlctl set "$PARALLELS_VM" --device-del "$dev" 2>/dev/null || true +done + +prlctl set "$PARALLELS_VM" --device-add hdd --image "$HDD_DIR" --type plain --position 0 +if [ -d "$EXT2_HDD_DIR" ]; then + prlctl set "$PARALLELS_VM" --device-add hdd --image "$EXT2_HDD_DIR" --type plain --position 1 + echo " hdd0: EFI boot disk (FAT32) at sata:0" + echo " hdd1: ext2 data disk at sata:1" else - echo "To boot the VM:" - echo " prlctl start $VM_NAME" + echo " hdd0: EFI boot disk (FAT32) at sata:0" +fi + +prlctl set "$PARALLELS_VM" --device-bootorder "hdd0" 2>/dev/null || true + +# Configure serial port output to file +prlctl set "$PARALLELS_VM" --device-del serial0 2>/dev/null || true +prlctl set "$PARALLELS_VM" --device-add serial --output "$SERIAL_LOG" 2>/dev/null || true +prlctl set "$PARALLELS_VM" --device-set serial0 --connect 2>/dev/null || true + +# Delete NVRAM to ensure fresh UEFI boot state +VM_DIR="$HOME/Parallels/${PARALLELS_VM}.pvm" +if [ -f "$VM_DIR/NVRAM.dat" ]; then + rm -f "$VM_DIR/NVRAM.dat" + echo " NVRAM deleted (fresh UEFI state)" +fi + +# Truncate serial log +> "$SERIAL_LOG" +echo " Serial log truncated: $SERIAL_LOG" + +if [ "$BOOT" = true ]; then + echo "" + echo "=== Starting VM ===" + prlctl start "$PARALLELS_VM" + echo "VM started." echo "" - echo "To boot and watch serial:" - echo " ./scripts/parallels/deploy-to-vm.sh --serial" + echo "Monitor: tail -f $SERIAL_LOG" + echo "Stop: prlctl stop $PARALLELS_VM --kill" fi + +echo "" +echo "Deploy complete." diff --git a/scripts/parse-xhci-trace.py b/scripts/parse-xhci-trace.py new file mode 100755 index 00000000..d24fbbf5 --- /dev/null +++ b/scripts/parse-xhci-trace.py @@ -0,0 +1,300 @@ +#!/usr/bin/env python3 +"""Parse Breenix xHCI trace dump from serial log. + +Usage: + python3 scripts/parse-xhci-trace.py /tmp/breenix-parallels-serial.log + python3 scripts/parse-xhci-trace.py /tmp/breenix-xhci-trace.txt + +Extracts the trace section between XHCI_TRACE_START and XHCI_TRACE_END, +parses each record, and prints a human-readable summary. +""" + +import sys +import re +from dataclasses import dataclass, field +from typing import Optional + + +# xHCI TRB type names +TRB_TYPES = { + 1: "Normal", + 2: "Setup Stage", + 3: "Data Stage", + 4: "Status Stage", + 6: "Link", + 9: "Enable Slot", + 10: "Disable Slot", + 11: "Address Device", + 12: "Configure Endpoint", + 13: "Evaluate Context", + 14: "Reset Endpoint", + 15: "Stop Endpoint", + 16: "Set TR Dequeue Pointer", + 23: "No-Op", + 32: "Transfer Event", + 33: "Command Completion", + 34: "Port Status Change", +} + +CC_NAMES = { + 1: "SUCCESS", + 4: "USB_TRANSACTION_ERROR", + 6: "STALL_ERROR", + 12: "ENDPOINT_NOT_ENABLED", + 13: "SHORT_PACKET", +} + + +@dataclass +class TraceRecord: + seq: int + op: str + slot: int + dci: int + timestamp: int + data_len: int + data: bytes = field(default_factory=bytes) + note: str = "" + + +def parse_trb(data: bytes) -> dict: + """Parse a 16-byte TRB into param/status/control fields.""" + if len(data) < 16: + return {} + param = int.from_bytes(data[0:8], "little") + status = int.from_bytes(data[8:12], "little") + control = int.from_bytes(data[12:16], "little") + trb_type = (control >> 10) & 0x3F + cc = (status >> 24) & 0xFF + slot_id = (control >> 24) & 0xFF + ep = (control >> 16) & 0x1F + return { + "param": param, + "status": status, + "control": control, + "trb_type": trb_type, + "trb_type_name": TRB_TYPES.get(trb_type, f"Unknown({trb_type})"), + "cc": cc, + "cc_name": CC_NAMES.get(cc, f"Unknown({cc})"), + "slot_id": slot_id, + "endpoint": ep, + } + + +def parse_context(data: bytes, ctx_size: int = 64) -> list: + """Parse context bytes into DWORDs grouped by context entry.""" + entries = [] + offset = 0 + while offset + ctx_size <= len(data): + entry_dwords = [] + for dw_off in range(0, ctx_size, 4): + if offset + dw_off + 4 <= len(data): + dw = int.from_bytes(data[offset + dw_off : offset + dw_off + 4], "little") + entry_dwords.append(dw) + entries.append(entry_dwords) + offset += ctx_size + return entries + + +def format_trb(trb: dict, label: str = "") -> str: + """Format a parsed TRB for display.""" + parts = [f"{label}" if label else ""] + parts.append(f"type={trb['trb_type_name']}") + parts.append(f"param={trb['param']:#018x}") + if trb["cc"]: + parts.append(f"CC={trb['cc_name']}") + if trb["slot_id"]: + parts.append(f"slot={trb['slot_id']}") + if trb["endpoint"]: + parts.append(f"ep={trb['endpoint']}") + return " ".join(parts) + + +def format_context_entry(dwords: list, label: str) -> str: + """Format a context entry (list of DWORDs) for display.""" + dw_strs = [f"{dw:08X}" for dw in dwords[:8]] # First 8 DWORDs max + return f" {label}: {' '.join(dw_strs)}" + + +def extract_trace_section(text: str) -> str: + """Extract text between XHCI_TRACE_START and XHCI_TRACE_END markers.""" + start = text.find("=== XHCI_TRACE_START") + end = text.find("=== XHCI_TRACE_END ===") + if start < 0 or end < 0: + return "" + return text[start:end + len("=== XHCI_TRACE_END ===")] + + +def parse_trace(trace_text: str) -> list: + """Parse the trace dump into a list of TraceRecord objects.""" + records = [] + current_record = None + hex_data = bytearray() + + for line in trace_text.split("\n"): + line = line.strip() + if not line or line.startswith("===") or line == "(no records)": + continue + + # Record header: T NNNN OP_NAME S=NN E=NN TS=XXXXXXXXXXXXXXXX LEN=XXXX + m = re.match( + r"T\s+(\d+)\s+(\S+)\s+S=(\d+)\s+E=(\d+)\s+TS=([0-9A-Fa-f]+)\s+LEN=([0-9A-Fa-f]+)", + line, + ) + if m: + # Save previous record's data + if current_record is not None: + current_record.data = bytes(hex_data) + records.append(current_record) + hex_data = bytearray() + + current_record = TraceRecord( + seq=int(m.group(1)), + op=m.group(2), + slot=int(m.group(3)), + dci=int(m.group(4)), + timestamp=int(m.group(5), 16), + data_len=int(m.group(6), 16), + ) + continue + + # Note string: "some text" + if current_record and current_record.op == "NOTE" and line.startswith('"'): + current_record.note = line.strip('"') + continue + + # Hex data line: all hex digits and spaces (after strip, no leading whitespace) + if current_record and re.match(r"^[0-9A-Fa-f][0-9A-Fa-f ]+$", line): + # Parse hex bytes from groups separated by spaces + hex_str = line.replace(" ", "") + try: + hex_data.extend(bytes.fromhex(hex_str)) + except ValueError: + pass + + # Don't forget the last record + if current_record is not None: + current_record.data = bytes(hex_data) + records.append(current_record) + + return records + + +def print_records(records: list, ctx_size: int = 64): + """Print trace records in a human-readable format.""" + print(f"\n{'='*80}") + print(f"Breenix xHCI Trace: {len(records)} records") + print(f"{'='*80}\n") + + for rec in records: + ts_delta = "" # Could compute deltas if needed + header = f"[{rec.seq:4d}] {rec.op:12s} slot={rec.slot} dci={rec.dci} ts={rec.timestamp:#018x}" + + if rec.op == "NOTE": + print(f"{header} \"{rec.note}\"") + continue + + if rec.op in ("CMD_SUBMIT", "CMD_COMPLETE", "XFER_SUBMIT", "XFER_EVENT", "SET_TR_DEQ"): + if len(rec.data) >= 16: + trb = parse_trb(rec.data) + print(f"{header} {format_trb(trb)}") + else: + print(header) + continue + + if rec.op == "DOORBELL": + if len(rec.data) >= 8: + addr = int.from_bytes(rec.data[0:8], "little") + print(f"{header} addr={addr:#018x} target={rec.dci}") + else: + print(header) + continue + + if rec.op in ("MMIO_W32",): + if len(rec.data) >= 12: + addr = int.from_bytes(rec.data[0:8], "little") + val = int.from_bytes(rec.data[8:12], "little") + print(f"{header} [{addr:#018x}] <- {val:#010x}") + else: + print(header) + continue + + if rec.op in ("MMIO_W64",): + if len(rec.data) >= 16: + addr = int.from_bytes(rec.data[0:8], "little") + val = int.from_bytes(rec.data[8:16], "little") + print(f"{header} [{addr:#018x}] <- {val:#018x}") + else: + print(header) + continue + + if rec.op in ("INPUT_CTX", "OUTPUT_CTX"): + print(header) + entries = parse_context(rec.data, ctx_size) + labels = ["Control", "Slot"] + [f"EP{i}" for i in range(1, 32)] + if rec.op == "OUTPUT_CTX": + labels = ["Slot"] + [f"EP{i}" for i in range(1, 32)] + for i, entry in enumerate(entries): + if i < len(labels): + label = labels[i] + else: + label = f"Entry{i}" + # Skip all-zero entries beyond slot+control + if all(dw == 0 for dw in entry) and i > 1: + continue + print(format_context_entry(entry, label)) + continue + + if rec.op == "EP_STATE": + state = rec.data[0] if rec.data else 0 + state_names = {0: "Disabled", 1: "Running", 2: "Halted", 3: "Stopped", 4: "Error"} + print(f"{header} state={state} ({state_names.get(state, 'Unknown')})") + continue + + if rec.op == "CACHE_OP": + if len(rec.data) >= 12: + addr = int.from_bytes(rec.data[0:8], "little") + length = int.from_bytes(rec.data[8:12], "little") + print(f"{header} addr={addr:#018x} len={length}") + else: + print(header) + continue + + # Default: just print header + print(header) + + +def main(): + if len(sys.argv) < 2: + print(f"Usage: {sys.argv[0]} ") + sys.exit(1) + + with open(sys.argv[1], "r") as f: + text = f.read() + + trace_section = extract_trace_section(text) + if not trace_section: + print("ERROR: No XHCI_TRACE_START/END markers found in input") + sys.exit(1) + + records = parse_trace(trace_section) + if not records: + print("No trace records found") + sys.exit(1) + + # Try to detect context size from data + ctx_size = 32 # Parallels xHCI uses CSZ=0 (32-byte context entries) + print_records(records, ctx_size) + + # Summary statistics + op_counts = {} + for r in records: + op_counts[r.op] = op_counts.get(r.op, 0) + 1 + print(f"\n{'='*80}") + print("Operation Summary:") + for op, count in sorted(op_counts.items()): + print(f" {op:20s}: {count}") + + +if __name__ == "__main__": + main()