mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 02:34:01 +08:00
pci-v5.8-fixes-1
-----BEGIN PGP SIGNATURE----- iQJIBAABCgAyFiEEgMe7l+5h9hnxdsnuWYigwDrT+vwFAl7/VbwUHGJoZWxnYWFz QGdvb2dsZS5jb20ACgkQWYigwDrT+vycww//ZRzj5OKP2H+J5LouaVYsltQtaqFb vNWIVjZnB2MbbNprDMtvulBI7+u2+j9TynlRQIAJKKIazKjtTjqApLDYlsIKXb5c fjmqGKIL72uFhIedP8eHif/WGgFTQqyD50M95Uiu9ik0AhgpLUkfordss4+2+fdk bDaXEXpaCkDjMcQ164lFxYrpBGih9YYvRShqfZmmcyfDJrxMfKXM0Iprx7MM8uTA 0BiUaayr1MRkWKGm+zT8MTeMZkalrfjMukyQnCeca19KFNe14m2GG/5mp94G8PZQ OflVjWkwoC5VCmn7bvY1rkUbqAmjIJURQVtnMo1D2UI01TPkHzIkH7ZBGOfouGib CCQuzw6UhPT8T41Lucd/+bxKj041wWYormgEq4oZX0hDPim0vxEg/hRONeZ2fDpO ZzFevKFYX643Gjb+c/dKsGfbOWWjE4FcD5slKVp0c4wAcNhq/p3wxJuDxkh9Gn2J YzIjLLsD3+sAndYn2PgfSLUpAQn3c3x02RbSzpEeqcFSo+Gq/4RCeX3kjAB9tzCL Trl+6lsSrAYNaiXgFWfmYXtdtUOnQljYOuQgrTtvu5ugaUxTy2oAhecLqsy68cf0 OBrzALIsN1xwbgGxak8dOzzcmHENmL246jI1GFU1VXpTvbvtO7r1prv8yVo04b8+ sBJDXRISQNYCaqY= =ydSI -----END PGP SIGNATURE----- Merge tag 'pci-v5.8-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fix from Bjorn Helgaas: "Fix a pcie_find_root_port() simplification that broke power management because it didn't handle the edge case of finding the Root Port of a Root Port itself (Mika Westerberg)"" * tag 'pci-v5.8-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: Make pcie_find_root_port() work for Root Ports
This commit is contained in:
commit
7fec3ce50a
@ -2169,12 +2169,11 @@ static inline int pci_pcie_type(const struct pci_dev *dev)
|
||||
*/
|
||||
static inline struct pci_dev *pcie_find_root_port(struct pci_dev *dev)
|
||||
{
|
||||
struct pci_dev *bridge = pci_upstream_bridge(dev);
|
||||
|
||||
while (bridge) {
|
||||
if (pci_pcie_type(bridge) == PCI_EXP_TYPE_ROOT_PORT)
|
||||
return bridge;
|
||||
bridge = pci_upstream_bridge(bridge);
|
||||
while (dev) {
|
||||
if (pci_is_pcie(dev) &&
|
||||
pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT)
|
||||
return dev;
|
||||
dev = pci_upstream_bridge(dev);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user