Skip to content
Commit c1bca9ac authored by Florian Kauer's avatar Florian Kauer Committed by Tony Nguyen
Browse files

igc: Fix launchtime before start of cycle

It is possible (verified on a running system) that frames are processed
by igc_tx_launchtime with a txtime before the start of the cycle
(baset_est).

However, the result of txtime - baset_est is written into a u32,
leading to a wrap around to a positive number. The following
launchtime > 0 check will only branch to executing launchtime = 0
if launchtime is already 0.

Fix it by using a s32 before checking launchtime > 0.

Fixes: db0b124f

 ("igc: Enhance Qbv scheduling by using first flag bit")
Signed-off-by: default avatarFlorian Kauer <florian.kauer@linutronix.de>
Reviewed-by: default avatarKurt Kanzenbach <kurt@linutronix.de>
Tested-by: default avatarNaama Meir <naamax.meir@linux.intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent 8b86f10a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment