#!/bin/sh
# DF-3601 trigger: hdaa reconfig sysctl self-deadlock
# Preconditions: snd_hda loaded, hdaa0 attached, run as root.
set -x
kldload snd_hda
sleep 2
sysctl dev.hdaa.0.%desc
# negative control: a tree-neutral hdaa sysctl write (quirks re-parse, no device tree mutation)
sysctl "dev.hdaa.0.config=softpcmvol"
# THE TRIGGER: mutates device tree from inside sysctl handler
timeout 15 sysctl dev.hdaa.0.reconfig=1
echo "TRIGGER RETURNED rc=$? (124 = hung)"
