Message ID | 1447942912-24958-3-git-send-email-shmulik.ladkani@ravellosystems.com |
---|---|
State | New |
Headers | show |
Acked-by: Dmitry Fleytman <dmitry@daynix.com> > On 19 Nov 2015, at 16:21 PM, Shmulik Ladkani <shmulik.ladkani@ravellosystems.com> wrote: > > Report the 'express endpoint' capability if on a PCIE bus. > > Signed-off-by: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com> > --- > hw/scsi/vmw_pvscsi.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c > index df4d383..8854fd9 100644 > --- a/hw/scsi/vmw_pvscsi.c > +++ b/hw/scsi/vmw_pvscsi.c > @@ -1081,6 +1081,10 @@ pvscsi_init(PCIDevice *pci_dev) > > pvscsi_init_msi(s); > > + if (pci_bus_is_express(pci_dev->bus)) { > + pcie_endpoint_cap_init(pci_dev, 0); > + } > + > s->completion_worker = qemu_bh_new(pvscsi_process_completion_queue, s); > if (!s->completion_worker) { > pvscsi_cleanup_msi(s); > @@ -1189,6 +1193,7 @@ static void pvscsi_class_init(ObjectClass *klass, void *data) > k->subsystem_vendor_id = PCI_VENDOR_ID_VMWARE; > k->subsystem_id = PCI_DEVICE_ID_VMWARE_PVSCSI; > k->revision = 0x2; > + k->is_express = 1; > dc->reset = pvscsi_reset; > dc->vmsd = &vmstate_pvscsi; > dc->props = pvscsi_properties; > -- > 1.9.1 >
diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c index df4d383..8854fd9 100644 --- a/hw/scsi/vmw_pvscsi.c +++ b/hw/scsi/vmw_pvscsi.c @@ -1081,6 +1081,10 @@ pvscsi_init(PCIDevice *pci_dev) pvscsi_init_msi(s); + if (pci_bus_is_express(pci_dev->bus)) { + pcie_endpoint_cap_init(pci_dev, 0); + } + s->completion_worker = qemu_bh_new(pvscsi_process_completion_queue, s); if (!s->completion_worker) { pvscsi_cleanup_msi(s); @@ -1189,6 +1193,7 @@ static void pvscsi_class_init(ObjectClass *klass, void *data) k->subsystem_vendor_id = PCI_VENDOR_ID_VMWARE; k->subsystem_id = PCI_DEVICE_ID_VMWARE_PVSCSI; k->revision = 0x2; + k->is_express = 1; dc->reset = pvscsi_reset; dc->vmsd = &vmstate_pvscsi; dc->props = pvscsi_properties;
Report the 'express endpoint' capability if on a PCIE bus. Signed-off-by: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com> --- hw/scsi/vmw_pvscsi.c | 5 +++++ 1 file changed, 5 insertions(+)