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] [thread-next>] [day] [month] [year] [list]
Message-ID: <c342fbf3-44b2-ce22-888f-363b709ea986@linutronix.de>
Date:   Wed, 10 Nov 2021 09:19:04 +0100
From:   Martin Kaistra <martin.kaistra@...utronix.de>
To:     Florian Fainelli <f.fainelli@...il.com>
Cc:     Richard Cochran <richardcochran@...il.com>,
        Kurt Kanzenbach <kurt@...utronix.de>,
        Vladimir Oltean <olteanv@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        John Stultz <john.stultz@...aro.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Stephen Boyd <sboyd@...nel.org>,
        Russell King <linux@...linux.org.uk>,
        Marc Kleine-Budde <mkl@...gutronix.de>,
        linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
        Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>
Subject: Re: [PATCH v2 1/7] net: dsa: b53: Add BroadSync HD register
 definitions

Am 09.11.21 um 19:04 schrieb Florian Fainelli:
> On 11/9/21 1:50 AM, Martin Kaistra wrote:
>> From: Kurt Kanzenbach <kurt@...utronix.de>
>>
>> Add register definitions for the BroadSync HD features of
>> BCM53128. These will be used to enable PTP support.
>>
>> Signed-off-by: Kurt Kanzenbach <kurt@...utronix.de>
>> Signed-off-by: Martin Kaistra <martin.kaistra@...utronix.de>
>> ---
> 
> [snip]
> 
>> +/*************************************************************************
>> + * ARL Control Registers
>> + *************************************************************************/
>> +
>> +/* Multiport Control Register (16 bit) */
>> +#define B53_MPORT_CTRL			0x0e
>> +#define   MPORT_CTRL_DIS_FORWARD	0
>> +#define   MPORT_CTRL_CMP_ETYPE		1
>> +#define   MPORT_CTRL_CMP_ADDR		2
>> +#define   MPORT_CTRL_CMP_ADDR_ETYPE	3
>> +#define   MPORT_CTRL_SHIFT(x)		((x) << 1)
>> +#define   MPORT_CTRL_MASK		0x2
> 
> The mask should be 0x3 since this is a 2-bit wide field.
> 

Correct, thanks.
Currently, this mask is not used, as I am just writing
MPORT0_TS_EN |
  (MPORT_CTRL_CMP_ETYPE << MPORT_CTRL_SHIFT(0))
to the register. Should I keep the definition anyway?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ