Skip to content

Commit 2061119

Browse files
committed
Merge branch 'pci/controller/dwc'
- Set PORT_LOGIC_LINK_WIDTH to one lane to make initial link training more robust; this will not affect the intended link width if all lanes are functional (Wenbin Yao) * pci/controller/dwc: PCI: dwc: Make link training more robust by setting PORT_LOGIC_LINK_WIDTH to one lane
2 parents 00c78a3 + af3c6ea commit 2061119

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/pci/controller/dwc/pcie-designware.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -797,22 +797,19 @@ static void dw_pcie_link_set_max_link_width(struct dw_pcie *pci, u32 num_lanes)
797797
/* Set link width speed control register */
798798
lwsc = dw_pcie_readl_dbi(pci, PCIE_LINK_WIDTH_SPEED_CONTROL);
799799
lwsc &= ~PORT_LOGIC_LINK_WIDTH_MASK;
800+
lwsc |= PORT_LOGIC_LINK_WIDTH_1_LANES;
800801
switch (num_lanes) {
801802
case 1:
802803
plc |= PORT_LINK_MODE_1_LANES;
803-
lwsc |= PORT_LOGIC_LINK_WIDTH_1_LANES;
804804
break;
805805
case 2:
806806
plc |= PORT_LINK_MODE_2_LANES;
807-
lwsc |= PORT_LOGIC_LINK_WIDTH_2_LANES;
808807
break;
809808
case 4:
810809
plc |= PORT_LINK_MODE_4_LANES;
811-
lwsc |= PORT_LOGIC_LINK_WIDTH_4_LANES;
812810
break;
813811
case 8:
814812
plc |= PORT_LINK_MODE_8_LANES;
815-
lwsc |= PORT_LOGIC_LINK_WIDTH_8_LANES;
816813
break;
817814
default:
818815
dev_err(pci->dev, "num-lanes %u: invalid value\n", num_lanes);

0 commit comments

Comments
 (0)