[U-Boot] Fw: Changing the App to fix a driver problem?

Duncan Hare dh at synoia.com
Wed May 30 17:13:18 UTC 2018



Subject: Re: [U-Boot] [PATCH 2/2] net: ping,arp: Fix cache alignment
    issues
Message-ID: <099414db-a264-a3ac-8aae-fb8aa0d969ee at denx.de>
Content-Type: text/plain; charset=utf-8; format=flowed

On 28.05.2018 08:33, Baruch Siach wrote:
> From: Jon Nettleton <jon at solid-run.com>
> 
> 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.
> 
> This fixes occasional messages like:
> 
>    CACHE: Misaligned operation at range [3fc01082, 3fc010c2]
> 
___________________________________________________________________
This is not a good idea. I believe it should be implemented in the driver. 
Putting it in in the app code leads to confusionas to its purpose. Duncan Hare

714 931 7952

   


More information about the U-Boot mailing list