* [U-Boot] [PATCH v2] net: fec_mxc: Fix timeouts during tftp transfer
@ 2013-09-18 2:13 Fabio Estevam
2013-09-18 15:32 ` Marek Vasut
2013-09-20 16:11 ` Stefano Babic
0 siblings, 2 replies; 3+ messages in thread
From: Fabio Estevam @ 2013-09-18 2:13 UTC (permalink / raw)
To: u-boot
From: Fabio Estevam <fabio.estevam@freescale.com>
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 <hector.palacios@digi.com>
Tested-by: Oliver Metz <oliver@freetz.org>
Tested-by: Hector Palacios <hector.palacios@digi.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
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(-)
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 690e572..b423ff6 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -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
--
1.8.1.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH v2] net: fec_mxc: Fix timeouts during tftp transfer
2013-09-18 2:13 [U-Boot] [PATCH v2] net: fec_mxc: Fix timeouts during tftp transfer Fabio Estevam
@ 2013-09-18 15:32 ` Marek Vasut
2013-09-20 16:11 ` Stefano Babic
1 sibling, 0 replies; 3+ messages in thread
From: Marek Vasut @ 2013-09-18 15:32 UTC (permalink / raw)
To: u-boot
Dear Fabio Estevam,
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> 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 <hector.palacios@digi.com>
> Tested-by: Oliver Metz <oliver@freetz.org>
> Tested-by: Hector Palacios <hector.palacios@digi.com>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> 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(-)
Acked-by: Marek Vasut <marex@denx.de>
Tested-by: Marek Vasut <marex@denx.de>
Stefano, can you please apply for .10 ?
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH v2] net: fec_mxc: Fix timeouts during tftp transfer
2013-09-18 2:13 [U-Boot] [PATCH v2] net: fec_mxc: Fix timeouts during tftp transfer Fabio Estevam
2013-09-18 15:32 ` Marek Vasut
@ 2013-09-20 16:11 ` Stefano Babic
1 sibling, 0 replies; 3+ messages in thread
From: Stefano Babic @ 2013-09-20 16:11 UTC (permalink / raw)
To: u-boot
On 18/09/2013 04:13, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> 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 <hector.palacios@digi.com>
> Tested-by: Oliver Metz <oliver@freetz.org>
> Tested-by: Hector Palacios <hector.palacios@digi.com>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
Applied to u-boot-imx, thanks!
Best regards,
Stefano Babic
--
=====================================================================
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
=====================================================================
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-09-20 16:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-18 2:13 [U-Boot] [PATCH v2] net: fec_mxc: Fix timeouts during tftp transfer Fabio Estevam
2013-09-18 15:32 ` Marek Vasut
2013-09-20 16:11 ` Stefano Babic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox