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

Commit f9d29310 authored by Sunil Paidimarri's avatar Sunil Paidimarri
Browse files

net: stmmac: dwmac4_prog_mtl_tx_algorithms() missing write operation



Ported fix from 5.4:
The value of MTL_OPERATION_MODE is not written back.
Add check in ethqos to filter unsupported tx_sched_algorithm.

Signed-off-by: default avatarCheng Han <hancheng2009@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net&gt;.>

Change-Id: I329e00414e0942c542eba7ea1d3b24e450400066
Signed-off-by: default avatarSunil Paidimarri <hisunil@codeaurora.org>
parent 3db0f759
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1763,6 +1763,13 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
		return PTR_ERR(plat_dat);
	}

	if (plat_dat->tx_sched_algorithm == MTL_TX_ALGORITHM_WFQ ||
	    plat_dat->tx_sched_algorithm == MTL_TX_ALGORITHM_DWRR) {
		ETHQOSERR("WFO and DWRR TX Algorithm is not supported\n");
		ETHQOSDBG("Set TX Algorithm to default WRR\n");
		plat_dat->tx_sched_algorithm = MTL_TX_ALGORITHM_WRR;
	}

	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "rgmii");
	ethqos->rgmii_base = devm_ioremap_resource(&pdev->dev, res);
	if (IS_ERR(ethqos->rgmii_base)) {
+2 −0
Original line number Diff line number Diff line
@@ -194,6 +194,8 @@ static void dwmac4_prog_mtl_tx_algorithms(struct mac_device_info *hw,
	default:
		break;
	}

	writel_relaxed(value, ioaddr + MTL_OPERATION_MODE);
}

static void dwmac4_set_mtl_tx_queue_weight(struct mac_device_info *hw,