#!/bin/sh
# DF-4258 — on a machine with a Myson NIC whose PHY is hung (or the card is
# gone while the driver stays loaded):
#   ifconfig my0 media autoselect
# never returns; the console shows the interface wedged (no watchdog output,
# 'my0: watchdog timeout' never fires because the serializer is held).
timeout 15 ifconfig my0 media autoselect
rc=$?
if [ $rc -eq 124 ]; then
	echo "REPRODUCED: ifconfig wedged >15s in unbounded PHY reset poll"
else
	echo "returned rc=$rc (PHY healthy; hang requires stuck BMCR reset bit)"
fi
