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: <xh2nnmdasqngkycxqvpplxzwu5cqjnjsxp2ssosaholo5iexti@7lzdftu6dmyi>
Date: Sun, 4 Jun 2023 11:13:14 +0000
From: Alvin Šipraga <ALSI@...g-olufsen.dk>
To: Christian Lamparter <chunkeey@...il.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "luizluca@...il.com"
	<luizluca@...il.com>, "linus.walleij@...aro.org" <linus.walleij@...aro.org>,
	"andrew@...n.ch" <andrew@...n.ch>, "olteanv@...il.com" <olteanv@...il.com>,
	"f.fainelli@...il.com" <f.fainelli@...il.com>
Subject: Re: [PATCH v1] net: dsa: realtek: rtl8365mb: add missing case for
 digital interface 0

On Sat, Jun 03, 2023 at 12:53:48AM +0200, Christian Lamparter wrote:
> when bringing up the switch on a Netgear WNDAP660, I observed that
> no traffic got passed from the RTL8363 to the ethernet interface...

Could you share the chip ID/version you read out from this RTL8363SB? I haven't
seen this part number but maybe it's equivalent to some other known switch.

> 
> Turns out, this was because the dropped case for
> RTL8365MB_DIGITAL_INTERFACE_SELECT_REG(0) that
> got deleted by accident.

Could you show where exactly this macro is called with 0 as an argument? AFAICT
this patch doesn't change anything, as the macro is called in only one place
with rtl8365mb_extint::id as an argument, but these id fields are statically
populated in rtl8365mb_chip_info and I only see values 1 or 2 there.

If you are introducing support for a new switch, why not just use a value of 1
instead? The macro will then map to ..._REG0 as you desire.

Kind regards,
Alvin

> 
> Fixes: d18b59f48b31 ("net: dsa: realtek: rtl8365mb: rename extport to extint")
> Signed-off-by: Christian Lamparter <chunkeey@...il.com>
> ---
> RTL8365MB_DIGITAL_INTERFACE_SELECT_REG(0) is shared between
> extif0 and extif1. There's an extra
> RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_MASK later on to diffy
> up between bits for extif0 and extif1.
> ---
>  drivers/net/dsa/realtek/rtl8365mb.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/dsa/realtek/rtl8365mb.c b/drivers/net/dsa/realtek/rtl8365mb.c
> index 6c00e6dcb193..57aa39f5b341 100644
> --- a/drivers/net/dsa/realtek/rtl8365mb.c
> +++ b/drivers/net/dsa/realtek/rtl8365mb.c
> @@ -209,7 +209,8 @@
>  #define RTL8365MB_DIGITAL_INTERFACE_SELECT_REG0		0x1305 /* EXT1 */
>  #define RTL8365MB_DIGITAL_INTERFACE_SELECT_REG1		0x13C3 /* EXT2 */
>  #define RTL8365MB_DIGITAL_INTERFACE_SELECT_REG(_extint) \
> -		((_extint) == 1 ? RTL8365MB_DIGITAL_INTERFACE_SELECT_REG0 : \
> +		((_extint) == 0 ? RTL8365MB_DIGITAL_INTERFACE_SELECT_REG0 : \
> +		 (_extint) == 1 ? RTL8365MB_DIGITAL_INTERFACE_SELECT_REG0 : \
>  		 (_extint) == 2 ? RTL8365MB_DIGITAL_INTERFACE_SELECT_REG1 : \
>  		 0x0)
>  #define   RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_MASK(_extint) \
> -- 
> 2.40.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ