Merge pull request #314 from slsdetectorgroup/eigerhotfix

Eigerhotfix
This commit is contained in:
Dhanya Thattil 2021-10-13 15:56:10 +02:00 committed by GitHub
commit c0edbc8631
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 27 additions and 19 deletions

View File

@ -1 +0,0 @@
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv6.0.0-rc1

View File

@ -0,0 +1 @@
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv6.0.0-rc2

View File

@ -8,8 +8,11 @@
#include <sys/mman.h> #include <sys/mman.h>
#include <unistd.h> #include <unistd.h>
extern int isControlServer;
#define MAX(x, y) (((x) > (y)) ? (x) : (y)) #define MAX(x, y) (((x) > (y)) ? (x) : (y))
struct LocalLinkInterface ll_beb_local, *ll_beb; struct LocalLinkInterface ll_beb_local, *ll_beb;
struct udp_header_type udp_header; struct udp_header_type udp_header;
@ -97,6 +100,9 @@ int Beb_SetUpUDPHeader(unsigned int header_number, int ten_gig,
if (!Beb_activated) if (!Beb_activated)
return 1; return 1;
if (!isControlServer)
return 1;
u_int32_t bram_phy_addr; u_int32_t bram_phy_addr;
u_int32_t *csp0base = 0; u_int32_t *csp0base = 0;
if (ten_gig) if (ten_gig)

View File

@ -4969,25 +4969,27 @@ int is_udp_configured() {
} }
void configure_mac() { void configure_mac() {
if (is_udp_configured() == OK) { if (isControlServer) {
ret = configureMAC(); if (is_udp_configured() == OK) {
if (ret != OK) { ret = configureMAC();
#if defined(CHIPTESTBOARDD) || defined(MOENCHD) if (ret != OK) {
if (ret == -1) { #if defined(CHIPTESTBOARDD) || defined(MOENCHD)
sprintf(mess, "Could not allocate RAM\n"); if (ret == -1) {
sprintf(mess, "Could not allocate RAM\n");
} else {
sprintf(mess, "Could not configure mac because of incorrect "
"udp 1G destination IP and port\n");
}
#else
sprintf(mess, "Configure Mac failed\n");
#endif
strcpy(configureMessage, mess);
LOG(logERROR, (mess));
} else { } else {
sprintf(mess, "Could not configure mac because of incorrect " LOG(logINFOGREEN, ("\tConfigure MAC successful\n"));
"udp 1G destination IP and port\n"); configured = OK;
return;
} }
#else
sprintf(mess, "Configure Mac failed\n");
#endif
strcpy(configureMessage, mess);
LOG(logERROR, (mess));
} else {
LOG(logINFOGREEN, ("\tConfigure MAC successful\n"));
configured = OK;
return;
} }
} }
configured = FAIL; configured = FAIL;

View File

@ -10,4 +10,4 @@
#define APIJUNGFRAU 0x211008 #define APIJUNGFRAU 0x211008
#define APIMYTHEN3 0x211008 #define APIMYTHEN3 0x211008
#define APIMOENCH 0x211008 #define APIMOENCH 0x211008
#define APIEIGER 0x211008 #define APIEIGER 0x211013