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]

 



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.

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
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