On Sun, Oct 16, 2016 at 12:55:50PM +0200, Richard Cochran wrote: > +void port_link_status_set(struct port *p, int up) > +{ > + p->link_status = up ? 1 : 0; > + pr_notice("port %hu: link %s", portnum(p), up ? "up" : "down"); > +}
In my testing I see duplicated messages "link up" and "link down" messages. ptp4l[2732080.004]: master offset -30612248978 s2 freq -62499999 path delay -9419030 ptp4l[2732080.085]: port 1: link down ptp4l[2732080.085]: port 1: SLAVE to FAULTY on FAULT_DETECTED (FT_UNSPECIFIED) ptp4l[2732096.301]: port 1: link down ptp4l[2732099.258]: port 1: link up ptp4l[2732099.260]: driver changed our HWTSTAMP options ptp4l[2732099.260]: tx_type 1 not 1 ptp4l[2732099.260]: rx_filter 1 not 12 ptp4l[2732099.260]: port 1: FAULTY to LISTENING on FAULT_CLEARED ptp4l[2732099.260]: port 1: link up ptp4l[2732099.261]: port 1: link up Would it make sense to print the message only when the status has changed? -- Miroslav Lichvar ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel