[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230815175321.GA232277@bhelgaas>
Date: Tue, 15 Aug 2023 12:53:21 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Cc: linux-pci@...r.kernel.org, Saeed Mahameed <saeedm@...dia.com>,
Leon Romanovsky <leon@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Moshe Shemesh <moshe@...lanox.com>,
Netdev <netdev@...r.kernel.org>, linux-rdma@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] net/mlx5: Convert PCI error values to generic errnos
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
Powered by blists - more mailing lists