From: Raag Jadav <raag.jadav@intel.com>
To: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
Cc: intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
rodrigo.vivi@intel.com, andrealmeid@igalia.com,
christian.koenig@amd.com, airlied@gmail.com,
simona.vetter@ffwll.ch, mripard@kernel.org,
maarten.lankhorst@linux.intel.com, tzimmermann@suse.de,
anshuman.gupta@intel.com, badal.nilawar@intel.com,
riana.tauro@intel.com, karthik.poosa@intel.com,
sk.anirban@intel.com
Subject: Re: [PATCH v6 3/5] drm/doc: Document DRM_WEDGE_RECOVERY_COLD_RESET recovery method
Date: Wed, 3 Jun 2026 13:21:57 +0200 [thread overview]
Message-ID: <aiAOVcoDXxAZXfVM@black.igk.intel.com> (raw)
In-Reply-To: <20260520113351.171119-10-mallesh.koujalagi@intel.com>
On Wed, May 20, 2026 at 05:03:55PM +0530, Mallesh Koujalagi wrote:
> When ``WEDGED=cold-reset`` is sent, it indicates that the device has
> encountered an error condition that cannot be resolved through other
> recovery methods such as driver rebind or bus reset, and requires a
> complete device power cycle to restore functionality.
...
> +Example - cold-reset
> +--------------------
> +
> +Udev rule::
> +
> + SUBSYSTEM=="drm", ENV{WEDGED}=="cold-reset", DEVPATH=="*/drm/card[0-9]",
> + RUN+="/path/to/cold-reset.sh $env{DEVPATH}"
> +
> +Recovery script::
> +
> + #!/bin/sh
> +
> + [ -z "$1" ] && echo "Usage: $0 <device-path>" && exit 1
> +
> + # Get device
> + DEVPATH=$(readlink -f /sys/$1/device 2>/dev/null || readlink -f /sys/$1)
> + DEVICE=$(basename $DEVPATH)
> +
> + echo "Cold reset: $DEVICE"
> +
> + # The PCI core exposes a 'slot' symlink on the device that sits in a
> + # registered hotplug slot. Use it directly instead of scanning every
> + # slot on the system.
> + SLOT=""
> + if [ -L "$DEVPATH/slot" ]; then
I think we'll need to iterate through the hierarchy to find it.
Raag
> + SLOT=$(basename "$(readlink -f "$DEVPATH/slot")")
> + fi
> +
> + if [ -n "$SLOT" ]; then
> + echo "Using slot $SLOT"
> +
> + # Remove device
> + echo 1 > /sys/bus/pci/devices/$DEVICE/remove
> +
> + # Power cycle slot. A platform-specific settle delay may be required
> + # between power off and power on; tune to the hardware as needed.
> + echo 0 > /sys/bus/pci/slots/$SLOT/power
> + echo 1 > /sys/bus/pci/slots/$SLOT/power
> +
> + # Rescan
> + echo 1 > /sys/bus/pci/rescan
> + echo "Done!"
> + else
> + echo "No slot found"
> + fi
> +
> Customization
> -------------
>
> --
> 2.34.1
>
next prev parent reply other threads:[~2026-06-03 11:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 11:33 [PATCH v6 0/5] Introduce cold reset recovery method Mallesh Koujalagi
2026-05-20 11:33 ` [PATCH v6 1/5] Introduce Xe Uncorrectable Error Handling Mallesh Koujalagi
2026-05-20 11:33 ` [PATCH v6 2/5] drm: Add DRM_WEDGE_RECOVERY_COLD_RESET recovery method Mallesh Koujalagi
2026-05-20 11:33 ` [PATCH v6 3/5] drm/doc: Document " Mallesh Koujalagi
2026-06-03 11:21 ` Raag Jadav [this message]
2026-05-20 11:33 ` [PATCH v6 4/5] drm/xe: Handle PUNIT errors by requesting cold-reset recovery Mallesh Koujalagi
2026-05-20 11:33 ` [PATCH v6 5/5] drm/xe: Suppress Surprise Link Down on non-hotplug device Mallesh Koujalagi
2026-05-20 12:33 ` ✗ CI.checkpatch: warning for Introduce cold reset recovery method (rev5) Patchwork
2026-05-20 12:34 ` ✓ CI.KUnit: success " Patchwork
2026-05-20 13:14 ` ✓ Xe.CI.BAT: " Patchwork
2026-05-20 23:35 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-05-26 4:47 ` ✗ CI.checkpatch: warning for Introduce cold reset recovery method (rev6) Patchwork
2026-05-26 4:49 ` ✓ CI.KUnit: success " Patchwork
2026-05-26 5:28 ` ✓ Xe.CI.BAT: " Patchwork
2026-05-26 6:31 ` ✗ Xe.CI.FULL: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aiAOVcoDXxAZXfVM@black.igk.intel.com \
--to=raag.jadav@intel.com \
--cc=airlied@gmail.com \
--cc=andrealmeid@igalia.com \
--cc=anshuman.gupta@intel.com \
--cc=badal.nilawar@intel.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=karthik.poosa@intel.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mallesh.koujalagi@intel.com \
--cc=mripard@kernel.org \
--cc=riana.tauro@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=simona.vetter@ffwll.ch \
--cc=sk.anirban@intel.com \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox