mirror of
https://github.com/apache/nuttx.git
synced 2026-08-23 14:38:25 +00:00
arch/arm/src/stm32h7/stm32_ethernet.c: Correct memory corruption error. The Ethernet driver initialization incorrectly wrote to DMACRXCR instead of DMACSR when trying to clear the stopped flags. This caused invalid buffer length in the DMACRXCR, causing DMA to overflow the RX buffers when large packets are sent to the device.
This commit is contained in:
parent
cf5c02aa4e
commit
938e8b4ce7
1 changed files with 2 additions and 2 deletions
|
|
@ -4219,9 +4219,9 @@ static int stm32_macenable(struct stm32_ethmac_s *priv)
|
|||
|
||||
/* Clear Tx and Rx process stopped flags */
|
||||
|
||||
regval = stm32_getreg(STM32_ETH_DMACRXCR);
|
||||
regval = stm32_getreg(STM32_ETH_DMACSR);
|
||||
regval |= (ETH_DMACSR_TPS | ETH_DMACSR_RPS);
|
||||
stm32_putreg(regval, STM32_ETH_DMACRXCR);
|
||||
stm32_putreg(regval, STM32_ETH_DMACSR);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue