From: Raag Jadav <raag.jadav@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: "Tauro, Riana" <riana.tauro@intel.com>,
intel-xe@lists.freedesktop.org, matthew.d.roper@intel.com,
soham.purkait@intel.com
Subject: Re: [PATCH v1] drm/xe/ras: Fix invalid health error code
Date: Tue, 4 Aug 2026 10:07:18 +0200 [thread overview]
Message-ID: <anGdtkV0o2JS_fxy@black.igk.intel.com> (raw)
In-Reply-To: <7514b3a7-ee80-4f1b-a2b2-aff3ea522ead@intel.com>
On Tue, Aug 04, 2026 at 08:56:12AM +0200, Michal Wajdeczko wrote:
> On 8/4/2026 8:36 AM, Tauro, Riana wrote:
> >
> > On 04-08-2026 10:42, Raag Jadav wrote:
> >> We use -EBADMSG for corrupted responses from sysctrl. Fix the error code.
> >
> > Let's keep it -EIO as it's more appropriate for sysctrl errors and consistent than
> >
> > #define EBADMSG 74 /* Not a data message */
The response size is valid, it's just the contents are corrupted. Similar
to what we did with commit 948eee331bef ("drm/xe/ras: Validate sysctrl
response") and more consistent here.
> btw, inside GuC CTB code we use
>
> -EPIPE // for corrupted message/channel
> -EPROTO // for unexpected content in the message
We have a bunch of these as a response status, check ras_status_to_errno().
The one proposed here is for the values deemed acceptable as per spec.
> as -EIO is too generic
Agree.
Raag
> >> Fixes: 53a7115f9862 ("drm/xe/xe_ras: Add RAS GPU health indicator")
> >> Signed-off-by: Raag Jadav <raag.jadav@intel.com>
> >> ---
> >> drivers/gpu/drm/xe/xe_ras.c | 4 ++--
> >> 1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/xe/xe_ras.c b/drivers/gpu/drm/xe/xe_ras.c
> >> index f7af4da8172c..bdad0621ae12 100644
> >> --- a/drivers/gpu/drm/xe/xe_ras.c
> >> +++ b/drivers/gpu/drm/xe/xe_ras.c
> >> @@ -700,7 +700,7 @@ static ssize_t gpu_health_show(struct device *dev, struct device_attribute *attr
> >> if (response.health >= XE_RAS_HEALTH_MAX) {
> >> xe_err(xe, "sysctrl: invalid health state %u\n",
> >> response.health);
> >> - return -EIO;
> >> + return -EBADMSG;
> >> }
> >> health = gpu_health_states[response.health];
> >> @@ -753,7 +753,7 @@ static ssize_t gpu_health_store(struct device *dev, struct device_attribute *att
> >> if (response.health >= XE_RAS_HEALTH_MAX) {
> >> xe_err(xe, "sysctrl: invalid health state %u\n",
> >> response.health);
> >> - return -EIO;
> >> + return -EBADMSG;
> >> }
> >> health = gpu_health_states[response.health];
>
next prev parent reply other threads:[~2026-08-04 8:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 5:12 [PATCH v1] drm/xe/ras: Fix invalid health error code Raag Jadav
2026-08-04 5:23 ` ✓ CI.KUnit: success for " Patchwork
2026-08-04 6:36 ` [PATCH v1] " Tauro, Riana
2026-08-04 6:56 ` Michal Wajdeczko
2026-08-04 8:07 ` Raag Jadav [this message]
2026-08-04 8:31 ` Tauro, Riana
2026-08-04 10:16 ` Raag Jadav
2026-08-04 6:41 ` ✓ Xe.CI.FULL: success for " Patchwork
2026-08-04 13:37 ` ✓ CI.KUnit: " Patchwork
2026-08-05 5:58 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-08-05 8:25 ` ✓ CI.KUnit: success for drm/xe/ras: Fix invalid health error code (rev2) Patchwork
2026-08-05 9:32 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-08-05 16:34 ` ✓ Xe.CI.FULL: success " 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=anGdtkV0o2JS_fxy@black.igk.intel.com \
--to=raag.jadav@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.d.roper@intel.com \
--cc=michal.wajdeczko@intel.com \
--cc=riana.tauro@intel.com \
--cc=soham.purkait@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.