net: fec_mxc: Fix timeouts during tftp transfer
PATCH v2 1/1 net: fec_mxc: Fix timeouts during tftp transfer
From: Fabio Estevam <[email protected]>
Performing tftp transfers on mx28 results in random timeouts.
Hector Palacios and Robert Hodaszi analyzed the root cause being related to the wrong alignment of the 'buff' buffer inside fec_recv().
Beno?t Th?baudeau provided an excellent analysis of the alignment bug that is present on older versions, such as GCC 4.5.4:
http://marc.info/?l=u-boot&m=137942904906131&w=2
Use ALLOC_CACHE_ALIGN_BUFFER() to avoid alignment issues from older GCC versions.
---
Changes since v1:
- Improve commit log
- Add Hector's Tested-by tag
drivers/net/fec_mxc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/fec_mxc.c +1 -1
@@ -794,7 +794,7 @@ static int fec_recv(struct eth_device *dev)uint16_t bd_status;uint32_t addr, size, end;int i; -uchar buff[FEC_MAX_PKT_SIZE ]__aligned(ARCH_DMA_MINALIGN) ; +ALLOC_CACHE_ALIGN_BUFFER (uchar, buff,FEC_MAX_PKT_SIZE );/* * Check if any critical events have happened
Signature · 1 line
1.8.1.2
PATCH v2 1/1 net: fec_mxc: Fix timeouts during tftp transfer
Dear Fabio Estevam,
Quoted 19 lines
From: Fabio Estevam <[email protected]>
Performing tftp transfers on mx28 results in random timeouts.
Hector Palacios and Robert Hodaszi analyzed the root cause being related to the wrong alignment of the 'buff' buffer inside
fec_recv().Beno?t Th?baudeau provided an excellent analysis of the alignment bug that is present on older versions, such as GCC 4.5.4:
http://marc.info/?l=u-boot&m=137942904906131&w=2
Use
ALLOC_CACHE_ALIGN_BUFFER()to avoid alignment issues from older GCC versions.Reported-by Hector Palacios <[email protected]>Tested-by Oliver Metz <[email protected]>Tested-by Hector Palacios <[email protected]>Signed-off-by Fabio Estevam <[email protected]>
Quoted 7 lines
---
Changes since v1:
- Improve commit log
- Add Hector's Tested-by tagdrivers/net/fec_mxc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Stefano, can you please apply for .10 ?
Best regards,
Marek Vasut
PATCH v2 1/1 net: fec_mxc: Fix timeouts during tftp transfer
In reply to Fabio EstevamQuoted 12 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Performing tftp transfers on mx28 results in random timeouts.
Hector Palacios and Robert Hodaszi analyzed the root cause being related to the wrong alignment of the 'buff' buffer inside
fec_recv().Beno?t Th?baudeau provided an excellent analysis of the alignment bug that is present on older versions, such as GCC 4.5.4:
Quoted 8 lines
Use
ALLOC_CACHE_ALIGN_BUFFER()to avoid alignment issues from older GCC versions.Reported-by Hector Palacios <[email protected]>Tested-by Oliver Metz <[email protected]>Tested-by Hector Palacios <[email protected]>Signed-off-by Fabio Estevam <[email protected]>---
Applied to u-boot-imx, thanks!
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================