aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorVijay Kumar <vijaykumar@bravegnu.org>2008-10-28 23:28:39 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-06 16:52:04 -0500
commitbf437012503cc99519e20b4a8bddf830cdaae794 (patch)
tree2700595d825866aacb53646d645e28106a875982 /drivers
parentca219995b299a069dc0a88ddc24ac72423a81361 (diff)
Staging: poch: Fix user space protocol syncing
Always set the user space offset from kernel space, to indicate group transmitted/received. Signed-off-by: Vijay Kumar <vijaykumar@bravegnu.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/poch/poch.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/staging/poch/poch.c b/drivers/staging/poch/poch.c
index 0a3eca14075..3ecbd7c43c4 100644
--- a/drivers/staging/poch/poch.c
+++ b/drivers/staging/poch/poch.c
@@ -948,14 +948,7 @@ static int poch_channel_available(struct channel_info *channel)
948 spin_lock_irq(&channel->group_offsets_lock); 948 spin_lock_irq(&channel->group_offsets_lock);
949 949
950 for (i = 0; i < channel->group_count; i++) { 950 for (i = 0; i < channel->group_count; i++) {
951 if (channel->dir == CHANNEL_DIR_RX 951 if (channel->header->group_offsets[i] != -1) {
952 && channel->header->group_offsets[i] == -1) {
953 spin_unlock_irq(&channel->group_offsets_lock);
954 return 1;
955 }
956
957 if (channel->dir == CHANNEL_DIR_TX
958 && channel->header->group_offsets[i] != -1) {
959 spin_unlock_irq(&channel->group_offsets_lock); 952 spin_unlock_irq(&channel->group_offsets_lock);
960 return 1; 953 return 1;
961 } 954 }
@@ -1103,10 +1096,7 @@ static void poch_irq_dma(struct channel_info *channel)
1103 1096
1104 for (i = 0; i < groups_done; i++) { 1097 for (i = 0; i < groups_done; i++) {
1105 j = (prev_transfer + i) % channel->group_count; 1098 j = (prev_transfer + i) % channel->group_count;
1106 if (channel->dir == CHANNEL_DIR_RX) 1099 group_offsets[j] = groups[j].user_offset;
1107 group_offsets[j] = -1;
1108 else
1109 group_offsets[j] = groups[j].user_offset;
1110 } 1100 }
1111 1101
1112 spin_unlock(&channel->group_offsets_lock); 1102 spin_unlock(&channel->group_offsets_lock);