In order to effectively use the PTP kernel thread for tasks such as timestamping packets, allow the user control over stopping it, which is needed e.g. when the timestamping queues must be drained.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -243,6 +243,13 @@ int ptp_find_pin(struct ptp_clock *ptp, · 242 unmodified lines | |||
| 243 | 243 | ||
| 244 | int ptp_schedule_worker(struct ptp_clock *ptp, unsigned long delay); | 244 | int ptp_schedule_worker(struct ptp_clock *ptp, unsigned long delay); |
| 245 | 245 | ||
| 246 | /** | ||
| 247 | * ptp_cancel_worker_sync() - cancel ptp auxiliary clock | ||
| 248 | * | ||
| 249 | * @ptp: The clock obtained from ptp_clock_register(). | ||
| 250 | */ | ||
| 251 | void ptp_cancel_worker_sync(struct ptp_clock *ptp); | ||
| 252 | |||
| 246 | #else | 253 | #else |
| 247 | static inline struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info, | 254 | static inline struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info, |
| 248 | struct device *parent) | 255 | struct device *parent) |
| @@ -260,6 +267,8 @@ static inline int ptp_find_pin(struct ptp_clock *ptp, · 11 unmodified lines | |||
| 260 | static inline int ptp_schedule_worker(struct ptp_clock *ptp, | 267 | static inline int ptp_schedule_worker(struct ptp_clock *ptp, |
| 261 | unsigned long delay) | 268 | unsigned long delay) |
| 262 | { return -EOPNOTSUPP; } | 269 | { return -EOPNOTSUPP; } |
| 270 | static inline void ptp_cancel_worker_sync(struct ptp_clock *ptp) | ||
| 271 | { } | ||
| 263 | 272 | ||
| 264 | #endif | 273 | #endif |
| 265 | 274 | ||