"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "drivers/net/dsa/qca8k.c" between
linux-5.3-rc3.tar.gz and linux-5.3-rc4.tar.gz

About: The full source of the development Linux kernel 5.3 (release candidate).

qca8k.c  (linux-5.3-rc3):qca8k.c  (linux-5.3-rc4)
// SPDX-License-Identifier: GPL-2.0 // SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2009 Felix Fietkau <nbd@nbd.name> * Copyright (C) 2009 Felix Fietkau <nbd@nbd.name>
* Copyright (C) 2011-2012 Gabor Juhos <juhosg@openwrt.org> * Copyright (C) 2011-2012 Gabor Juhos <juhosg@openwrt.org>
* Copyright (c) 2015, The Linux Foundation. All rights reserved. * Copyright (c) 2015, 2019, The Linux Foundation. All rights reserved.
* Copyright (c) 2016 John Crispin <john@phrozen.org> * Copyright (c) 2016 John Crispin <john@phrozen.org>
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <linux/phy.h> #include <linux/phy.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <net/dsa.h> #include <net/dsa.h>
#include <linux/of_net.h> #include <linux/of_net.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/if_bridge.h> #include <linux/if_bridge.h>
skipping to change at line 586 skipping to change at line 586
u32 internal_mdio_mask = 0, external_mdio_mask = 0, reg; u32 internal_mdio_mask = 0, external_mdio_mask = 0, reg;
struct device_node *ports, *port; struct device_node *ports, *port;
int err; int err;
ports = of_get_child_by_name(priv->dev->of_node, "ports"); ports = of_get_child_by_name(priv->dev->of_node, "ports");
if (!ports) if (!ports)
return -EINVAL; return -EINVAL;
for_each_available_child_of_node(ports, port) { for_each_available_child_of_node(ports, port) {
err = of_property_read_u32(port, "reg", &reg); err = of_property_read_u32(port, "reg", &reg);
if (err) if (err) {
of_node_put(port);
of_node_put(ports);
return err; return err;
}
if (!dsa_is_user_port(priv->ds, reg)) if (!dsa_is_user_port(priv->ds, reg))
continue; continue;
if (of_property_read_bool(port, "phy-handle")) if (of_property_read_bool(port, "phy-handle"))
external_mdio_mask |= BIT(reg); external_mdio_mask |= BIT(reg);
else else
internal_mdio_mask |= BIT(reg); internal_mdio_mask |= BIT(reg);
} }
of_node_put(ports);
if (!external_mdio_mask && !internal_mdio_mask) { if (!external_mdio_mask && !internal_mdio_mask) {
dev_err(priv->dev, "no PHYs are defined.\n"); dev_err(priv->dev, "no PHYs are defined.\n");
return -EINVAL; return -EINVAL;
} }
/* The QCA8K_MDIO_MASTER_EN Bit, which grants access to PHYs through /* The QCA8K_MDIO_MASTER_EN Bit, which grants access to PHYs through
* the MDIO_MASTER register also _disconnects_ the external MDC * the MDIO_MASTER register also _disconnects_ the external MDC
* passthrough to the internal PHYs. It's not possible to use both * passthrough to the internal PHYs. It's not possible to use both
* configurations at the same time! * configurations at the same time!
* *
skipping to change at line 938 skipping to change at line 942
static int static int
qca8k_port_enable(struct dsa_switch *ds, int port, qca8k_port_enable(struct dsa_switch *ds, int port,
struct phy_device *phy) struct phy_device *phy)
{ {
struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv; struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv;
qca8k_port_set_status(priv, port, 1); qca8k_port_set_status(priv, port, 1);
priv->port_sts[port].enabled = 1; priv->port_sts[port].enabled = 1;
phy_support_asym_pause(phy);
return 0; return 0;
} }
static void static void
qca8k_port_disable(struct dsa_switch *ds, int port) qca8k_port_disable(struct dsa_switch *ds, int port)
{ {
struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv; struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv;
qca8k_port_set_status(priv, port, 0); qca8k_port_set_status(priv, port, 0);
priv->port_sts[port].enabled = 0; priv->port_sts[port].enabled = 0;
 End of changes. 5 change blocks. 
2 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)