mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
PCI: rockchip: Fix negotiated lanes calculation
commit45e9320f3aupstream. The calculation of negotiated lanes is wrong: it should be shifted by PCIE_CORE_PL_CONF_LANE_SHIFT, but it is shifted by PCIE_CORE_PL_CONF_LANE_MASK instead. Let's fix it. Fixes:e77f847df5("PCI: rockchip: Add Rockchip PCIe controller support") Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
257349bedc
commit
6e4bcf8539
@@ -590,8 +590,8 @@ static int rockchip_pcie_init_port(struct rockchip_pcie *rockchip)
|
||||
|
||||
/* Check the final link width from negotiated lane counter from MGMT */
|
||||
status = rockchip_pcie_read(rockchip, PCIE_CORE_CTRL);
|
||||
status = 0x1 << ((status & PCIE_CORE_PL_CONF_LANE_MASK) >>
|
||||
PCIE_CORE_PL_CONF_LANE_MASK);
|
||||
status = 0x1 << ((status & PCIE_CORE_PL_CONF_LANE_MASK) >>
|
||||
PCIE_CORE_PL_CONF_LANE_SHIFT);
|
||||
dev_dbg(dev, "current link width is x%d\n", status);
|
||||
|
||||
rockchip_pcie_write(rockchip, ROCKCHIP_VENDOR_ID,
|
||||
|
||||
Reference in New Issue
Block a user