All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Richard F <lists@keynet-technology.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: Hint HB6 - kernel doesn't see chips behind it.
Date: Fri, 29 Jan 2016 10:24:00 -0600	[thread overview]
Message-ID: <20160129162400.GB12965@localhost> (raw)
In-Reply-To: <56A9EC07.8080509@keynet-technology.com>

On Thu, Jan 28, 2016 at 10:23:03AM +0000, Richard F wrote:
> Bjorn,
> 
> Thanks for looking at it. Actually I've tried 3 different PCI cards in
> both slots and they all work fine.  I have 2 different single channel
> BT878 based PCI cards in there now capturing CCTV 24 x 7, the machine
> stays up for months. That's why it's so odd.  Any other pointers?  Does
> the kernel need the BIOS to detect the card right?

The kernel should at least discover the card even if the BIOS doesn't
do anything.  But on x86, the BIOS usually *does* configure things, so
it's very possible we could trip over a Linux defect if it doesn't.

Try booting with "pci=pcie_scan_all".  That *shouldn't* make a
difference because this isn't a PCIe device, but maybe our logic is
broken.

Your topology looks a little strange:

  00:1c.0 PCIe root port to [bus 01]    slot 0
  00:1c.1 PCIe root port to [bus 02]    slot 1
  00:1c.2 PCIe root port to [bus 03-05] slot 2
  03:00.0 PCI bridge to [bus 04-05] (Integrated Technology Express)
  04:01.0 PCI bridge to [bus 05] (Hint Corp)

00:1c.2 is a normal PCIe Root Port, so the device it's connected to
*should* be a PCIe device, but 03:00.0 doesn't have a PCIe capability.
Is this an adapter card of some kind?

03:00.0 is an ITE 8893, and we do have a quirk related to a similar
device:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/pci/quirks.c?h=v4.4#n3662

Can you try the patch below, please?

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 6d7ab9b..f6d8e85 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1530,6 +1530,7 @@ bool pci_bus_read_dev_vendor_id(struct pci_bus *bus, int devfn, u32 *l,
 	if (pci_bus_read_config_dword(bus, devfn, PCI_VENDOR_ID, l))
 		return false;
 
+	dev_info(&bus->dev, "%s %02x %#010x\n", __func__, devfn, *l);
 	/* some broken boards return 0 or ~0 if a slot is empty: */
 	if (*l == 0xffffffff || *l == 0x00000000 ||
 	    *l == 0x0000ffff || *l == 0xffff0000)
@@ -1571,6 +1572,7 @@ static struct pci_dev *pci_scan_device(struct pci_bus *bus, int devfn)
 	struct pci_dev *dev;
 	u32 l;
 
+	dev_info(&bus->dev, "%s %02x\n", __func__, devfn);
 	if (!pci_bus_read_dev_vendor_id(bus, devfn, &l, 60*1000))
 		return NULL;
 
@@ -1751,6 +1753,7 @@ struct pci_dev *pci_scan_single_device(struct pci_bus *bus, int devfn)
 {
 	struct pci_dev *dev;
 
+	dev_info(&bus->dev, "%s %02x\n", __func__, devfn);
 	dev = pci_get_slot(bus, devfn);
 	if (dev) {
 		pci_dev_put(dev);
@@ -1825,6 +1828,7 @@ int pci_scan_slot(struct pci_bus *bus, int devfn)
 	unsigned fn, nr = 0;
 	struct pci_dev *dev;
 
+	dev_info(&bus->dev, "%s %02x\n", __func__, devfn);
 	if (only_one_child(bus) && (devfn > 0))
 		return 0; /* Already scanned the entire slot */
 

  reply	other threads:[~2016-01-29 16:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-14 21:54 Hint HB6 - kernel doesn't see chips behind it Richard F
2016-01-15 17:26 ` Bjorn Helgaas
2016-01-17 21:04   ` Richard F
2016-01-18 14:48   ` Richard F
2016-01-19  3:38     ` Bjorn Helgaas
2016-01-19 10:16       ` Richard F
2016-01-19 17:41       ` Richard F
2016-01-27 14:54       ` Richard F
2016-01-27 21:55         ` Bjorn Helgaas
2016-01-28 10:23           ` Richard F
2016-01-29 16:24             ` Bjorn Helgaas [this message]
2016-01-30 17:54               ` Richard F
2016-02-01 19:06                 ` Bjorn Helgaas
2016-02-01 20:06                   ` Richard F
2016-02-01 23:35                     ` Bjorn Helgaas
2016-02-03 13:52                       ` Richard F
2016-02-03 15:51                         ` 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=20160129162400.GB12965@localhost \
    --to=helgaas@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lists@keynet-technology.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 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.