Commit a423cbe0 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'dsa-hellcreek-fixes'



Kurt Kanzenbach says:

====================
net: dsa: hellcreek: 802.1Qbv Fixes

while using TAPRIO offloading on the Hirschmann hellcreek switch, I've noticed
two issues in the current implementation:

1. The gate control list is incorrectly programmed
2. The admin base time is not set properly

Fix it.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 43fed4d4 b7658ed3
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1472,9 +1472,6 @@ static void hellcreek_setup_gcl(struct hellcreek *hellcreek, int port,
		u16 data;
		u8 gates;

		cur++;
		next++;

		if (i == schedule->num_entries)
			gates = initial->gate_mask ^
				cur->gate_mask;
@@ -1503,6 +1500,9 @@ static void hellcreek_setup_gcl(struct hellcreek *hellcreek, int port,
			(initial->gate_mask <<
			 TR_GCLCMD_INIT_GATE_STATES_SHIFT);
		hellcreek_write(hellcreek, data, TR_GCLCMD);

		cur++;
		next++;
	}
}

@@ -1550,7 +1550,7 @@ static bool hellcreek_schedule_startable(struct hellcreek *hellcreek, int port)
	/* Calculate difference to admin base time */
	base_time_ns = ktime_to_ns(hellcreek_port->current_schedule->base_time);

	return base_time_ns - current_ns < (s64)8 * NSEC_PER_SEC;
	return base_time_ns - current_ns < (s64)4 * NSEC_PER_SEC;
}

static void hellcreek_start_schedule(struct hellcreek *hellcreek, int port)