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:
 <DM3PR11MB8736BC7EF3A66720427F3775ECF22@DM3PR11MB8736.namprd11.prod.outlook.com>
Date: Mon, 10 Feb 2025 17:50:57 +0000
From: <Tristram.Ha@...rochip.com>
To: <T.Scherer@...elmann.de>
CC: <netdev@...r.kernel.org>, <Woojung.Huh@...rochip.com>,
	<UNGLinuxDriver@...rochip.com>, <andrew@...n.ch>, <olteanv@...il.com>,
	<davem@...emloft.net>, <kuba@...nel.org>, <edumazet@...gle.com>,
	<pabeni@...hat.com>, <horms@...nel.org>, <linux@...musvillemoes.dk>,
	<kernel@...gutronix.de>
Subject: RE: [PATCH] net: dsa: microchip: KSZ8563 register regmap alignment to
 32 bit boundaries

> Subject: Re: [PATCH] net: dsa: microchip: KSZ8563 register regmap alignment to 32 bit
> boundaries
> 
> [Some people who received this message don't often get email from
> t.scherer@...elmann.de. Learn why this is important at
> https://aka.ms/LearnAboutSenderIdentification ]
> 
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content
> is safe
> 
> Hello,
> 
> On Fri, Feb 07, 2025 at 05:00:37PM -0800, Jakub Kicinski wrote:
> > On Thu,  6 Feb 2025 13:22:45 +0100 Thorsten Scherer wrote:
> > > -   regmap_reg_range(0x1122, 0x1127),
> > > -   regmap_reg_range(0x112a, 0x112b),
> > > -   regmap_reg_range(0x1136, 0x1139),
> > > -   regmap_reg_range(0x113e, 0x113f),
> > > +   regmap_reg_range(0x1120, 0x112b),
> > > +   regmap_reg_range(0x1134, 0x113b),
> > > +   regmap_reg_range(0x113c, 0x113f),
> >
> > can these two not be merged?
> 
> I am not 100% sure.   But atm I don't see a reason why they could not.

When KSZ9896 register mapping was changed I already explained that
0xN100-0xN13F ranges map to PHY registers 0-0x1F, so it is safe to assign
only 2 ranges: regmap_reg_range(0x1100, 0x111f),
regmap_reg_range(0x0x1120, 0x113f).

The formula for accessing PHY register through port register is
0xN100 + reg * 2.

There is a bug in which high range 0xN120-0xN13f write has to be 32-bit.

> > >     regmap_reg_range(0x1400, 0x1401),
> > >     regmap_reg_range(0x1403, 0x1403),
> > >     regmap_reg_range(0x1410, 0x1417),
> > > @@ -747,10 +746,9 @@ static const struct regmap_range ksz8563_valid_regs[] =
> {
> > >     regmap_reg_range(0x2030, 0x2030),
> > >     regmap_reg_range(0x2100, 0x2111),
> > >     regmap_reg_range(0x211a, 0x211d),
> > > -   regmap_reg_range(0x2122, 0x2127),
> > > -   regmap_reg_range(0x212a, 0x212b),
> > > -   regmap_reg_range(0x2136, 0x2139),
> > > -   regmap_reg_range(0x213e, 0x213f),
> > > +   regmap_reg_range(0x2120, 0x212b),
> > > +   regmap_reg_range(0x2134, 0x213b),
> > > +   regmap_reg_range(0x213c, 0x213f),
> >
> > and these?
> 
> Dito.
> 
> Will send a v2 as soon as I can get my hands on the test board again
> (next few days).


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ