Re: [Linuxptp-devel] phc2sys freezes the system if started before PHY
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Keller, J. E <jac...@in...> - 2018-01-29 18:42:41
|
> -----Original Message----- > From: Richard Cochran [mailto:ric...@gm...] > Sent: Saturday, January 27, 2018 7:31 PM > To: Petr Kulhavy <br...@ji...> > Cc: lin...@li... > Subject: Re: [Linuxptp-devel] phc2sys freezes the system if started before PHY > > On Sun, Jan 28, 2018 at 02:22:10AM +0100, Petr Kulhavy wrote: > > On this condition the system freezes as soon as the phc2sys starts. > > I'm wondering why this happens. Phc2sys uses /dev/ptp0 which is created by > > the kernel very early. Why does it need the PHY to initialize? And why does > > the lack of initialization kills the system? > > Not even sure whether this is a problem of phc2sys or of the kernel. > > This must be a bug in the FEC driver. (User space programs like > phc2sys cannot freeze the system.) > > Thanks, > Richard > My gut reaction is that the FEC driver needs to delay creation of /dev/ptpX until the PHY is initialized. It may be creating the device too early, then phc2sys is launched and accesses the device ioctls before it is actually setup, which might cause a lockup or crash. Thanks, Jake |