From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Hershberger Date: Fri, 8 Jun 2018 15:55:26 -0500 Subject: [U-Boot] [PATCH v2 2/2] net: ping, arp: Fix cache alignment issues In-Reply-To: <1c55b2ef764fd213e69367c79ead7b5294dbd13a.1527659550.git.baruch@tkos.co.il> References: <1c55b2ef764fd213e69367c79ead7b5294dbd13a.1527659550.git.baruch@tkos.co.il> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, May 30, 2018 at 12:52 AM, Baruch Siach wrote: > From: Jon Nettleton > > Both ping_receive and arp_receive would transmit a received packet > back out using its original point. This causes problems with > certain network cards that add a custom header to the packet. > Specifically the mvneta driver for the Armada series boards has > a 2 byte Marvell header that is bypassed and passed along to > the system, but that 2 byte offset now causes a misalignment if > it is attempted to be sent back out. > > Rather than changing the driver to memcpy all the received packets > to cache aligned buffers we instead change the two offending > network commands to copy the packet into a cache aligned net_tx_packet > before sending it back out. It seems reasonable to make these match the rest of the network commands. > This fixes occasional messages like: > > CACHE: Misaligned operation at range [3fc01082, 3fc010c2] > > Reviewed-by: Stefan Roese > Signed-off-by: Jon Nettleton > Signed-off-by: Baruch Siach > --- Acked-by: Joe Hershberger