[libvirt] [PATCH 2_2/3] reattach pci device when pciBindDeviceToStub() failed

Wen Congyang wency at cn.fujitsu.com
Thu Apr 7 05:18:42 UTC 2011


At 04/07/2011 03:21 AM, Eric Blake Write:
> 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.

I fix these warning message grammar, and pushed these serial patches.
Thanks for reviewing.

> 




More information about the libvir-list mailing list