From: Johannes Berg <johannes@sipsolutions.net>
To: "Coelho, Luciano" <luciano.coelho@intel.com>,
"lenb@kernel.org" <lenb@kernel.org>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: iwlwifi 0000:3a:00.0: Microcode SW error detected. Restarting 0x2000000.
Date: Wed, 12 Jan 2022 10:35:02 +0100 [thread overview]
Message-ID: <770267e4ad06661383dd16afbd51690cfad58d49.camel@sipsolutions.net> (raw)
In-Reply-To: <9644c62f580e30a2b7fc3d62b67db0b1e64872c7.camel@intel.com>
On Wed, 2022-01-12 at 09:33 +0000, Coelho, Luciano wrote:
> On Wed, 2022-01-12 at 10:27 +0100, Johannes Berg wrote:
> > >
> > > diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> > > b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> > > index 863fec150e53..f13825185094 100644
> > > --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> > > +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> > > @@ -834,6 +834,9 @@ static int iwl_mvm_sar_geo_init(struct iwl_mvm
> > > *mvm)
> > > offsetof(struct
> > > iwl_geo_tx_power_profiles_cmd_v4, ops) !=
> > > offsetof(struct
> > > iwl_geo_tx_power_profiles_cmd_v5, ops));
> > >
> > > + if (!iwl_sar_geo_support(&mvm->fwrt))
> > > + return -EOPNOTSUPP;
> > > +
> > > /* the ops field is at the same spot for all versions, so
> > > set in v1 */
> > > cmd.v1.ops = cpu_to_le32(IWL_PER_CHAIN_OFFSET_SET_TABLES);
> >
> > I was going to say it should probably return 0, but the caller looks
> > a
> > bit fishy too?
> >
> > ret = iwl_mvm_sar_init(mvm);
> > if (ret == 0)
> > ret = iwl_mvm_sar_geo_init(mvm);
> > else if (ret < 0)
> > goto error;
> >
> > ret = iwl_mvm_sgom_init(mvm);
> >
> > should that "else" be removed?
>
> Yeah, I noticed the same thing when I checked the return value... I
> don't think we want to abort everything if SAR GEO init failed, so
> maybe we should just remove the return value from the function?
>
Well the only real failure path there is "we cannot send the command",
in which case we might as well abort?
IOW, we already return 0 in the cases where we don't have the data or
something else happened (also for !CONFIG_ACPI).
johannes
next prev parent reply other threads:[~2022-01-12 9:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-12 1:47 iwlwifi 0000:3a:00.0: Microcode SW error detected. Restarting 0x2000000 Len Brown
2022-01-12 8:34 ` Johannes Berg
2022-01-12 9:05 ` Coelho, Luciano
2022-01-12 9:27 ` Johannes Berg
2022-01-12 9:33 ` Coelho, Luciano
2022-01-12 9:35 ` Johannes Berg [this message]
2022-01-12 9:40 ` Coelho, Luciano
2022-01-12 14:58 ` Len Brown
2022-01-12 15:42 ` Coelho, Luciano
2022-01-12 18:14 ` Len Brown
2022-01-12 18:49 ` Len Brown
2022-01-13 8:51 ` Coelho, Luciano
2022-01-27 18:28 ` Coelho, Luciano
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=770267e4ad06661383dd16afbd51690cfad58d49.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=lenb@kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=luciano.coelho@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox