File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -1091,8 +1091,11 @@ static void udma_check_tx_completion(struct work_struct *work)
1091
1091
u32 residue_diff ;
1092
1092
ktime_t time_diff ;
1093
1093
unsigned long delay ;
1094
+ unsigned long flags ;
1094
1095
1095
1096
while (1 ) {
1097
+ spin_lock_irqsave (& uc -> vc .lock , flags );
1098
+
1096
1099
if (uc -> desc ) {
1097
1100
/* Get previous residue and time stamp */
1098
1101
residue_diff = uc -> tx_drain .residue ;
@@ -1127,6 +1130,8 @@ static void udma_check_tx_completion(struct work_struct *work)
1127
1130
break ;
1128
1131
}
1129
1132
1133
+ spin_unlock_irqrestore (& uc -> vc .lock , flags );
1134
+
1130
1135
usleep_range (ktime_to_us (delay ),
1131
1136
ktime_to_us (delay ) + 10 );
1132
1137
continue ;
@@ -1143,6 +1148,8 @@ static void udma_check_tx_completion(struct work_struct *work)
1143
1148
1144
1149
break ;
1145
1150
}
1151
+
1152
+ spin_unlock_irqrestore (& uc -> vc .lock , flags );
1146
1153
}
1147
1154
1148
1155
static irqreturn_t udma_ring_irq_handler (int irq , void * data )
You can’t perform that action at this time.
0 commit comments