Commit bf437012 authored by Vijay Kumar's avatar Vijay Kumar Committed by Greg Kroah-Hartman

Staging: poch: Fix user space protocol syncing

Always set the user space offset from kernel space, to indicate group
transmitted/received.
Signed-off-by: default avatarVijay Kumar <vijaykumar@bravegnu.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ca219995
...@@ -948,14 +948,7 @@ static int poch_channel_available(struct channel_info *channel) ...@@ -948,14 +948,7 @@ static int poch_channel_available(struct channel_info *channel)
spin_lock_irq(&channel->group_offsets_lock); spin_lock_irq(&channel->group_offsets_lock);
for (i = 0; i < channel->group_count; i++) { for (i = 0; i < channel->group_count; i++) {
if (channel->dir == CHANNEL_DIR_RX if (channel->header->group_offsets[i] != -1) {
&& channel->header->group_offsets[i] == -1) {
spin_unlock_irq(&channel->group_offsets_lock);
return 1;
}
if (channel->dir == CHANNEL_DIR_TX
&& channel->header->group_offsets[i] != -1) {
spin_unlock_irq(&channel->group_offsets_lock); spin_unlock_irq(&channel->group_offsets_lock);
return 1; return 1;
} }
...@@ -1103,9 +1096,6 @@ static void poch_irq_dma(struct channel_info *channel) ...@@ -1103,9 +1096,6 @@ static void poch_irq_dma(struct channel_info *channel)
for (i = 0; i < groups_done; i++) { for (i = 0; i < groups_done; i++) {
j = (prev_transfer + i) % channel->group_count; j = (prev_transfer + i) % channel->group_count;
if (channel->dir == CHANNEL_DIR_RX)
group_offsets[j] = -1;
else
group_offsets[j] = groups[j].user_offset; group_offsets[j] = groups[j].user_offset;
} }
......
Markdown is supported
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