mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Ellerman <michael@ellerman.id.au>
To: Auke Kok <auke-jan.h.kok@intel.com>
Cc: linux-kernel@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz,
	gregkh@suse.de, grundler@parisc-linux.org, davem@davemloft.net,
	Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH] PCI: also read revision ID for sparc64, ppc, read class at the same time
Date: Sun, 10 Jun 2007 21:24:03 +1000	[thread overview]
Message-ID: <1181474643.8351.1.camel@concordia.ozlabs.ibm.com> (raw)
In-Reply-To: <20070609201221.5868.31948.stgit@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 1424 bytes --]

On Sat, 2007-06-09 at 13:12 -0700, Auke Kok wrote:
> Since the PCI bus class and revision are in the same dword, we
> can fill in both in the same read.
> 
> Other non-x86 arches use different methods to fill in these values,
> make sure to adjust those too.
> 
> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
> ---
> 
>  arch/powerpc/kernel/pci_64.c |    2 ++
>  arch/sparc64/kernel/pci.c    |    1 +
>  drivers/pci/probe.c          |    4 +---
>  3 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
> index 249cca2..b2c55ca 100644
> --- a/arch/powerpc/kernel/pci_64.c
> +++ b/arch/powerpc/kernel/pci_64.c
> @@ -367,8 +367,10 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
>  	sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus),
>  		dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn));
>  	dev->class = get_int_prop(node, "class-code", 0);
> +	dev->revision = get_int_prop(node, "revision-id", 0);

It's not clear to me in the spec if nodes are required to have the
"revision-id" property. I guess 0 is a safe default though.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2007-06-10 11:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-09 20:12 Auke Kok
2007-06-10  1:54 ` Grant Grundler
2007-06-22 17:12   ` Kok, Auke
2007-06-22 19:46     ` Greg KH
2007-06-10 11:24 ` Michael Ellerman [this message]
2007-06-10 12:17   ` Segher Boessenkool
2007-06-12  1:10     ` Michael Ellerman

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=1181474643.8351.1.camel@concordia.ozlabs.ibm.com \
    --to=michael@ellerman.id.au \
    --cc=auke-jan.h.kok@intel.com \
    --cc=davem@davemloft.net \
    --cc=gregkh@suse.de \
    --cc=grundler@parisc-linux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=paulus@samba.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

all inboxes | Powered by JetHome®