diff options
Diffstat (limited to 'sound/firewire/fireworks/fireworks_command.c')
-rw-r--r-- | sound/firewire/fireworks/fireworks_command.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/firewire/fireworks/fireworks_command.c b/sound/firewire/fireworks/fireworks_command.c index d5ea7051ad0c..166f80584c2a 100644 --- a/sound/firewire/fireworks/fireworks_command.c +++ b/sound/firewire/fireworks/fireworks_command.c | |||
@@ -22,7 +22,8 @@ | |||
22 | * Information commands. But this module don't use them. | 22 | * Information commands. But this module don't use them. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #define EFW_TRANSACTION_SEQNUM_MAX ((u32)~0) | 25 | #define KERNEL_SEQNUM_MIN (SND_EFW_TRANSACTION_USER_SEQNUM_MAX + 2) |
26 | #define KERNEL_SEQNUM_MAX ((u32)~0) | ||
26 | 27 | ||
27 | /* for clock source and sampling rate */ | 28 | /* for clock source and sampling rate */ |
28 | struct efc_clock { | 29 | struct efc_clock { |
@@ -120,8 +121,9 @@ efw_transaction(struct snd_efw *efw, unsigned int category, | |||
120 | 121 | ||
121 | /* to keep consistency of sequence number */ | 122 | /* to keep consistency of sequence number */ |
122 | spin_lock(&efw->lock); | 123 | spin_lock(&efw->lock); |
123 | if (efw->seqnum + 2 >= EFW_TRANSACTION_SEQNUM_MAX) | 124 | if ((efw->seqnum < KERNEL_SEQNUM_MIN) || |
124 | efw->seqnum = 0; | 125 | (efw->seqnum >= KERNEL_SEQNUM_MAX - 2)) |
126 | efw->seqnum = KERNEL_SEQNUM_MIN; | ||
125 | else | 127 | else |
126 | efw->seqnum += 2; | 128 | efw->seqnum += 2; |
127 | seqnum = efw->seqnum; | 129 | seqnum = efw->seqnum; |