From: Stephen Hemminger <shemminger@linux-foundation.org>
To: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] iwlwifi MSI support (rev3)
Date: Thu, 14 Jun 2007 17:11:55 -0700 [thread overview]
Message-ID: <20070614171155.705371a2@localhost> (raw)
In-Reply-To: <4671C91E.4020800@garzik.org>
On Thu, 14 Jun 2007 19:02:54 -0400
Jeff Garzik <jeff@garzik.org> wrote:
> Stephen Hemminger wrote:
> > On Thu, 14 Jun 2007 14:52:42 -0400
> > Jeff Garzik <jeff@garzik.org> wrote:
> >
> >> Stephen Hemminger wrote:
> >>> The previous patch would crash on remove. pci_disable_msi has to be
> >>> called after free_irq. FYI - pci_disable_msi is safe if MSI hasn't been
> >>> enabled.
> >>>
> >>> --- a/drivers/net/wireless/mac80211/iwlwifi/base.c 2007-06-13 11:10:10.000000000 -0700
> >>> +++ b/drivers/net/wireless/mac80211/iwlwifi/base.c 2007-06-14 11:47:01.000000000 -0700
> >>> @@ -8117,10 +8117,13 @@ static int iwl_pci_probe(struct pci_dev
> >>> /* If power management is turned on, default to AC mode */
> >>> priv->power_mode = IWL_POWER_AC;
> >>> priv->user_txpower_limit = IWL_DEFAULT_TX_POWER;
> >>> +
> >>> + pci_enable_msi(pdev);
> >> The API wants fixing, if code that fails to check return value of
> >> pci_enable_msi() is being written.
> >>
> >> We should definitely be checking the return value there...
> >>
> >> Jeff
> >>
> >
> > I don't understand. pci_enable_msi() returns error if device doesn't
> > do MSI, that's fine.
>
> It also returns errors for conditions other than "doesn't do MSI", and
> therein lies the problem with not checking return values.
Errors:
Not MSI device - don't care
MSI disabled globally - don-t care
Already doing MSI-X - message already, don't care
Out of memory can't setup - don't care
The error codes are a mess so it is better to just not print anything
and just continue on with normal INT mode.
prev parent reply other threads:[~2007-06-15 0:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-14 18:48 [PATCH] iwlwifi MSI support (rev3) Stephen Hemminger
2007-06-14 18:52 ` Jeff Garzik
2007-06-14 20:17 ` Stephen Hemminger
2007-06-14 22:47 ` Stephen Hemminger
2007-06-14 23:02 ` Jeff Garzik
2007-06-15 0:11 ` Stephen Hemminger [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=20070614171155.705371a2@localhost \
--to=shemminger@linux-foundation.org \
--cc=linux-wireless@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.