Re: [PATCH v3, part1 09/10] PCI, IOV: simplify IOV implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue 28 May 2013 10:00:26 AM CST, Yinghai Lu wrote:
> On Sat, May 25, 2013 at 6:48 AM, Jiang Liu <liuj97@xxxxxxxxx> wrote:
>> Trivial changes to IOV:
....
>> @@ -136,7 +123,8 @@ failed1:
>>         pci_dev_put(dev);
>>         mutex_lock(&iov->dev->sriov->lock);
>>         pci_stop_and_remove_bus_device(virtfn);
>> -       virtfn_remove_bus(dev->bus, virtfn_bus(dev, id));
>> +       virtfn_remove_bus(dev->bus, bus);
>> +failed0:
>
> need to swap above two lines. otherwise virtual bus could not be removed.
Hi Yinghai,
      Good catch, will merge following patch in next version.

diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
index 3e33499..bf0a32e 100644
--- a/drivers/pci/iov.c
+++ b/drivers/pci/iov.c
@@ -123,8 +123,9 @@ failed1:
        pci_dev_put(dev);
        mutex_lock(&iov->dev->sriov->lock);
        pci_stop_and_remove_bus_device(virtfn);
-       virtfn_remove_bus(dev->bus, bus);
 failed0:
+       if (bus)
+               virtfn_remove_bus(dev->bus, bus);
        mutex_unlock(&iov->dev->sriov->lock);

        return rc;
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux