[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2f4bab8e-6f4f-cec1-77cc-4caeb95ebf2f@gmail.com>
Date: Mon, 9 Jul 2018 09:10:00 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Andrew Lunn <andrew@...n.ch>, Colin King <colin.king@...onical.com>
Cc: Vivien Didelot <vivien.didelot@...oirfairelinux.com>,
"David S . Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: dsa: bcm_sf2: remove redundant variable off
Hi Andrew,
On 07/04/2018 07:25 AM, Andrew Lunn wrote:
> Hi Florian
>
> I this a bug? It seems to be a result of moving to
> b53_disable_port() in f86ad77faf.
>
> Before you would handle the CPU port differently than a normal
> port. After this change, there is no difference?
This is not a bug actually but it is not obvious because there was a
separate definition added in bcm_sf2_regs.h for port 8 named
CORE_IMP_CTL. The logic in b53_regs.h is:
#define B53_PORT_CTRL(i) (0x00 + (i))
and due to the memory map used in bcm_sf2, that would translate into:
8 << 2 = 0x20 which is correct here and matches the definition of
CORE_IMP_CTL.
in fact, the new code is more correct because any port could be a DSA
CPU port, whereas before we assumed that port 8 == CPU port, which is
not necessarily true.
Thanks!
--
Florian
Powered by blists - more mailing lists