add a new API pciDeviceReAttachInit() in pci.c to initialize state values for nodedev reattach
Initialize three state value of device driver to 1. This is just for a new call to
qemudNodeDeviceReAttach()
David S. Wang <dwang2@cisco.com>
Ruben Kerkhof <ruben@rubenkerkhof.com>
Scott Moser <smoser@ubuntu.com>
+ Guannan Ren <gren@redhat.com>
[....send patches to get your name here....]
pciDeviceListGet;
pciDeviceListNew;
pciDeviceListSteal;
+pciDeviceReAttachInit;
pciDeviceSetManaged;
pciFreeDevice;
pciGetDevice;
if (!pci)
return -1;
+ pciDeviceReAttachInit(pci);
+
qemuDriverLock(driver);
if (pciReAttachDevice(pci, driver->activePciHostdevs) < 0)
goto out;
return dev->managed;
}
+void pciDeviceReAttachInit(pciDevice *pci)
+{
+ pci->unbind_from_stub = 1;
+ pci->remove_slot = 1;
+ pci->reprobe = 1;
+}
+
+
pciDeviceList *
pciDeviceListNew(void)
{
void pciDeviceSetManaged(pciDevice *dev,
unsigned managed);
unsigned pciDeviceGetManaged(pciDevice *dev);
+void pciDeviceReAttachInit(pciDevice *dev);
pciDeviceList *pciDeviceListNew (void);
void pciDeviceListFree (pciDeviceList *list);