Re: [Linuxptp-devel] Issues with mutex locking and ptp_find_pin
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Richard C. <ric...@gm...> - 2016-01-14 23:01:49
|
On Thu, Jan 14, 2016 at 01:57:02PM -0800, Andrew Symington wrote: > I just modified the Linux TI CPTS driver to support external hardware time > stamping. In my driver's .enable function callback on the *ptp_clock_info* > struct I made use of the *ptp_find_pin* to map a (function,channel) to a > (pin). Using the testptp.c app I am able to successfully switch to func=1 > (EXTTS) mode and time stamping works. However, when I try and switch back > to func=0 (NONE) the testptp application hangs, and I get a kernel panic > (slow mutex). It is hard to figure out what went wrong without seeing the code. Please show us your diff. > Perhaps it isn't a good practice to call *ptp_find_pin *from within the > enable function callback in driver code, as done in > /drivers/net/ethernet/intel/igb/igb_ptp.c. I think igb is working just fine: # testptp -l name SDP0 index 0 func 0 chan 0 name SDP1 index 1 func 0 chan 0 name SDP2 index 2 func 0 chan 0 name SDP3 index 3 func 0 chan 0 # testptp -L 0,1 set pin function okay # testptp -l name SDP0 index 0 func 1 chan 0 name SDP1 index 1 func 0 chan 0 name SDP2 index 2 func 0 chan 0 name SDP3 index 3 func 0 chan 0 # testptp -L 0,0 set pin function okay # testptp -l name SDP0 index 0 func 0 chan 0 name SDP1 index 1 func 0 chan 0 name SDP2 index 2 func 0 chan 0 name SDP3 index 3 func 0 chan 0 Thanks, Richard |