You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "davids5 (via GitHub)" <gi...@apache.org> on 2023/04/12 17:50:35 UTC

[GitHub] [nuttx] davids5 commented on a diff in pull request #8943: stm32_eth: Added error handling for abnormal interrupts.

davids5 commented on code in PR #8943:
URL: https://github.com/apache/nuttx/pull/8943#discussion_r1164461911


##########
arch/arm/src/stm32/stm32_eth.c:
##########
@@ -2046,8 +2042,23 @@ static void stm32_interrupt_work(void *arg)
       /* Clear the pending abnormal summary interrupt */
 
       stm32_putreg(ETH_DMAINT_AIS, STM32_ETH_DMASR);
+
+      /* As per the datasheet's recommendation, the MAC
+       * needs to be reset for all abnormal events. The
+       * scheduled job will take the interface down and
+       * up again.
+       */
+
+      work_queue(ETHWORK, &priv->irqwork, stm32_txtimeout_work, priv, 0);

Review Comment:
   Do you need a delay to ensure this code exits with the net_unlock before stm32_txtimeout_work is called?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org