netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Christian Marangi <ansuelsmth@gmail.com>
Cc: "Russell King (Oracle)" <linux@armlinux.org.uk>,
	Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Robert Marko <robimarko@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel test robot <lkp@intel.com>
Subject: Re: [net-next PATCH] net: phy: aquantia: drop wrong endianness conversion for addr and CRC
Date: Wed, 22 Nov 2023 10:23:47 -0800	[thread overview]
Message-ID: <20231122102347.0bde86bb@kernel.org> (raw)
In-Reply-To: <655e4025.df0a0220.50550.3d70@mx.google.com>

On Wed, 22 Nov 2023 18:53:39 +0100 Christian Marangi wrote:
> So they DO get converted to the HOST endian on reading the firmware from
> an nvmem cell or a filesystem?

They don't get converted when "reading from nvmem / fs". 
They get converted when you do:

		word = get_unaligned((const u32 *)(data + pos));

get_unaligned() is basically:

#if BIGENDIAN
#define		get_unaligned	get_unaligned_be32
#else
#define		get_unaligned	get_unaligned_le32
#endif

so you'll get different behavior here depending on the CPU.

  reply	other threads:[~2023-11-22 18:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-22 17:08 [net-next PATCH] net: phy: aquantia: drop wrong endianness conversion for addr and CRC Christian Marangi
2023-11-22 17:24 ` Russell King (Oracle)
2023-11-22 17:53   ` Christian Marangi
2023-11-22 18:23     ` Jakub Kicinski [this message]
2023-11-22 18:39       ` Christian Marangi
2023-11-22 18:53     ` Russell King (Oracle)
2023-11-22 19:55       ` Christian Marangi
2023-11-22 20:25         ` Russell King (Oracle)
2023-11-22 21:09           ` Christian Marangi
2023-11-22 22:31             ` Russell King (Oracle)
2023-11-22 22:37               ` Christian Marangi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231122102347.0bde86bb@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=ansuelsmth@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lkp@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robimarko@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).