Commit 1a931c4
igc: add lock preventing multiple simultaneous PTM transactions
Add a mutex around the PTM transaction to prevent multiple transactors
Multiple processes try to initiate a PTM transaction, one or all may
fail. This can be reproduced by running two instances of the
following:
$ sudo phc2sys -O 0 -i tsn0 -m
PHC2SYS exits with:
"ioctl PTP_OFFSET_PRECISE: Connection timed out" when the PTM transaction
fails
Note: Normally two instance of PHC2SYS will not run, but one process
should not break another.
Fixes: a90ec84 ("igc: Add support for PTP getcrosststamp()")
Signed-off-by: Christopher S M Hall <[email protected]>
Reviewed-by: Corinna Vinschen <[email protected]>
Signed-off-by: Jacob Keller <[email protected]>
Tested-by: Mor Bar-Gabay <[email protected]>
Acked-by: Vinicius Costa Gomes <[email protected]>
Signed-off-by: Tony Nguyen <[email protected]>1 parent 1f02575 commit 1a931c4
2 files changed
+19
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
| 322 | + | |
322 | 323 | | |
323 | 324 | | |
324 | 325 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
974 | 974 | | |
975 | 975 | | |
976 | 976 | | |
| 977 | + | |
977 | 978 | | |
978 | 979 | | |
979 | 980 | | |
| |||
990 | 991 | | |
991 | 992 | | |
992 | 993 | | |
| 994 | + | |
993 | 995 | | |
994 | 996 | | |
995 | 997 | | |
| |||
1068 | 1070 | | |
1069 | 1071 | | |
1070 | 1072 | | |
| 1073 | + | |
1071 | 1074 | | |
1072 | | - | |
1073 | | - | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
1074 | 1083 | | |
1075 | 1084 | | |
1076 | 1085 | | |
| |||
1169 | 1178 | | |
1170 | 1179 | | |
1171 | 1180 | | |
| 1181 | + | |
1172 | 1182 | | |
1173 | 1183 | | |
1174 | 1184 | | |
| |||
1181 | 1191 | | |
1182 | 1192 | | |
1183 | 1193 | | |
| 1194 | + | |
1184 | 1195 | | |
1185 | 1196 | | |
1186 | 1197 | | |
| |||
1210 | 1221 | | |
1211 | 1222 | | |
1212 | 1223 | | |
| 1224 | + | |
1213 | 1225 | | |
1214 | 1226 | | |
1215 | 1227 | | |
1216 | 1228 | | |
| 1229 | + | |
1217 | 1230 | | |
1218 | 1231 | | |
1219 | 1232 | | |
| |||
1255 | 1268 | | |
1256 | 1269 | | |
1257 | 1270 | | |
| 1271 | + | |
1258 | 1272 | | |
1259 | 1273 | | |
1260 | 1274 | | |
| |||
1294 | 1308 | | |
1295 | 1309 | | |
1296 | 1310 | | |
| 1311 | + | |
1297 | 1312 | | |
1298 | 1313 | | |
1299 | 1314 | | |
| |||
1317 | 1332 | | |
1318 | 1333 | | |
1319 | 1334 | | |
| 1335 | + | |
1320 | 1336 | | |
1321 | 1337 | | |
1322 | 1338 | | |
| |||
0 commit comments