On Tue, Oct 04, 2016 at 10:49:46AM +0000, Luke Bigum wrote: > If I do some simple tests with linux/Documentation/ptp/testptp.c, it > appears the PHC is spinning at about half the Hz it should be doing > (it takes roughly 2 real seconds for the PHC to advance 1 > second). While it is an anecdotal observation, half as fast seems > rather uniform a problem, like there's a /2 somewhere gone wrong in > the driver code... If I wanted to dig into the bnx2x source, any > pointers on where to start looking?
I don't have this card nor was I involved in reviewing the driver. The file, drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c, contains the PHC stuff. Looking at bnx2x_init_cyclecounter(), they have mult = shift = 1. That implies that nanoseconds = ticks / 2 and that their internal clock runs at 2 GHz! Maybe they meant to have shift=0, or maybe your card has a (model specific 1 GHz clock). Anyhow, the testptp result is clear enough. You should take this up with the driver maintainers. Thanks, Richard ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users