[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f975bf41-fb1f-4429-9a4d-681aee10924a@nvidia.com>
Date: Fri, 14 Nov 2025 15:41:57 -0800
From: John Hubbard <jhubbard@...dia.com>
To: Alexandre Courbot <acourbot@...dia.com>,
Danilo Krummrich <dakr@...nel.org>
Cc: Joel Fernandes <joelagnelf@...dia.com>, Timur Tabi <ttabi@...dia.com>,
Alistair Popple <apopple@...dia.com>, Edwin Peer <epeer@...dia.com>,
Zhi Wang <zhiw@...dia.com>, David Airlie <airlied@...il.com>,
Simona Vetter <simona@...ll.ch>, Bjorn Helgaas <bhelgaas@...gle.com>,
Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <lossin@...nel.org>, Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
nouveau@...ts.freedesktop.org, rust-for-linux@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>,
Nouveau <nouveau-bounces@...ts.freedesktop.org>
Subject: Re: [PATCH v8 4/6] gpu: nova-core: use ENOTSUPP for unsupported GPUs,
in all cases
On 11/14/25 7:03 AM, Alexandre Courbot wrote:
> On Fri Nov 14, 2025 at 11:41 AM JST, John Hubbard wrote:
>> Some places in the driver use ENODEV for unsupported GPUs, while others
>> use ENOTSUPP. ENOTSUPP is more accurate, so change the ENODEV instances
>> to ENOTSUPP.
>
> Mmm actually I suspect we do want to return `ENODEV` in those cases, for
> the driver core to interpret the error as "I reject this particular
> device":
>
> https://elixir.bootlin.com/linux/v6.13/source/drivers/base/dd.c#L588
>
OK, so I guess I'll drop this patch and use ENODEV for this situation,
for now at least.
Later, separately, I might just go on a tiny crusade to improve the
driver base, such as:
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 13ab98e033ea..100fd8886b8d 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -588,6 +588,7 @@ static int call_driver_probe(struct device *dev, const struct device_driver *drv
dev_dbg(dev, "Driver %s requests probe deferral\n", drv->name);
break;
case -ENODEV:
+ case -ENOTSUPP:
case -ENXIO:
dev_dbg(dev, "probe with driver %s rejects match %d\n",
drv->name, ret);
thanks,
--
John Hubbard
Powered by blists - more mailing lists