All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: "Grumbach, Emmanuel" <emmanuel.grumbach@intel.com>
Cc: "Coelho, Luciano" <luciano.coelho@intel.com>,
	Kalle Valo <kvalo@codeaurora.org>, Arnd Bergmann <arnd@arndb.de>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	"Beker, Ayala" <ayala.beker@intel.com>,
	"Korenblit, Miriam Rachel" <miriam.rachel.korenblit@intel.com>,
	"Berg, Johannes" <johannes.berg@intel.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] iwlwifi: work around reverse dependency on MEI
Date: Tue, 7 Dec 2021 14:25:52 +0100	[thread overview]
Message-ID: <CAK8P3a35HHPs2sMsfQ_SrX4DTKmzidFUOczu8khzwJJTAy++yw@mail.gmail.com> (raw)
In-Reply-To: <SA1PR11MB58258D60F7C1334471E2F434F26E9@SA1PR11MB5825.namprd11.prod.outlook.com>

On Tue, Dec 7, 2021 at 2:19 PM Grumbach, Emmanuel
<emmanuel.grumbach@intel.com> wrote:
> > A better option would be change iwl_mei_is_connected() so it could be
> > called from iwlwifi regardless of whether the mei driver is reachable, but that
> > requires a larger rework in the driver.
>
> I can try to do that but I don't really see how..
> I can't really make a function that would behave differently based on whether the symbol is available or not.

I meant that this would be an inline function that only accesses variables
that are available to the iwlwifi driver already, rather than part of the iwlmei
driver.

Part of the problem here is that the current implementation checks a global
variable that is part of the iwlmei driver, so there is no easy way for iwlwifi
to access it.

> >  config IWLMEI
> > -     tristate "Intel Management Engine communication over WLAN"
> > -     depends on INTEL_MEI
> > +     bool "Intel Management Engine communication over WLAN"
> > +     depends on INTEL_MEI=y || INTEL_MEI=IWLMVM
> > +     depends on IWLMVM=y || IWLWIFI=m
> >       depends on PM
> > -     depends on IWLMVM
> >       help
> >         Enables the iwlmei kernel module.
>
> Johannes suggested to make IWLMVM depend on IWLMEI || !IWLMEI
> That worked as well, I just had issues with this in our internal backport based tree.
> I need to spend a bit more time on this, but I admit my total ignorance in Kconfig's dialect.

It's still not enough, the dependency is in iwlwifi, not in iwlmvm, so it
would remain broken for IWLWIFI=y IWLMVM=m IWLMEI=m.

One easy solution might be to link all the iwlmei objects intro the main
iwlwifi driver, the same way it links in the fw/*.c files.

       Arnd

  reply	other threads:[~2021-12-07 13:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-07 12:54 [PATCH] iwlwifi: work around reverse dependency on MEI Arnd Bergmann
2021-12-07 13:19 ` Grumbach, Emmanuel
2021-12-07 13:25   ` Arnd Bergmann [this message]
2021-12-07 14:40     ` Johannes Berg
2021-12-07 14:56       ` Arnd Bergmann
2021-12-07 14:10 ` Arnd Bergmann

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=CAK8P3a35HHPs2sMsfQ_SrX4DTKmzidFUOczu8khzwJJTAy++yw@mail.gmail.com \
    --to=arnd@kernel.org \
    --cc=arnd@arndb.de \
    --cc=ayala.beker@intel.com \
    --cc=davem@davemloft.net \
    --cc=emmanuel.grumbach@intel.com \
    --cc=johannes.berg@intel.com \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luciano.coelho@intel.com \
    --cc=miriam.rachel.korenblit@intel.com \
    --cc=netdev@vger.kernel.org \
    /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.