回覆: [PATCH] net: phy: ncsi: Correct the endian of the checksum

Jacky Chou jacky_chou at aspeedtech.com
Sun Mar 3 03:14:43 CET 2024


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.carpenter at linaro.org>
寄件日期: 2024年2月5日 下午 11:04
收件者: Jacky Chou <jacky_chou at aspeedtech.com>
副本: joe.hershberger at ni.com <joe.hershberger at ni.com>; rfried.dev at gmail.com <rfried.dev at gmail.com>; trini at konsulko.com <trini at konsulko.com>; michal.simek at amd.com <michal.simek at amd.com>; marek.vasut+renesas at mailbox.org <marek.vasut+renesas at mailbox.org>; u-boot at lists.denx.de <u-boot at lists.denx.de>; BMC-SW <BMC-SW at 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_chou at aspeedtech.com>

Reviewed-by: Dan Carpenter <dan.carpenter at 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



More information about the U-Boot mailing list