Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3c00454 authored by Kenji Kaneshige's avatar Kenji Kaneshige Committed by Jesse Barnes
Browse files

PCI: pciehp: wait 100 ms after Link Training check



If the port supports Link speeds greater than 5.0 GT/s, we must wait
for 100 ms after Link training completes before sending configuration
request.

Acked-by: default avatarYinghai Lu <yinghai@kernel.org>
Tested-by: default avatarYinghai Lu <yinghai@kernel.org>
Signed-off-by: default avatarKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent 0027cb3e
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -302,6 +302,14 @@ int pciehp_check_link_status(struct controller *ctrl)
		return retval;
	}

	/*
	 * If the port supports Link speeds greater than 5.0 GT/s, we
	 * must wait for 100 ms after Link training completes before
	 * sending configuration request.
	 */
	if (ctrl->pcie->port->subordinate->max_bus_speed > PCIE_SPEED_5_0GT)
		msleep(100);

	pcie_update_link_speed(ctrl->pcie->port->subordinate, lnk_status);

	return retval;