lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250725072956.GH1266901@horms.kernel.org>
Date: Fri, 25 Jul 2025 08:29:56 +0100
From: Simon Horman <horms@...nel.org>
To: Tristram.Ha@...rochip.com
Cc: Woojung.Huh@...rochip.com, andrew@...n.ch, olteanv@...il.com,
	kuba@...nel.org, robh@...nel.org, krzk+dt@...nel.org,
	conor+dt@...nel.org, maxime.chevallier@...tlin.com,
	davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
	marex@...x.de, UNGLinuxDriver@...rochip.com,
	devicetree@...r.kernel.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v4 4/7] net: dsa: microchip: Use different
 registers for KSZ8463

On Fri, Jul 25, 2025 at 12:17:26AM +0000, Tristram.Ha@...rochip.com wrote:
> > On Thu, Jul 24, 2025 at 02:28:56AM +0000, Tristram.Ha@...rochip.com wrote:
> > > > On Wed, Jul 23, 2025 at 02:25:27AM +0000, Tristram.Ha@...rochip.com wrote:
> > > > > > On Sun, Jul 20, 2025 at 11:17:03AM +0100, Simon Horman wrote:
> > > > > > > On Fri, Jul 18, 2025 at 06:21:03PM -0700, Tristram.Ha@...rochip.com
> > wrote:

...

> > I feel that we are talking past each other.
> > Let's try to find a common understanding.
> 
> It is really about the register definition of this specific register.
> In KSZ8863 when presenting in 16-bit the value is 0x07ff, but in KSZ8463
> it is 0xff07.  It is the fault of the hardware to define such value.

If the behaviour of this register is different to others, then I guess a
special case is a reasonable approach. Although I would have thought there
is a better way.

I would suggest adding a comment to the code explaining that this is a
special case. And I would suggest revisiting this if more special cases are
needed.

> Note that in the new patch KSZ8463 SPI driver implements its own access
> functions, so native mode is used instead and there is no automatic
> swapping depending on the big-endian or little-endian format.  Still this
> code is needed to program the register correctly.

Thanks for taking time to respond to my questions.
I think we should let the matter rest here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ