[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Add and use #defines for PCI device classes
From: |
Stuart Brady |
Subject: |
Re: [Qemu-devel] [PATCH] Add and use #defines for PCI device classes |
Date: |
Sun, 1 Feb 2009 18:13:33 +0000 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
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 <address@hidden>
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