[PATCH v5 06/10] PCI: rockchip: fix missing phy manipulation for legacy phy
Shawn Lin
shawn.lin at rock-chips.com
Wed Aug 23 00:02:57 PDT 2017
For instance, if a EP connect to lane3 and work under lagecy
phy mode, so struct phy phys[0..2] are all NULL. In this case,
rockchip->lanes_map & BIT(i) will tell the driver that lane0 is
already inactive, but what we want actually is to power off
the phys[0] for legacy phy mode. Fix this by add checking of
rockchip->legacy_phy for rockchip_pcie_deinit_phys.
Signed-off-by: Shawn Lin <shawn.lin at rock-chips.com>
---
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None
drivers/pci/host/pcie-rockchip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c
index 9cd51e0..933e3e9 100644
--- a/drivers/pci/host/pcie-rockchip.c
+++ b/drivers/pci/host/pcie-rockchip.c
@@ -759,7 +759,7 @@ static void rockchip_pcie_deinit_phys(struct rockchip_pcie *rockchip)
for (i = 0; i < MAX_LANE_NUM; i++) {
/* inactive lane is already powered off */
- if (rockchip->lanes_map & BIT(i))
+ if (rockchip->legacy_phy || rockchip->lanes_map & BIT(i))
phy_power_off(rockchip->phys[i]);
phy_exit(rockchip->phys[i]);
}
--
1.9.1
More information about the Linux-rockchip
mailing list