mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
ALSA: firewire-lib: fix to check cycle continuity
commit77ce96543b
upstream. The local helper function to compare the given pair of cycle count evaluates them. If the left value is less than the right value, the function returns negative value. If the safe cycle is less than the current cycle, it is the case of cycle lost. However, it is not currently handled properly. This commit fixes the bug. Cc: <stable@vger.kernel.org> Fixes:705794c53b
("ALSA: firewire-lib: check cycle continuity") Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20240218033026.72577-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
3bfe04c127
commit
8cec41a350
1 changed files with 1 additions and 1 deletions
|
@ -934,7 +934,7 @@ static int generate_device_pkt_descs(struct amdtp_stream *s,
|
|||
// to the reason.
|
||||
unsigned int safe_cycle = increment_ohci_cycle_count(next_cycle,
|
||||
IR_JUMBO_PAYLOAD_MAX_SKIP_CYCLES);
|
||||
lost = (compare_ohci_cycle_count(safe_cycle, cycle) > 0);
|
||||
lost = (compare_ohci_cycle_count(safe_cycle, cycle) < 0);
|
||||
}
|
||||
if (lost) {
|
||||
dev_err(&s->unit->device, "Detect discontinuity of cycle: %d %d\n",
|
||||
|
|
Loading…
Reference in a new issue