public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Gregory Fong <Gregory.Fong@virgingalactic.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] pci: don't skip vendor ID 0
Date: Wed, 25 Jan 2017 21:23:03 +0000	[thread overview]
Message-ID: <20170125212258.GA17043@10.34.70.57> (raw)
In-Reply-To: <CAEUhbmV5U7xA_JCPFutr=vjDkpn-Lfw1not7-UFhdkG7yy3hrQ@mail.gmail.com>

Hi Bin,

On Wed, Jan 25, 2017 at 10:14:56PM +0800, Bin Meng wrote:
> Hi Gregory,
> 
> On Wed, Jan 25, 2017 at 1:25 PM, Gregory Fong
> <Gregory.Fong@virgingalactic.com> wrote:
> > Unlike 0xffff, 0 is not an invalid vendor ID.
> >
> > Signed-off-by: Gregory Fong <gregory.fong@virgingalactic.com>
> > ---
> > Based on question initially asked here:
> > http://lists.denx.de/pipermail/u-boot/2016-December/276172.html
> >
> > I've been looking through the book I have on PCI and through various online
> > resources, and haven't been able to find evidence that a vendor ID of 0 is
> > invalid, even if it's unusual.  There are still issues in how this will be
> > handled in e.g. drivers/pci/pci_common.c because pci_hose_find_devices() still
> > assumes that a vendor and device ID of 0 mean that the last pci_device_id is
> > reached, but this change at least allows the device's PCI BARs to get
> > programmed if the vendor ID is 0.
> >
> > [snip]
> 
> Do you have such a PCI device that has the vendor ID as zero? Or have
> you ever seen such? If not, I would say let's leave this as it is.

Yes, this hardware does exist; that's the reason I stumbled across this
issue at all.  Without this change, the device's PCI BARs don't get
programmed, so it isn't usable after booting the OS.

I would have greatly preferred to be able to say that a vendor ID of 0
is invalid, but can't find any documentation to back up that assertion.
Hence the patch.

Best regards,
Gregory

  reply	other threads:[~2017-01-25 21:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25  5:25 [U-Boot] [PATCH] pci: don't skip vendor ID 0 Gregory Fong
2017-01-25 14:14 ` Bin Meng
2017-01-25 21:23   ` Gregory Fong [this message]
2017-01-26 10:08     ` Bin Meng
2017-01-26 12:26       ` Leon Woestenberg
2017-01-26 13:19         ` Gregory Fong
2017-01-26 13:57           ` Leon Woestenberg
2017-01-27  3:11             ` Gregory Fong

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=20170125212258.GA17043@10.34.70.57 \
    --to=gregory.fong@virgingalactic.com \
    --cc=u-boot@lists.denx.de \
    /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