mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
pci: replace the magic, 256, for the maximum of devfn
Introduce symbol PCI_SLOT_MAX for the # of slots, and replace the magic, 256. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
f64622c401
commit
90a20dbb28
2 changed files with 2 additions and 1 deletions
1
hw/pci.h
1
hw/pci.h
|
@ -16,6 +16,7 @@
|
|||
#define PCI_DEVFN(slot, func) ((((slot) & 0x1f) << 3) | ((func) & 0x07))
|
||||
#define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f)
|
||||
#define PCI_FUNC(devfn) ((devfn) & 0x07)
|
||||
#define PCI_SLOT_MAX 32
|
||||
#define PCI_FUNC_MAX 8
|
||||
|
||||
/* Class, Vendor and Device IDs from Linux's pci_ids.h */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue