]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
net: stmmac: allow a tc-taprio base-time of zero
authorVladimir Oltean <vladimir.oltean@nxp.com>
Mon, 8 Nov 2021 20:28:54 +0000 (22:28 +0200)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:48:38 +0000 (09:48 +0100)
BugLink: https://bugs.launchpad.net/bugs/1951822
[ Upstream commit f64ab8e4f368f48afb08ae91928e103d17b235e9 ]

Commit fe28c53ed71d ("net: stmmac: fix taprio configuration when
base_time is in the past") allowed some base time values in the past,
but apparently not all, the base-time value of 0 (Jan 1st 1970) is still
explicitly denied by the driver.

Remove the bogus check.

Fixes: b60189e0392f ("net: stmmac: Integrate EST with TAPRIO scheduler API")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c

index 8160087ee92f2fd4932581f1169635c0156b0177..1c4ea0b1b845b3c162f533656a0eadca56f8600e 100644 (file)
@@ -786,8 +786,6 @@ static int tc_setup_taprio(struct stmmac_priv *priv,
                goto disable;
        if (qopt->num_entries >= dep)
                return -EINVAL;
-       if (!qopt->base_time)
-               return -ERANGE;
        if (!qopt->cycle_time)
                return -ERANGE;