From: Bjorn Helgaas <helgaas@kernel.org>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: linux-pci@vger.kernel.org, Saeed Mahameed <saeedm@nvidia.com>,
Leon Romanovsky <leon@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Moshe Shemesh <moshe@mellanox.com>,
Netdev <netdev@vger.kernel.org>,
linux-rdma@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] net/mlx5: Convert PCI error values to generic errnos
Date: Tue, 15 Aug 2023 12:53:21 -0500 [thread overview]
Message-ID: <20230815175321.GA232277@bhelgaas> (raw)
In-Reply-To: <91ccdd4-797-5d8b-d5c9-5fef5742575@linux.intel.com>
On Tue, Aug 15, 2023 at 02:31:05PM +0300, Ilpo Järvinen wrote:
> On Mon, 14 Aug 2023, Bjorn Helgaas wrote:
> > On Mon, Aug 14, 2023 at 04:27:20PM +0300, Ilpo Järvinen wrote:
> > > mlx5_pci_link_toggle() returns mix PCI specific error codes and generic
> > > errnos.
> > > ...
> > > I wonder if these PCIBIOS_* error codes are useful at all?
> > > There's 1:1 mapping into errno values so no information loss if
> > > the functions would just return errnos directly. Perhaps this is
> > > just legacy nobody has bothered to remove? If nobody opposes, I
> > > could take a look at getting rid of them.
> >
> > I don't think the PCIBIOS error codes are very useful outside of
> > arch/x86. They're returned by x86 PCIBIOS functions, and I think we
> > still use those calls, but I don't think there's value in exposing the
> > x86 error codes outside arch/x86. Looks like a big job to clean it up
> > though ;)
>
> Hmm... Do you mean pci_bios_read/write() in arch/x86/pci/pcbios.c?
> ...Because those functions are already inconsistent even with themselves,
> returning either -EINVAL or the PCI BIOS error code (or what I assume that
> masking of result to yield).
I didn't look up the code; I just think we still use those PCIBIOS
calls in some cases, so we need to know how to interpret the error
values returned by the BIOS. IMHO it would be ideal if those PCIBIOS
errors got converted to Linux errnos before generic code saw them.
Bjorn
next prev parent reply other threads:[~2023-08-15 17:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-14 13:27 [PATCH 1/1] net/mlx5: Convert PCI error values to generic errnos Ilpo Järvinen
2023-08-14 22:32 ` Bjorn Helgaas
2023-08-15 11:31 ` Ilpo Järvinen
2023-08-15 17:53 ` Bjorn Helgaas [this message]
2023-08-16 21:45 ` Saeed Mahameed
2023-08-16 22:04 ` Bjorn Helgaas
2023-08-16 22:12 ` Saeed Mahameed
2023-08-16 22:15 ` Bjorn Helgaas
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=20230815175321.GA232277@bhelgaas \
--to=helgaas@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=moshe@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.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;
as well as URLs for NNTP newsgroup(s).