Hi Dan Carpenter,

I have verified it on the little-endian platform, such as ASPEED AST2600.
I think put_unaligned_be32() and htonl() functions have no effect on big-endian 
platforms.
And keep put_unaligned_be32() to help access the unaligned memory, such as 
pchecksum variable.


Thanks,
Jacky

________________________________
寄件者: Dan Carpenter <dan.carpen...@linaro.org>
寄件日期: 2024年2月5日 下午 11:04
收件者: Jacky Chou <jacky_c...@aspeedtech.com>
副本: joe.hershber...@ni.com <joe.hershber...@ni.com>; rfried....@gmail.com 
<rfried....@gmail.com>; tr...@konsulko.com <tr...@konsulko.com>; 
michal.si...@amd.com <michal.si...@amd.com>; marek.vasut+rene...@mailbox.org 
<marek.vasut+rene...@mailbox.org>; u-boot@lists.denx.de <u-boot@lists.denx.de>; 
BMC-SW <bmc...@aspeedtech.com>
主旨: Re: [PATCH] net: phy: ncsi: Correct the endian of the checksum

On Mon, Feb 05, 2024 at 04:02:28PM +0800, Jacky Chou wrote:
> There is no need to perform the endian twice here.
>
> Signed-off-by: Jacky Chou <jacky_c...@aspeedtech.com>

Reviewed-by: Dan Carpenter <dan.carpen...@linaro.org>
Fixes: f641a8ac93e0 ("phy: Add support for the NC-SI protocol")

How did this ever work?  Was this always tested on big endian hardware
or was nothing verifying the checksums?

regards,
dan carpenter

Reply via email to