Skip to content

Commit b526cfd

Browse files
committed
Revert "[REVERTME] arch/risc-v/src/mpfs/mpfs_ethernet.c: Hack the ethernet driver to re-initialize on rx timeout"
This reverts commit ece7367.
1 parent 4551232 commit b526cfd

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

arch/risc-v/src/mpfs/mpfs_ethernet.c

-25
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,6 @@
168168

169169
#define MPFS_TXTIMEOUT (60 * CLK_TCK)
170170

171-
/* RX timeout = 30s */
172-
173-
#define MPFS_RXTIMEOUT (30 * CLK_TCK)
174-
175171
/* PHY reset tim in loop counts */
176172

177173
#define PHY_RESET_WAIT_COUNT (10)
@@ -269,7 +265,6 @@ struct mpfs_ethmac_s
269265
uint8_t phyaddr; /* PHY address */
270266
#endif
271267
struct wdog_s txtimeout; /* TX timeout timer */
272-
struct wdog_s rxtimeout; /* RX timeout timer */
273268
struct work_s irqwork; /* For deferring interrupt work to the work queue */
274269
struct work_s pollwork; /* For deferring poll work to the work queue */
275270
struct work_s timeoutwork; /* For managing timeouts */
@@ -392,7 +387,6 @@ static int mpfs_ethconfig(struct mpfs_ethmac_s *priv);
392387
static void mpfs_ethreset(struct mpfs_ethmac_s *priv);
393388

394389
static void mpfs_interrupt_work(void *arg);
395-
static void mpfs_txtimeout_expiry(wdparm_t arg);
396390

397391
/****************************************************************************
398392
* Private Functions
@@ -474,14 +468,6 @@ static int mpfs_interrupt_0(int irq, void *context, void *arg)
474468
wd_cancel(&priv->txtimeout);
475469
}
476470

477-
if ((isr & GEM_INT_RECEIVE_COMPLETE) != 0)
478-
{
479-
/* If a RX transfer just completed, restart the timeout */
480-
481-
wd_start(&priv->rxtimeout, MPFS_RXTIMEOUT,
482-
mpfs_txtimeout_expiry, (wdparm_t)priv);
483-
}
484-
485471
/* Schedule to perform the interrupt processing on the worker thread. */
486472

487473
work_queue(ETHWORK, &priv->irqwork, mpfs_interrupt_work, priv, 0);
@@ -1570,13 +1556,6 @@ static int mpfs_ifup(struct net_driver_s *dev)
15701556
up_enable_irq(priv->mac_q_int[2]);
15711557
up_enable_irq(priv->mac_q_int[3]);
15721558

1573-
/* Set up the RX timeout. If we don't receive anything in time, try
1574-
* to re-initialize
1575-
*/
1576-
1577-
wd_start(&priv->rxtimeout, MPFS_RXTIMEOUT,
1578-
mpfs_txtimeout_expiry, (wdparm_t)priv);
1579-
15801559
return OK;
15811560
}
15821561

@@ -1620,10 +1599,6 @@ static int mpfs_ifdown(struct net_driver_s *dev)
16201599

16211600
wd_cancel(&priv->txtimeout);
16221601

1623-
/* Cancel the RX timeout timers */
1624-
1625-
wd_cancel(&priv->rxtimeout);
1626-
16271602
/* Put the MAC in its reset, non-operational state. This should be
16281603
* a known configuration that will guarantee the mpfs_ifup() always
16291604
* successfully brings the interface back up.

0 commit comments

Comments
 (0)