From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Fri, 13 Sep 2013 18:06:44 +0200 Subject: [U-Boot] [PATCH] net: fec: Avoid MX28 bus sync issue In-Reply-To: <5232F2E7.4050407@digi.com> References: <1373583784-7129-1-git-send-email-marex@denx.de> <201309121250.36579.marex@denx.de> <52319F63.2030409@digi.com> <201309121605.04824.marex@denx.de> <20130912181757.5F102380189@gemini.denx.de> <20130912185349.9743B380189@gemini.denx.de> <5232F2E7.4050407@digi.com> Message-ID: <20130913160644.CA908380621@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Robert Hodaszi, In message <5232F2E7.4050407@digi.com> you wrote: > > Ok. Then what about if I would use the stack, but align the buffer manually. Has this been tested? Does it work? > - uchar buff[FEC_MAX_PKT_SIZE] __aligned(ARCH_DMA_MINALIGN); > + /* Align the receive buffer */ > + uchar buff_unaligned[FEC_MAX_PKT_SIZE + (ARCH_DMA_MINALIGN - 1)]; > + uchar *buff = ((uint32_t)buff_unaligned + (ARCH_DMA_MINALIGN - 1)) & ~(ARCH_DMA_MINALIGN - 1); You should use the ALIGN() macro here. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Niklaus Wirth has lamented that, whereas Europeans pronounce his name correctly (Ni-klows Virt), Americans invariably mangle it into (Nick- les Worth). Which is to say that Europeans call him by name, but Americans call him by value.