From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Hodaszi Date: Thu, 12 Sep 2013 16:15:39 +0200 Subject: [U-Boot] [PATCH] net: fec: Avoid MX28 bus sync issue In-Reply-To: <201309121605.04824.marex@denx.de> References: <1373583784-7129-1-git-send-email-marex@denx.de> <201309121250.36579.marex@denx.de> <52319F63.2030409@digi.com> <201309121605.04824.marex@denx.de> Message-ID: <5231CC8B.5000205@digi.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de I just brought up two samples, that it was a long-term problem. Now it is fixed. But if somebody is trying to compile the U-Boot with an older toolchain, it could cause problems. I had problems with 4.4.6. Yes, 2k is a lot, and I would not put it on the stack. That was just a quick fix. It would be nicer to allocate the memory with malloc, and should do that at initialization time. Best regards, Robert Hodaszi On 2013-09-12 16:05, Marek Vasut wrote: > Dear Robert Hodaszi, > >> Hi, >> >> Sorry, hopefully that will be a plain-text. >> >> There are a lot of bug announcement, just make a search: >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33721 > This was apparently fixed three years ago. > >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16660 > And this one six years ago ... > >> Also, I printed out the buffer addresses, and that temporary RX buffer >> was not aligned. So the transmit function rounded it down to the >> alignment boundary, and so caused invalid data transmission. (By the >> way. Shouldn't the transmit function check whether the alignment is >> proper, and throw an error message, instead of round it down? That would >> make more sense.) > Looking at the code one more time, it'd make most sense to simply allocate the > buffer NOT on stack, but with some memalign-kind-of call to avoid this abuse of > stack. You see, the max packet size is around 2k, which is quite a lot. How does > this proposal sound to you ? > > Best regards, > Marek Vasut