[libvirt] [PATCH 2_2/3] reattach pci device when pciBindDeviceToStub() failed
Eric Blake
eblake at redhat.com
Wed Apr 6 19:21:03 UTC 2011
On 04/06/2011 01:13 AM, Wen Congyang wrote:
>
> We should bind pci device to original driver when pciBindDeviceToStub() failed.
> If the pci device is not bound to any driver before calling pciBindDeviceToStub(),
> we should only unbind it from pci-stub. If it is bound to pci-stub, we should not
> unbid it from pci-stub.
s/unbid/unbind/
> +remove_id:
> /* If 'remove_id' exists, remove the device id from pci-stub's dynamic
> * ID table so that 'drivers_probe' works below.
> */
> if (pciDriverFile(&path, driver, "remove_id") < 0) {
> + /* We do not remove PCI ID from pci-stub, and we can not reprobe it */
> + if (dev->reprobe) {
> + VIR_WARN("Not remove PCI ID '%s' from %s, and the device can"
> + "not be reprobed again.", dev->id, driver);
s/Not remove/Could not remove/
s/can not/cannot/
s/reprobed again/probed again/
> @@ -1018,6 +1086,13 @@ pciBindDeviceToStub(pciDevice *dev, const char *driver)
> virReportSystemError(errno,
> _("Failed to remove PCI ID '%s' from %s"),
> dev->id, driver);
> +
> + /* remove PCI ID from pci-stub failed, and we can not reprobe it */
> + if (dev->reprobe) {
> + VIR_WARN("Faile to remove PCI ID '%s' from %s, and the device can"
> + "not be reprobed again.", dev->id, driver);
s/Faile /Failed /
s/reprobed again/probed again/
ACK with those warning message grammar cleanups.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110406/ad493b0a/attachment-0001.sig>
More information about the libvir-list
mailing list