Linux wireless drivers development
 help / color / mirror / Atom feed
From: "Sverdlin, Alexander" <alexander.sverdlin@siemens.com>
To: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"johannes@sipsolutions.net" <johannes@sipsolutions.net>,
	"jerome.pouiller@silabs.com" <jerome.pouiller@silabs.com>
Cc: "linux-devel@silabs.com" <linux-devel@silabs.com>,
	"Stockmann, Lukas" <lukas.stockmann@siemens.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Salvatella, Gerard" <gerard.salvatella@siemens.com>
Subject: Re: [PATCH wireless-next 2/2] wifi: wfx: fix error code on unsupported firmware
Date: Mon, 7 Sep 2026 07:05:46 +0000	[thread overview]
Message-ID: <62cf4817d77e05091705df4126b860c7822b64fb.camel@siemens.com> (raw)
In-Reply-To: <3424781.oiGErgHkdL@nb0018864>

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

      reply	other threads:[~2026-09-07  7:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-06 20:47 [PATCH wireless-next 0/2] wifi: wfx: fix two minor issues in error paths Jérôme Pouiller
2026-09-06 20:47 ` [PATCH wireless-next 1/2] wifi: wfx: fix use-after-free of the cooling work on device removal Jérôme Pouiller
2026-09-07  9:11   ` Sverdlin, Alexander
2026-09-06 20:47 ` [PATCH wireless-next 2/2] wifi: wfx: fix error code on unsupported firmware Jérôme Pouiller
2026-09-07  6:20   ` Sverdlin, Alexander
2026-09-07  6:59     ` Jérôme Pouiller
2026-09-07  7:05       ` Sverdlin, Alexander [this message]

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=62cf4817d77e05091705df4126b860c7822b64fb.camel@siemens.com \
    --to=alexander.sverdlin@siemens.com \
    --cc=gerard.salvatella@siemens.com \
    --cc=jerome.pouiller@silabs.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-devel@silabs.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lukas.stockmann@siemens.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox