icE1usb fw: Update LED status even in E1 FSM is in IDLE state

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I82b867c4886c9f34ff685764424d3db9a8303789
This commit is contained in:
Sylvain Munaut 2022-01-10 12:46:49 +01:00
parent 29d82097d7
commit e98c0334ec
1 changed files with 4 additions and 4 deletions

View File

@ -444,10 +444,6 @@ e1_poll(int port)
uint32_t bd;
unsigned int ofs;
/* Active ? */
if ((e1->rx.state == IDLE) && (e1->tx.state == IDLE))
return;
/* HACK: LED link status */
if (e1_regs->rx.csr & E1_RX_SR_ALIGNED) {
e1_platform_led_set(port, E1P_LED_GREEN, E1P_LED_ST_ON);
@ -461,6 +457,10 @@ e1_poll(int port)
/* TODO: completely off if rx tick counter not incrementing */
}
/* Active ? */
if ((e1->rx.state == IDLE) && (e1->tx.state == IDLE))
return;
/* Recover any done TX BD */
while ( (bd = e1_regs->tx.bd) & E1_BD_VALID ) {
e1f_multiframe_read_discard(&e1->tx.fifo);