- 09 Jan, 2015 1 commit
-
-
Alessandro Rubini authored
delta_tx and delta_rx in the SFP information are differences from the values in the "calibration" SFP model. Thus they are signed not uint32_t. Fortunately nobody used negative values so far. I also renamed the fields, to ensure the compiler would find all uses. (there are other irrelevant changes in upstream headers; this commits puts them in sync again). Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 08 Jan, 2015 1 commit
-
-
Alessandro Rubini authored
System time is used for log messages and nothing critical, so we'd better have it different from WR time, when WR time is clearly wrong. This commit avoids setting Unix time from WR time when WR time is clearly wrong (i.e. earlier than today). This, among other things, fixes a "fatal error" startup failure when two free-running WRS devices are turned one at the same time (noted by Adam Wujek). This is because the master was counting from zero and the slave, was setting system time accordingly; but the slave's boot procedure already used wr_date to set the utc/tai offset, and system time as a result was being set to a negative value -- tai's being small, "tai - 35" was negative. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 03 Jan, 2015 1 commit
-
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 18 Dec, 2014 1 commit
-
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 05 Dec, 2014 13 commits
-
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This simplifies the wr-servo state machine by factorizing out some things, removing some conditionals and using the state strings array instead of several strcpy. As a side effect, it requires less iterations when the offset is less than one second, and it reports more correctly the current status to diagnostics and wr_mon. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
time_operations->set() is rarely called for the white rabbit switch. Besides the special case with a NULL time pointer, it is only called by the normal servo, before WR-Mode is activated on the relevant link. This happens once only. In this situation, we should set Unix time, in addition to changing the WR timers. The code, as laid out would change Unix time upon repeated invocation of this function, but not the first time. Thus, we risked keeping a wrong system time even if WR synced to the external world. This means syslog messages would be stamped at January 1970. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
In order to fit all pp_instance items withing WRS shared memory, we need to make them a little smaller. Thus, the tx and rx buffers are now allocated separately. And, while I am at it, I make them smaller, because 128 bytes are more than enough for PTP with extensions (all frames are under 100 bytes). Given we are always showr of memory in wrpc-sw, this is benefical. As a side effect, clean up some out-of-memory exit paths, and fix a use-before-check buglet in arch-unix (no, we never go out of memory, but the check was wrong). Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Commit 3dabecf4 Makefile: bugfix for parallel builds forced all object files to be rebuilt every time, while fiing MAKEALL errors. By making objects depend on .config instead of depending on silentoldconfig we force a rebuild only when the configuration changed. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 04 Dec, 2014 3 commits
-
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The HAL process, in the white rabbit switch, is now exporting data structures in shared memory. Thus, we don't need to "get_port_state" by RPC, and accessing shared memory is enough. This change in ppsi involves the following changes: arch-wrs/wrs-startup.c: offer global hal_ports[] for others to use (yes, globals are bad, I know...) arch-wrs/include/ppsi-wrs.h: provide pp_wrs_lookup_port time-wrs/wrs-socket.c: use shmem. This means some values are now hardwired as constants, because they were passed as such from the hal. arch-wrs/main-loop.c: verify link up or down in the shared mem status arch-wrs/wrs-calibration.c: wrs_read_calibration_data uses shmem Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This is respinning a previous commit, based on the new shmem in libwr after the feedback and patches by Adam. More headers are inserted, as they are included by the ones we use. hal_shmem.h has one 1-line modification to account for the different include path in ppsi, as opposed to wr-switch-sw. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 27 Nov, 2014 4 commits
-
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
When using "make -j" we must make silentoldconfig before building any object. Otherwise we may use the previous autoconf.h, in error if we just changed the configuration. This was exposed by ./MAKEALL with the properly working wr/non-wr build for wrs: previous wrcp_defconfig left CONFIG_EXT_WR active while building some file with wrs-nonwr_defconfig. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 14 Nov, 2014 1 commit
-
-
Grzegorz Daniluk authored
-
- 13 Nov, 2014 6 commits
-
-
Alessandro Rubini authored
All functions in msg.c that are used locally are now static. There is one that is never used at all (msg_unpack_delay_req) but I fear I need more auditing before removing it. It may be something we need to do, I'm not sure. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This field is not needed, because we issue the response immediately, using the last received header. The copy is not needed, nor the field. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
We always send them in pair, so use a single function to do it. This simplifies the code a little, but most of al it allows later interoduction of mandated masters on multiple vlans. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Cesar Prados authored
Signed-off-by: C.Prados <c.prados@gsi.de>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 11 Nov, 2014 3 commits
-
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
In the next commits we'll need CONFIG_ symbols and ARRAY_SIZE Unfortunately, we can't use "-include include/generated/autoconf.h" in CFLAGS, because pp_printf is built with our CFLAGS from its own directory. And I'd better not include the full pathname as our make is verbose Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 07 Nov, 2014 6 commits
-
-
Alessandro Rubini authored
-
Alessandro Rubini authored
This paves the way to the addition of a third protocol. Besides the code is slightly smaller (around 50 bytes on all archs). Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This reverts commit 9a3e00784afea6ab46510315b9c50cb510175f2d.
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Bitfields are bad, so this turns them into flags and constants. There should be no change at all in behaviour (although the code is a little smaller). The next commit does a change for real. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
I'm going to introduce a "flags" field in pp_instance, so diagnostic flags are better called d_flags. The same applies, for consistency, to the global variable. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-