All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linas Vepstas <linas@austin.ibm.com>
To: long <tlnguyen@snoqualmie.dp.intel.com>
Cc: linux-kernel@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz,
	greg@kroah.com, tom.l.nguyen@intel.com
Subject: Re: [PATCH 1/6] PCI Express Advanced Error Reporting Driver
Date: Tue, 15 Mar 2005 16:51:01 -0600	[thread overview]
Message-ID: <20050315225101.GJ498@austin.ibm.com> (raw)
In-Reply-To: <200503120012.j2C0CIj4020297@snoqualmie.dp.intel.com>

Hi,

On Fri, Mar 11, 2005 at 04:12:18PM -0800, long was heard to remark:

> +void hw_aer_unregister(void)
> +{
> +	struct pci_dev *dev = (struct pci_dev*)host->dev;
> +	unsigned short id;
> +
> +	id = (dev->bus->number << 8) | dev->devfn;
> +	
> +	/* Unregister with AER Root driver */
> +	pcie_aer_unregister(id);
> +}

I don't understand how this can work on a system with 
more than one domain.  On any midrange/high-end system, 
you'll have a number of devices with identical values
for (bus->number << 8) | devfn)

For example, on my system, lspci prints out:

mosquito:~ # lspci
0000:00:01.0 Co-processor: IBM: Unknown device 00e0 (rev 01)
0000:00:03.0 ISA bridge: Symphony Labs W83C553 (rev 10)
0001:00:02.0 PCI bridge: IBM: Unknown device 0188 (rev 02)
0001:00:02.2 PCI bridge: IBM: Unknown device 0188 (rev 02)
0001:00:02.3 PCI bridge: IBM: Unknown device 0188 (rev 02)
0001:00:02.4 PCI bridge: IBM: Unknown device 0188 (rev 02)
0001:00:02.6 PCI bridge: IBM: Unknown device 0188 (rev 02)
0001:01:01.0 SCSI storage controller: LSI Logic / Symbios Logic 53c1010
66MHz  Ultra3 SCSI Adapter (rev 01)
0001:01:01.1 SCSI storage controller: LSI Logic / Symbios Logic 53c1010
66MHz  Ultra3 SCSI Adapter (rev 01)
0001:21:01.0 Ethernet controller: Intel Corp. 82557/8/9 [Ethernet Pro
100] (rev 0d)
0002:00:02.0 PCI bridge: IBM: Unknown device 0188 (rev 02)
0002:00:02.2 PCI bridge: IBM: Unknown device 0188 (rev 02)
0002:00:02.4 PCI bridge: IBM: Unknown device 0188 (rev 02)
0002:00:02.6 PCI bridge: IBM: Unknown device 0188 (rev 02)


Here, 'Unknown device' is actually an empty slot.

If I plugged the ethernet card in a few slots over, it would 
show up as

0002:01:01.0 Ethernet controller: Intel Corp. 82557/8/9 [Ethernet Pro

and so it would have the exact same (bus->number << 8) | devfn)
as the scsi device.

Or am I being stupid/dense/all-of-the-above?

--linas


  parent reply	other threads:[~2005-03-15 22:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-12  0:12 [PATCH 1/6] PCI Express Advanced Error Reporting Driver long
2005-03-12  9:37 ` Andi Kleen
2005-03-14 11:00 ` David Vrabel
2005-03-15 22:51 ` Linas Vepstas [this message]
2005-03-15 23:12   ` Grant Grundler
  -- strict thread matches above, loose matches on Subject: below --
2005-03-14 16:54 Nguyen, Tom L
2005-03-14 17:00 ` Randy.Dunlap
2005-03-14 20:01 Nguyen, Tom L
2005-03-15 23:59 Nguyen, Tom L

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=20050315225101.GJ498@austin.ibm.com \
    --to=linas@austin.ibm.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=tlnguyen@snoqualmie.dp.intel.com \
    --cc=tom.l.nguyen@intel.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.