All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stuart Brady <sdbrady@ntlworld.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Add and use #defines for PCI device classes
Date: Sun, 1 Feb 2009 18:13:33 +0000	[thread overview]
Message-ID: <20090201181333.GA14375@miranda.arrow> (raw)
In-Reply-To: <20090201175609.GA14322@miranda.arrow>

On Sun, Feb 01, 2009 at 05:56:09PM +0000, Stuart Brady wrote:
> This patch adds and uses #defines for PCI device classes and subclases,
> using a new pci_config_set_class() function, similar to the recently
> added pci_config_set_vendor_id() and pci_config_set_device_id().

Sorry, forgot the:

Signed-off-by: Stuart Brady <stuart.brady@gmail.com>

BTW, I noticed a few oddities:

> Index: hw/openpic.c
> ===================================================================
[...]
> -        pci_conf[0x0a] = 0x80; // PIC
> -        pci_conf[0x0b] = 0x08;
> +        pci_config_set_class(pci_conf, PCI_CLASS_SYSTEM_OTHER); // FIXME?

Should that be PCI_CLASS_SYSTEM_PIC (0x0800) instead?

> Index: hw/versatile_pci.c
> ===================================================================
[...]
> -    d->config[0x0A] = 0x40; // class_sub = pci host
> -    d->config[0x0B] = 0x0b; // class_base = PCI_bridge
> +    pci_config_set_class(d->config, PCI_CLASS_PROCESSOR_CO);

The comment did not match the code, here...  PCI_CLASS_BRIDGE_HOST
sounds more likely to my ears... am I wrong?

> Index: hw/macio.c
> ===================================================================
[...]
> -
> -    d->config[0x0a] = 0x00; // class_sub = pci2pci
> -    d->config[0x0b] = 0xff; // class_base = bridge
> +    pci_config_set_class(d->config, PCI_CLASS_OTHERS << 8);

Again, the comment didn't match the code...

Cheers,
-- 
Stuart Brady

      parent reply	other threads:[~2009-02-01 18:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-01 17:56 [Qemu-devel] [PATCH] Add and use #defines for PCI device classes Stuart Brady
2009-02-01 18:12 ` Blue Swirl
2009-02-01 18:13 ` Stuart Brady [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=20090201181333.GA14375@miranda.arrow \
    --to=sdbrady@ntlworld.com \
    --cc=qemu-devel@nongnu.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 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.