From: Bjorn Helgaas <helgaas@kernel.org>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: [PATCH] PCI/VPD: Treat tag 0xff as indicator for missing VPD EPROM
Date: Mon, 2 Aug 2021 17:31:46 -0500 [thread overview]
Message-ID: <20210802223146.GA1470658@bjorn-Precision-5520> (raw)
In-Reply-To: <8de8c906-9284-93b9-bb44-4ffdc3470740@gmail.com>
On Thu, Jul 15, 2021 at 10:41:08AM +0200, Heiner Kallweit wrote:
> First tag being read as 0xff indicates a missing VPD EPROM, same as 0x00.
> The latter case we handle properly already, so let's handle 0x00 here too.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Applied to pci/vpd for v5.15 with small tweak so the error message can
be shared with other errors, thanks!
> ---
> drivers/pci/vpd.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/vpd.c b/drivers/pci/vpd.c
> index 26bf7c877..6a32d938d 100644
> --- a/drivers/pci/vpd.c
> +++ b/drivers/pci/vpd.c
> @@ -78,8 +78,8 @@ static size_t pci_vpd_size(struct pci_dev *dev, size_t old_size)
> while (off < old_size && pci_read_vpd(dev, off, 1, header) == 1) {
> unsigned char tag;
>
> - if (!header[0] && !off) {
> - pci_info(dev, "Invalid VPD tag 00, assume missing optional VPD EPROM\n");
> + if ((!header[0] || header[0] == 0xff) && !off) {
> + pci_info(dev, "Invalid VPD tag 00/FF, assume missing optional VPD EPROM\n");
> return 0;
> }
>
> --
> 2.32.0
>
prev parent reply other threads:[~2021-08-02 22:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-15 8:41 [PATCH] PCI/VPD: Treat tag 0xff as indicator for missing VPD EPROM Heiner Kallweit
2021-08-02 22:31 ` Bjorn Helgaas [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=20210802223146.GA1470658@bjorn-Precision-5520 \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=hkallweit1@gmail.com \
--cc=linux-pci@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox