Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: dsa: b53: Make b53_enable_cpu_port() take a port argument

In preparation for future changes allowing the configuring of multiple
CPU ports, make b53_enable_cpu_port() take a port argument.

Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Florian Fainelli and committed by
David S. Miller
299752a7 7131cc9f

+5 -6
+5 -6
drivers/net/dsa/b53/b53_common.c
··· 538 538 b53_write8(dev, B53_CTRL_PAGE, B53_PORT_CTRL(port), reg); 539 539 } 540 540 541 - static void b53_enable_cpu_port(struct b53_device *dev) 541 + static void b53_enable_cpu_port(struct b53_device *dev, int port) 542 542 { 543 - unsigned int cpu_port = dev->cpu_port; 544 543 u8 port_ctrl; 545 544 546 545 /* BCM5325 CPU port is at 8 */ 547 - if ((is5325(dev) || is5365(dev)) && cpu_port == B53_CPU_PORT_25) 548 - cpu_port = B53_CPU_PORT; 546 + if ((is5325(dev) || is5365(dev)) && port == B53_CPU_PORT_25) 547 + port = B53_CPU_PORT; 549 548 550 549 port_ctrl = PORT_CTRL_RX_BCST_EN | 551 550 PORT_CTRL_RX_MCST_EN | 552 551 PORT_CTRL_RX_UCST_EN; 553 - b53_write8(dev, B53_CTRL_PAGE, B53_PORT_CTRL(cpu_port), port_ctrl); 552 + b53_write8(dev, B53_CTRL_PAGE, B53_PORT_CTRL(port), port_ctrl); 554 553 } 555 554 556 555 static void b53_enable_mib(struct b53_device *dev) ··· 819 820 if (BIT(port) & ds->enabled_port_mask) 820 821 b53_enable_port(ds, port, NULL); 821 822 else if (dsa_is_cpu_port(ds, port)) 822 - b53_enable_cpu_port(dev); 823 + b53_enable_cpu_port(dev, port); 823 824 else 824 825 b53_disable_port(ds, port, NULL); 825 826 }