Re: [PATCH wireless-next 2/2] wifi: wfx: fix error code on unsupported firmware
From: Sverdlin, Alexander
Date: Mon Sep 07 2026 - 03:31:47 EST
Hi Jérôme,
On Mon, 2026-09-07 at 08:59 +0200, Jérôme Pouiller wrote:
> > > The 'secure link' feature is not supported by upstream (the reference
> > > code relies on mbedTLS to implement it, which is not an option for the
> > > Linux kernel).
> > >
> > > If the firmware enforce the 'secure link' feature, wfx_probe() exits
> > > early. However, err still holds the value returned by the previous call
> > > to wait_for_completion_timeout(), which is the number of jiffies left
> > > before the timeout, hence strictly positive (the zero case is handled
> > > just above).
> > >
> > > wfx_probe() therefore returns a positive value. The bus probe functions
> > > forward it as-is and the driver core negates it (see really_probe()).
> > > The device does not get bound, which is the expected outcome, but the
> > > reported error code is a meaningless negative jiffies count instead of
> > ^^^^^^^^
> > minor: I suppose it should have read "positive"
>
> I mean, really_probe() inverts the value:
>
> /*
> * Return probe errors as positive values so that the callers
> * can distinguish them from other errors.
> */
> ret = -ret;
> goto probe_failed;
>
> So, the jiffies count become negative
you are right, I didn't realize the above explains the driver core ;-)
Thanks for explanation and sorry for the noise!
--
Alexander Sverdlin
Siemens AG
www.siemens.com