Commit 29a88eea authored by Omar Gabella's avatar Omar Gabella

KM3NET BM BC: trying disable autonegotiation

parent 5695e204
Pipeline #4250 failed with stages
......@@ -148,10 +148,10 @@ int ep_link_up(uint16_t * lpa)
uint16_t flags = MDIO_MSR_LSTATUS;
volatile uint16_t msr;
//#ifdef BROADCAST
// /* Autonegotiation disabled by default in broadcast mode */
// autoneg_enabled = ((uint16_t)pcs_read(MDIO_REG_MCR) & (0x1000));
//#endif
#ifdef BROADCAST
/* Autonegotiation disabled by default in broadcast mode */
autoneg_enabled = ((uint16_t)pcs_read(MDIO_REG_MCR) & (0x1000));
#endif
if (autoneg_enabled)
flags |= MDIO_MSR_ANEGCOMPLETE;
......@@ -231,8 +231,6 @@ int ep_get_autonegotiation()
void ep_set_autonegotiation(bool autoneg)
{
// this only works for the non-broadcast version
//#ifndef //BROADCAST
uint32_t val;
val = pcs_read(MDIO_REG_MCR);
if(autoneg)
......@@ -245,5 +243,4 @@ void ep_set_autonegotiation(bool autoneg)
}
pcs_write(MDIO_REG_MCR, val);
autoneg_enabled = autoneg;
//#endif
}
......@@ -236,7 +236,11 @@ static int calib_t24p_slave(uint32_t *value)
int retries = 0;
while (!(rv = rxts_calibration_update(value))) {
#ifdef BROADCAST // TEST for BM as DOMs do not follow t24p
if (retries > CALIB_RETRIES)
#else
if (retries > CALIB_RETRIES || ep_link_up(NULL) == LINK_DOWN)
#endif
return -1;
retries++;
}
......
......@@ -102,7 +102,8 @@ static void wrc_initialize(void)
timer_delay_ms(200);
#ifdef BROADCAST // BROADCAST
ep_enable(1, 0); // Auto negociation disable.
ep_enable(1, 0); // Auto negociation not enabled.
ep_set_autonegotiation(0); // Test to disable autoneg even if it is not enabled...
#else
ep_enable(1, 1);
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment