lkml.org 
[lkml]   [2018]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] net: dsa: bcm_sf2: remove redundant variable off
From
Date
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

\
 
 \ /
  Last update: 2018-07-09 18:11    [W:0.049 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site