Fix pci_enable_capabilities to set the CAP feature in pci::status
commitd4164b262648afb1ab6cfb2c8657e81393fdb4a0
authorGregory Haskins <ghaskins@novell.com>
Mon, 20 Apr 2009 15:20:57 +0000 (20 11:20 -0400)
committerAvi Kivity <avi@redhat.com>
Tue, 21 Apr 2009 14:53:10 +0000 (21 17:53 +0300)
tree603acf1f747170a325bb702d5a8f978615009f8f
parentd54dd24d1ecf8d7cb7c93545d2e0ec77e265e889
Fix pci_enable_capabilities to set the CAP feature in pci::status

The PCI spec requires bit 4 of the config-space STATUS register to be set
in order to indicate that the capabilities pointer and capabilities area are
valid.  We have a pci_enable_capabilities() routine to fill out the
config-space metadata, but we leave the status bit cleared. It is not
apparent if this was intentionally omitted as part of the related
device-assignment support, or simply an oversight.  This patch completes
the function by also setting the status bit appropriately.

Signed-off-by: Gregory Haskins <ghaskins@novell.com>
CC: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
hw/pci.c