Repository navigation
Commit aa57725
media: cec-pin: fix interrupt en/disable handling
commit 713bdfa upstream.
The en/disable_irq() functions keep track of the 'depth': i.e. if
interrupts are disabled twice, then it needs to enable_irq() calls to
enable them again. The cec-pin framework didn't take this into accound
and could disable irqs multiple times, and it expected that a single
enable_irq() would enable them again.
Move all calls to en/disable_irq() to the kthread where it is easy
to keep track of the current irq state and ensure that multiple
en/disable_irq calls never happen.
If interrupts where disabled twice, then they would never turn on
again, leaving the CEC adapter in a dead state.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Fixes: 865463f (media: cec-pin: add error injection support)
Cc: <stable@vger.kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 2e566ca commit aa57725
1 file changed
Lines changed: 18 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1033 | 1033 | | |
1034 | 1034 | | |
1035 | 1035 | | |
| 1036 | + | |
1036 | 1037 | | |
1037 | 1038 | | |
1038 | 1039 | | |
| |||
1060 | 1061 | | |
1061 | 1062 | | |
1062 | 1063 | | |
| 1064 | + | |
1063 | 1065 | | |
1064 | 1066 | | |
1065 | 1067 | | |
| |||
1083 | 1085 | | |
1084 | 1086 | | |
1085 | 1087 | | |
1086 | | - | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
1087 | 1092 | | |
1088 | 1093 | | |
1089 | 1094 | | |
1090 | 1095 | | |
1091 | 1096 | | |
1092 | 1097 | | |
| 1098 | + | |
| 1099 | + | |
1093 | 1100 | | |
1094 | 1101 | | |
1095 | 1102 | | |
1096 | 1103 | | |
1097 | 1104 | | |
| 1105 | + | |
| 1106 | + | |
1098 | 1107 | | |
1099 | 1108 | | |
1100 | 1109 | | |
1101 | 1110 | | |
1102 | 1111 | | |
1103 | | - | |
1104 | 1112 | | |
1105 | 1113 | | |
1106 | 1114 | | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
1107 | 1121 | | |
1108 | 1122 | | |
1109 | 1123 | | |
| |||
1130 | 1144 | | |
1131 | 1145 | | |
1132 | 1146 | | |
1133 | | - | |
1134 | | - | |
1135 | | - | |
1136 | 1147 | | |
1137 | | - | |
1138 | | - | |
1139 | | - | |
1140 | 1148 | | |
1141 | 1149 | | |
1142 | 1150 | | |
| |||
1157 | 1165 | | |
1158 | 1166 | | |
1159 | 1167 | | |
1160 | | - | |
1161 | | - | |
1162 | | - | |
1163 | | - | |
1164 | | - | |
| 1168 | + | |
| 1169 | + | |
1165 | 1170 | | |
1166 | 1171 | | |
1167 | 1172 | | |
| |||
0 commit comments