Re: [PATCH] PCI: check if bus has bridge device before triggering Secondary Bus Reset

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

 



Matthew Wilcox wrote:
On Fri, Jun 26, 2009 at 09:10:18AM +0800, Yu Zhao wrote:
@@ -2171,7 +2171,7 @@ static int pci_parent_bus_reset(struct pci_dev *dev, int probe)
 	u16 ctrl;
 	struct pci_dev *pdev;
 -	if (dev->subordinate)
+	if (dev->subordinate || !dev->bus->self)
We should use pci_is_root_bus(dev->bus) instead.
Some devices (e.g. Virtual Function) might not have intermediate bridge. So I prefer check the bus->self instead of bus->parent.

That doesn't sound right to me.  Virtual Functions should have the same
parent as the physical function which provides them.  Even if they're
on a different bus number.

Yes, VFs do have same bus parent as the PF they are associated with. However, the bus that VFs reside on may not have the bridge device (bus->self).

Thanks,
Yu

--
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