* [PATCH net] sit: use ipv6_mod_enabled to check if ipv6 is disabled
From: Hangbin Liu @ 2019-02-25 4:12 UTC (permalink / raw)
To: netdev; +Cc: Stefano Brivio, David S . Miller, David Ahern, Hangbin Liu
ipv6_mod_enabled() is more safe and gentle to check if ipv6 is disabled
at running time.
Fixes: 173656accaf5 ("sit: check if IPv6 enabled before calling ip6_err_gen_icmpv6_unreach()")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
net/ipv6/sit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index e8a1dabef803..eea1f19985a7 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -546,7 +546,7 @@ static int ipip6_err(struct sk_buff *skb, u32 info)
}
err = 0;
- if (__in6_dev_get(skb->dev) &&
+ if (ipv6_mod_enabled() &&
!ip6_err_gen_icmpv6_unreach(skb, iph->ihl * 4, type, data_len))
goto out;
--
2.19.2
^ permalink raw reply related
* [PATCH net] geneve: use ipv6_mod_enabled to check if ipv6 is disabled
From: Hangbin Liu @ 2019-02-25 4:13 UTC (permalink / raw)
To: netdev; +Cc: Stefano Brivio, David S . Miller, David Ahern, Hangbin Liu
ipv6_mod_enabled() is more safe and gentle to check if ipv6 is disabled
at running time.
Fixes: c0a47e44c098 ("geneve: should not call rt6_lookup() when ipv6 was disabled")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
drivers/net/geneve.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
index 3377ac66a347..42c5e43ece68 100644
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
@@ -1514,7 +1514,7 @@ static void geneve_link_config(struct net_device *dev,
case AF_INET6: {
struct rt6_info *rt;
- if (!__in6_dev_get(dev))
+ if (!ipv6_mod_enabled())
break;
rt = rt6_lookup(geneve->net, &info->key.u.ipv6.dst, NULL, 0,
--
2.19.2
^ permalink raw reply related
* Re: [PATCH net-next v2 0/7] net: phy: marvell10g: Add 2.5GBaseT support
From: David Miller @ 2019-02-25 1:45 UTC (permalink / raw)
To: maxime.chevallier
Cc: netdev, linux-kernel, andrew, f.fainelli, hkallweit1, linux,
linux-arm-kernel, antoine.tenart, thomas.petazzoni,
gregory.clement, miquel.raynal, nadavh, stefanc, mw
In-Reply-To: <20190222233744.25735-1-maxime.chevallier@bootlin.com>
From: Maxime Chevallier <maxime.chevallier@bootlin.com>
Date: Sat, 23 Feb 2019 00:37:37 +0100
> This series adds the missing bits necessary to fully support 2.5GBaseT
> in the Marvell Alaska PHYs.
>
> The main points for that support are :
>
> - Making use of the .get_features call, recently introduced by Heiner
> and Andrew, that allows having a fully populated list of supported
> modes, including 2500BaseT.
>
> - Configuring the MII to 2500BaseX when establishing a link at 2.5G
>
> - Adding a small quirk to take into account the fact that some PHYs in
> the family won't report the correct supported abilities
>
> The rest of the series consists of small cosmetic improvements such as
> using the correct helper to set a linkmode bit and adding macros for the
> PHY ids.
>
> We also add support for the 88E2110 PHY, which doesn't require the
> quirk, and support for 2500BaseT in the PPv2 driver, in order to have a
> fully working setup on the MacchiatoBin board.
>
> Changes since V1 : Fixed formatting issue in patch 01, rebased.
Series applied, thank you.
^ permalink raw reply
* Re: [PATCH v4 net-next 0/4] net: dsa: microchip: add MIB counters support
From: David Miller @ 2019-02-25 1:50 UTC (permalink / raw)
To: Tristram.Ha
Cc: sergio.paracuellos, andrew, f.fainelli, pavel, UNGLinuxDriver,
netdev
In-Reply-To: <1550882211-10381-1-git-send-email-Tristram.Ha@microchip.com>
From: <Tristram.Ha@microchip.com>
Date: Fri, 22 Feb 2019 16:36:46 -0800
> This series of patches is to modify the KSZ9477 DSA driver to read MIB
> counters periodically to avoid overflow.
Series applied.
^ permalink raw reply
* Re: [PATCH net] sit: use ipv6_mod_enabled to check if ipv6 is disabled
From: Eric Dumazet @ 2019-02-25 4:24 UTC (permalink / raw)
To: Hangbin Liu, netdev; +Cc: Stefano Brivio, David S . Miller, David Ahern
In-Reply-To: <20190225041243.9753-1-liuhangbin@gmail.com>
On 02/24/2019 08:12 PM, Hangbin Liu wrote:
> ipv6_mod_enabled() is more safe and gentle to check if ipv6 is disabled
> at running time.
>
Why is it better exactly ?
IPv6 can be enabled on the host, but disabled per device
/proc/sys/net/ipv6/conf/{name}/disable_ipv6
> Fixes: 173656accaf5 ("sit: check if IPv6 enabled before calling ip6_err_gen_icmpv6_unreach()")
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
> ---
> net/ipv6/sit.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
> index e8a1dabef803..eea1f19985a7 100644
> --- a/net/ipv6/sit.c
> +++ b/net/ipv6/sit.c
> @@ -546,7 +546,7 @@ static int ipip6_err(struct sk_buff *skb, u32 info)
> }
>
> err = 0;
> - if (__in6_dev_get(skb->dev) &&
> + if (ipv6_mod_enabled() &&
> !ip6_err_gen_icmpv6_unreach(skb, iph->ihl * 4, type, data_len))
> goto out;
>
>
^ permalink raw reply
* Re: [PATCH net-next 00/15] mlxsw: spectrum_acl: Don't take rtnl mutex for region rehash
From: David Miller @ 2019-02-25 4:26 UTC (permalink / raw)
To: idosch; +Cc: netdev, jiri, mlxsw
In-Reply-To: <20190224064525.14913-1-idosch@mellanox.com>
From: Ido Schimmel <idosch@mellanox.com>
Date: Sun, 24 Feb 2019 06:46:21 +0000
> Jiri says:
>
> During region rehash, a new region is created with a more optimized set
> of masks (ERPs). When transitioning to the new region, all the rules
> from the old region are copied one-by-one to the new region. This
> transition can be time consuming and currently done under RTNL lock.
>
> In order to remove RTNL lock dependency during region rehash, introduce
> multiple smaller locks guarding dedicated structures or parts of them.
> That is the vast majority of this patchset. Only patch #1 is simple
> cleanup and patches 12-15 are improving or introducing new selftests.
Series applied, thanks.
^ permalink raw reply
* Re: [PATCH net-next] net/sched: act_tunnel_key: Add dst_cache support
From: David Miller @ 2019-02-25 5:52 UTC (permalink / raw)
To: wenxu; +Cc: jhs, netdev
In-Reply-To: <1550822292-14980-1-git-send-email-wenxu@ucloud.cn>
From: wenxu@ucloud.cn
Date: Fri, 22 Feb 2019 15:58:12 +0800
> From: wenxu <wenxu@ucloud.cn>
>
> The metadata_dst is not init the dst_cache which make the
> ip_md_tunnel_xmit can't use the dst_cache. It will lookup
> route table every packets.
>
> Signed-off-by: wenxu <wenxu@ucloud.cn>
Applied.
^ permalink raw reply
* Re: [PATCH] ila: Fix uninitialised return value in ila_xlat_nl_cmd_flush
From: David Miller @ 2019-02-25 5:55 UTC (permalink / raw)
To: herbert
Cc: dan.carpenter, kbuild, kbuild-all, linux-wireless, johannes.berg,
netdev
In-Reply-To: <20190223053047.tiwcuvs6tcg2htie@gondor.apana.org.au>
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Sat, 23 Feb 2019 13:30:47 +0800
> This patch fixes an uninitialised return value error in
> ila_xlat_nl_cmd_flush.
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Fixes: 6c4128f65857 ("rhashtable: Remove obsolete...")
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Applied, thanks Herbert.
^ permalink raw reply
* Re: [PATCH net-next v2 0/3] ipv4/v6: icmp: small cleanup and update
From: David Miller @ 2019-02-25 5:57 UTC (permalink / raw)
To: wangkefeng.wang; +Cc: netdev, eric.dumazet
In-Reply-To: <20190223072828.159975-1-wangkefeng.wang@huawei.com>
From: Kefeng Wang <wangkefeng.wang@huawei.com>
Date: Sat, 23 Feb 2019 15:28:25 +0800
> v2:
> - Add cover letter and user proper patch subject-prefix suggested-by Eric Dumazet
>
> This patch series contains some small cleanup and update,
> 1) use icmp/v6_sk_exit when icmp_sk_init fails instead of open-code
> 2) use new percpu allocation interface for the ipv6.icmp_sk
Series applied, thanks.
^ permalink raw reply
* Re: [PATCHv3 net-next] tls: Return type of non-data records retrieved using MSG_PEEK in recvmsg
From: David Miller @ 2019-02-25 5:59 UTC (permalink / raw)
To: vakul.garg; +Cc: netdev, borisp, aviadye, davejwatson, doronrk
In-Reply-To: <20190223084010.17021-1-vakul.garg@nxp.com>
From: Vakul Garg <vakul.garg@nxp.com>
Date: Sat, 23 Feb 2019 08:42:37 +0000
> The patch enables returning 'type' in msghdr for records that are
> retrieved with MSG_PEEK in recvmsg. Further it prevents records peeked
> from socket from getting clubbed with any other record of different
> type when records are subsequently dequeued from strparser.
>
> For each record, we now retain its type in sk_buff's control buffer
> cb[]. Inside control buffer, record's full length and offset are already
> stored by strparser in 'struct strp_msg'. We store record type after
> 'struct strp_msg' inside 'struct tls_msg'. For tls1.2, the type is
> stored just after record dequeue. For tls1.3, the type is stored after
> record has been decrypted.
>
> Inside process_rx_list(), before processing a non-data record, we check
> that we must be able to return back the record type to the user
> application. If not, the decrypted records in tls context's rx_list is
> left there without consuming any data.
>
> Fixes: 692d7b5d1f912 ("tls: Fix recvmsg() to be able to peek across
> multiple records")
> Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Applied, but please don't break up long Fixes: lines into multiple lines.
Always keep it all on one single line.
^ permalink raw reply
* RE: [PATCHv3 net-next] tls: Return type of non-data records retrieved using MSG_PEEK in recvmsg
From: Vakul Garg @ 2019-02-25 6:02 UTC (permalink / raw)
To: David Miller
Cc: netdev@vger.kernel.org, borisp@mellanox.com, aviadye@mellanox.com,
davejwatson@fb.com, doronrk@fb.com
In-Reply-To: <20190224.215904.2270271071160812988.davem@davemloft.net>
> -----Original Message-----
> From: netdev-owner@vger.kernel.org <netdev-owner@vger.kernel.org> On
> Behalf Of David Miller
> Sent: Monday, February 25, 2019 11:29 AM
> To: Vakul Garg <vakul.garg@nxp.com>
> Cc: netdev@vger.kernel.org; borisp@mellanox.com;
> aviadye@mellanox.com; davejwatson@fb.com; doronrk@fb.com
> Subject: Re: [PATCHv3 net-next] tls: Return type of non-data records
> retrieved using MSG_PEEK in recvmsg
>
> From: Vakul Garg <vakul.garg@nxp.com>
> Date: Sat, 23 Feb 2019 08:42:37 +0000
>
> > The patch enables returning 'type' in msghdr for records that are
> > retrieved with MSG_PEEK in recvmsg. Further it prevents records peeked
> > from socket from getting clubbed with any other record of different
> > type when records are subsequently dequeued from strparser.
> >
> > For each record, we now retain its type in sk_buff's control buffer
> > cb[]. Inside control buffer, record's full length and offset are
> > already stored by strparser in 'struct strp_msg'. We store record type
> > after 'struct strp_msg' inside 'struct tls_msg'. For tls1.2, the type
> > is stored just after record dequeue. For tls1.3, the type is stored
> > after record has been decrypted.
> >
> > Inside process_rx_list(), before processing a non-data record, we
> > check that we must be able to return back the record type to the user
> > application. If not, the decrypted records in tls context's rx_list is
> > left there without consuming any data.
> >
> > Fixes: 692d7b5d1f912 ("tls: Fix recvmsg() to be able to peek across
> > multiple records")
> > Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
>
> Applied, but please don't break up long Fixes: lines into multiple lines.
> Always keep it all on one single line.
I am sorry.
Since I fixed this problem in v3 patch, did you still find it?
I am confused.
^ permalink raw reply
* Re: [PATCH 0/3] soc: fsl: dpio: enable and configure cache stashing
From: David Miller @ 2019-02-25 6:06 UTC (permalink / raw)
To: ioana.ciornei
Cc: leoyang.li, roy.pledge, ruxandra.radulescu, laurentiu.tudor,
horia.geanta, brouer, netdev, linux-kernel
In-Reply-To: <20190223084816.28985-1-ioana.ciornei@nxp.com>
From: Ioana Ciornei <ioana.ciornei@nxp.com>
Date: Sat, 23 Feb 2019 08:48:42 +0000
> The first two patches enable cache stashing and configure the core cluster
> destination per software portal while the third patch is the one
> configuring the amount of stashing on a queue.
Should I merge this series in via my networking tree?
Thanks.
^ permalink raw reply
* Re: [Patch net-next 00/12] code optimizations & bugfixes for HNS3 driver
From: David Miller @ 2019-02-25 6:10 UTC (permalink / raw)
To: tanhuazhong; +Cc: netdev, linux-kernel, salil.mehta, yisen.zhuang, linuxarm
In-Reply-To: <1550913739-13232-1-git-send-email-tanhuazhong@huawei.com>
From: Huazhong Tan <tanhuazhong@huawei.com>
Date: Sat, 23 Feb 2019 17:22:07 +0800
> This patchset includes bugfixes and code optimizations for
> the HNS3 ethernet controller driver.
Series applied, thanks.
^ permalink raw reply
* Re: [PATCH] tun: fix blocking read
From: David Miller @ 2019-02-25 6:12 UTC (permalink / raw)
To: mail; +Cc: netdev, linux-kernel
In-Reply-To: <20190223115313.15064-1-mail@timurcelik.de>
From: Timur Celik <mail@timurcelik.de>
Date: Sat, 23 Feb 2019 12:53:13 +0100
> This patch moves setting of the current state into the loop. Otherwise
> the task may end up in a busy wait loop if none of the break conditions
> are met.
>
> Signed-off-by: Timur Celik <mail@timurcelik.de>
Applied and queued up for -stable, thanks.
^ permalink raw reply
* Re: [PATCH net-next v4] ip_tunnel: Add dst_cache support in lwtunnel_state of ip tunnel
From: David Miller @ 2019-02-25 6:14 UTC (permalink / raw)
To: wenxu; +Cc: netdev
In-Reply-To: <1550928774-20575-1-git-send-email-wenxu@ucloud.cn>
From: wenxu@ucloud.cn
Date: Sat, 23 Feb 2019 21:32:54 +0800
> From: wenxu <wenxu@ucloud.cn>
>
> The lwtunnel_state is not init the dst_cache Which make the
> ip_md_tunnel_xmit can't use the dst_cache. It will lookup
> route table every packets.
>
> Signed-off-by: wenxu <wenxu@ucloud.cn>
Applied.
^ permalink raw reply
* [PATCH v3 2/2] drivers: net: phy: mdio-mux: Add support for Generic Mux controls
From: Pankaj Bansal @ 2019-02-25 6:16 UTC (permalink / raw)
To: Leo Li, Peter Rosin, Andrew Lunn, Florian Fainelli,
Heiner Kallweit
Cc: Pankaj Bansal, netdev@vger.kernel.org
In-Reply-To: <20190225114121.7878-1-pankaj.bansal@nxp.com>
Add support for Generic Mux controls, when Mdio mux node is a consumer
of mux produced by some other device.
Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
---
Notes:
V3:
- Avoid recast from platform_get_drvdata
- Check mux_control_deselect output in switch_fn
- rearrange swithc_fn code to reduce code indentation by one tab
- Add do_deselect boolean in driver data to indicate that mux_control_deselect
has to be called, becuase mux_control_select has been called once.
V2:
- Moved the changes from mdio-mux module to new module mdio-mux-multiplexer
- defined new CONFIG
- using new compatible "mdio-mux-multiplexer"
drivers/net/phy/Kconfig | 12 +++
drivers/net/phy/Makefile | 1 +
drivers/net/phy/mdio-mux-multiplexer.c | 122 +++++++++++++++++++++++
3 files changed, 135 insertions(+)
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index 3d187cd50eb0..7f66af446ec7 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -87,6 +87,18 @@ config MDIO_BUS_MUX_MMIOREG
Currently, only 8/16/32 bits registers are supported.
+config MDIO_BUS_MUX_MULTIPLEXER
+ tristate "MDIO bus multiplexer using kernel multiplexer subsystem"
+ depends on OF
+ select MULTIPLEXER
+ select MDIO_BUS_MUX
+ help
+ This module provides a driver for MDIO bus multiplexer
+ that is controlled via the kernel multiplexer subsystem. The
+ bus multiplexer connects one of several child MDIO busses to
+ a parent bus. Child bus selection is under the control of
+ the kernel multiplexer subsystem.
+
config MDIO_CAVIUM
tristate
diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile
index 5805c0b7d60e..766106237a90 100644
--- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile
@@ -29,6 +29,7 @@ obj-$(CONFIG_MDIO_BUS_MUX) += mdio-mux.o
obj-$(CONFIG_MDIO_BUS_MUX_BCM_IPROC) += mdio-mux-bcm-iproc.o
obj-$(CONFIG_MDIO_BUS_MUX_GPIO) += mdio-mux-gpio.o
obj-$(CONFIG_MDIO_BUS_MUX_MMIOREG) += mdio-mux-mmioreg.o
+obj-$(CONFIG_MDIO_BUS_MUX_MULTIPLEXER) += mdio-mux-multiplexer.o
obj-$(CONFIG_MDIO_CAVIUM) += mdio-cavium.o
obj-$(CONFIG_MDIO_GPIO) += mdio-gpio.o
obj-$(CONFIG_MDIO_HISI_FEMAC) += mdio-hisi-femac.o
diff --git a/drivers/net/phy/mdio-mux-multiplexer.c b/drivers/net/phy/mdio-mux-multiplexer.c
new file mode 100644
index 000000000000..d6564381aa3e
--- /dev/null
+++ b/drivers/net/phy/mdio-mux-multiplexer.c
@@ -0,0 +1,122 @@
+// SPDX-License-Identifier: GPL-2.0+
+/* MDIO bus multiplexer using kernel multiplexer subsystem
+ *
+ * Copyright 2019 NXP
+ */
+
+#include <linux/platform_device.h>
+#include <linux/mdio-mux.h>
+#include <linux/module.h>
+#include <linux/mux/consumer.h>
+
+struct mdio_mux_multiplexer_state {
+ struct mux_control *muxc;
+ bool do_deselect;
+ void *mux_handle;
+};
+
+/**
+ * mdio_mux_multiplexer_switch_fn - This function is called by the mdio-mux
+ * layer when it thinks the mdio bus
+ * multiplexer needs to switch.
+ * @current_child: current value of the mux register.
+ * @desired_child: value of the 'reg' property of the target child MDIO node.
+ * @data: Private data used by this switch_fn passed to mdio_mux_init function
+ * via mdio_mux_init(.., .., .., .., data, ..).
+ *
+ * The first time this function is called, current_child == -1.
+ * If current_child == desired_child, then the mux is already set to the
+ * correct bus.
+ */
+static int mdio_mux_multiplexer_switch_fn(int current_child, int desired_child,
+ void *data)
+{
+ struct platform_device *pdev;
+ struct mdio_mux_multiplexer_state *s;
+ int ret = 0;
+
+ pdev = (struct platform_device *)data;
+ s = platform_get_drvdata(pdev);
+
+ if (!(current_child ^ desired_child))
+ return 0;
+
+ if (s->do_deselect)
+ ret = mux_control_deselect(s->muxc);
+ if (ret) {
+ dev_err(&pdev->dev, "mux_control_deselect failed in %s: %d\n",
+ __func__, ret);
+ return ret;
+ }
+
+ ret = mux_control_select(s->muxc, desired_child);
+ if (!ret) {
+ dev_dbg(&pdev->dev, "%s %d -> %d\n", __func__, current_child,
+ desired_child);
+ s->do_deselect = true;
+ } else {
+ s->do_deselect = false;
+ }
+
+ return ret;
+}
+
+static int mdio_mux_multiplexer_probe(struct platform_device *pdev)
+{
+ struct device *dev = &pdev->dev;
+ struct mdio_mux_multiplexer_state *s;
+ int ret = 0;
+
+ s = devm_kzalloc(&pdev->dev, sizeof(*s), GFP_KERNEL);
+ if (!s)
+ return -ENOMEM;
+
+ s->muxc = devm_mux_control_get(dev, NULL);
+ if (IS_ERR(s->muxc)) {
+ ret = PTR_ERR(s->muxc);
+ if (ret != -EPROBE_DEFER)
+ dev_err(&pdev->dev, "Failed to get mux: %d\n", ret);
+ return ret;
+ }
+
+ platform_set_drvdata(pdev, s);
+
+ ret = mdio_mux_init(&pdev->dev, pdev->dev.of_node,
+ mdio_mux_multiplexer_switch_fn, &s->mux_handle,
+ pdev, NULL);
+
+ return ret;
+}
+
+static int mdio_mux_multiplexer_remove(struct platform_device *pdev)
+{
+ struct mdio_mux_multiplexer_state *s = platform_get_drvdata(pdev);
+
+ mdio_mux_uninit(s->mux_handle);
+
+ if (s->do_deselect)
+ mux_control_deselect(s->muxc);
+
+ return 0;
+}
+
+static const struct of_device_id mdio_mux_multiplexer_match[] = {
+ { .compatible = "mdio-mux-multiplexer", },
+ {},
+};
+MODULE_DEVICE_TABLE(of, mdio_mux_multiplexer_match);
+
+static struct platform_driver mdio_mux_multiplexer_driver = {
+ .driver = {
+ .name = "mdio-mux-multiplexer",
+ .of_match_table = mdio_mux_multiplexer_match,
+ },
+ .probe = mdio_mux_multiplexer_probe,
+ .remove = mdio_mux_multiplexer_remove,
+};
+
+module_platform_driver(mdio_mux_multiplexer_driver);
+
+MODULE_DESCRIPTION("MDIO bus multiplexer using kernel multiplexer subsystem");
+MODULE_AUTHOR("Pankaj Bansal <pankaj.bansal@nxp.com>");
+MODULE_LICENSE("GPL");
--
2.17.1
^ permalink raw reply related
* [PATCH v3 1/2] dt-bindings: net: Add bindings for mdio mux consumers
From: Pankaj Bansal @ 2019-02-25 6:16 UTC (permalink / raw)
To: Leo Li, Peter Rosin, Andrew Lunn, Florian Fainelli,
Heiner Kallweit, Rob Herring, Mark Rutland
Cc: Pankaj Bansal, devicetree@vger.kernel.org, netdev@vger.kernel.org
When we use the bindings defined in Documentation/devicetree/bindings/mux
to define mdio mux in producer and consumer terms, it results in two
devices. one is mux producer and other is mux consumer.
Add the bindings needed for Mdio mux consumer devices.
Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
---
Notes:
V3:
- No Change
V2:
- moved the bindings from mdio-mux.txt to new file mdio-mux-multiplexer.txt
- changed compatible to mdio-mux-multiplexer
.../bindings/net/mdio-mux-multiplexer.txt | 83 ++++++++++++++++++
1 file changed, 83 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/mdio-mux-multiplexer.txt b/Documentation/devicetree/bindings/net/mdio-mux-multiplexer.txt
new file mode 100644
index 000000000000..9d5384849929
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/mdio-mux-multiplexer.txt
@@ -0,0 +1,83 @@
+Properties for an MDIO bus multiplexer consumer device
+
+This is a special case of MDIO mux when MDIO mux is defined as a consumer
+of a mux producer device. The mux producer can be of any type like mmio mux
+producer, gpio mux producer or generic register based mux producer.
+
+Required properties in addition to the MDIO Bus multiplexer properties:
+
+- compatible : should be "mmio-mux-multiplexer"
+- mux-controls : mux controller node to use for operating the mux
+- mdio-parent-bus : phandle to the parent MDIO bus.
+
+each child node of mdio bus multiplexer consumer device represent a mdio
+bus.
+
+for more information please refer
+Documentation/devicetree/bindings/mux/mux-controller.txt
+and Documentation/devicetree/bindings/net/mdio-mux.txt
+
+Example:
+In below example the Mux producer and consumer are separate nodes.
+
+&i2c0 {
+ fpga@66 { // fpga connected to i2c
+ compatible = "fsl,lx2160aqds-fpga", "fsl,fpga-qixis-i2c",
+ "simple-mfd";
+ reg = <0x66>;
+
+ mux: mux-controller { // Mux Producer
+ compatible = "reg-mux";
+ #mux-control-cells = <1>;
+ mux-reg-masks = <0x54 0xf8>, /* 0: reg 0x54, bits 7:3 */
+ <0x54 0x07>; /* 1: reg 0x54, bits 2:0 */
+ };
+ };
+};
+
+mdio-mux-1 { // Mux consumer
+ compatible = "mdio-mux-multiplexer";
+ mux-controls = <&mux 0>;
+ mdio-parent-bus = <&emdio1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ mdio@0 {
+ reg = <0x0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ mdio@8 {
+ reg = <0x8>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ ..
+ ..
+};
+
+mdio-mux-2 { // Mux consumer
+ compatible = "mdio-mux-multiplexer";
+ mux-controls = <&mux 1>;
+ mdio-parent-bus = <&emdio2>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ mdio@0 {
+ reg = <0x0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ mdio@1 {
+ reg = <0x1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ ..
+ ..
+};
+
--
2.17.1
^ permalink raw reply related
* Re: [PATCH net-next 0/2] mv88e6xxx: Avoid false positive Lockdep splats
From: David Miller @ 2019-02-25 6:21 UTC (permalink / raw)
To: andrew; +Cc: vivien.didelot, rmk+kernel, netdev
In-Reply-To: <20190223164357.17284-1-andrew@lunn.ch>
From: Andrew Lunn <andrew@lunn.ch>
Date: Sat, 23 Feb 2019 17:43:55 +0100
> When acquiring the GPIO interrupt line for the switch, it is possible
> to trigger lockdep splats. These are false positives, the mutex is in
> a different IRQ descriptor. But fix it anyway, since it could mask
> real locking issues.
Series applied, thanks.
^ permalink raw reply
* Re: [PATCH net-next v3] ip_tunnel: Add ip tunnel tun_info type dst_cache in ip_tunnel_xmit
From: David Miller @ 2019-02-25 6:25 UTC (permalink / raw)
To: wenxu; +Cc: netdev
In-Reply-To: <1550967885-18628-1-git-send-email-wenxu@ucloud.cn>
From: wenxu@ucloud.cn
Date: Sun, 24 Feb 2019 08:24:45 +0800
> From: wenxu <wenxu@ucloud.cn>
>
> ip l add dev tun type gretap key 1000
>
> Non-tunnel-dst ip tunnel device can send packet through lwtunnel
> This patch provide the tun_inf dst cache support for this mode.
>
> Signed-off-by: wenxu <wenxu@ucloud.cn>
Applied.
^ permalink raw reply
* Re: [PATCH net-next] net: fix double-free in bpf_lwt_xmit_reroute
From: David Miller @ 2019-02-25 6:25 UTC (permalink / raw)
To: posk; +Cc: netdev, posk
In-Reply-To: <20190224022501.71889-1-posk@google.com>
From: Peter Oskolkov <posk@google.com>
Date: Sat, 23 Feb 2019 18:25:01 -0800
> dst_output() frees skb when it fails (see, for example,
> ip_finish_output2), so it must not be freed in this case.
>
> Fixes: 3bd0b15281af ("bpf: add handling of BPF_LWT_REROUTE to lwt_bpf.c")
> Signed-off-by: Peter Oskolkov <posk@google.com>
Applied.
^ permalink raw reply
* Re: [PATCH] ip_tunnel: Add ip tunnel tunnel_info dst_cache in ip_tunnel_xmit
From: Dan Carpenter @ 2019-02-25 6:27 UTC (permalink / raw)
To: kbuild, wenxu; +Cc: kbuild-all, netdev, davem
In-Reply-To: <1550750930-27138-1-git-send-email-wenxu@ucloud.cn>
Hi wenxu,
Thank you for the patch! Perhaps something to improve:
url: https://github.com/0day-ci/linux/commits/wenxu-ucloud-cn/ip_tunnel-Add-ip-tunnel-tunnel_info-dst_cache-in-ip_tunnel_xmit/20190224-065214
smatch warnings:
net/ipv4/ip_tunnel.c:734 ip_tunnel_xmit() error: uninitialized symbol 'rt'.
# https://github.com/0day-ci/linux/commit/fb0c8c40052c62033bf5f92559eabe4e7a98851e
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout fb0c8c40052c62033bf5f92559eabe4e7a98851e
vim +/rt +734 net/ipv4/ip_tunnel.c
7d442fab0 Tom Herbert 2014-01-02 717
b0066da52 Petr Machata 2018-02-27 718 ip_tunnel_init_flow(&fl4, protocol, dst, tnl_params->saddr,
9830ad4c6 Craig Gallek 2017-04-19 719 tunnel->parms.o_key, RT_TOS(tos), tunnel->parms.link,
9830ad4c6 Craig Gallek 2017-04-19 720 tunnel->fwmark);
7d442fab0 Tom Herbert 2014-01-02 721
563284865 Tom Herbert 2014-09-17 722 if (ip_tunnel_encap(skb, tunnel, &protocol, &fl4) < 0)
563284865 Tom Herbert 2014-09-17 723 goto tx_error;
563284865 Tom Herbert 2014-09-17 724
fb0c8c400 wenxu 2019-02-21 725 if (connected && md) {
fb0c8c400 wenxu 2019-02-21 726 use_cache = ip_tunnel_dst_cache_usable(skb, tun_info);
fb0c8c400 wenxu 2019-02-21 727 if (use_cache)
fb0c8c400 wenxu 2019-02-21 728 rt = dst_cache_get_ip4(&tun_info->dst_cache, &fl4.saddr);
What about if "use_cache" is false? "rt" is potentially not set.
fb0c8c400 wenxu 2019-02-21 729 } else {
e09acddf8 Paolo Abeni 2016-02-12 730 rt = connected ? dst_cache_get_ip4(&tunnel->dst_cache, &fl4.saddr) :
e09acddf8 Paolo Abeni 2016-02-12 731 NULL;
fb0c8c400 wenxu 2019-02-21 732 }
7d442fab0 Tom Herbert 2014-01-02 733
7d442fab0 Tom Herbert 2014-01-02 @734 if (!rt) {
^^^
7d442fab0 Tom Herbert 2014-01-02 735 rt = ip_route_output_key(tunnel->net, &fl4);
c54419321 Pravin B Shelar 2013-03-25 736
c54419321 Pravin B Shelar 2013-03-25 737 if (IS_ERR(rt)) {
c54419321 Pravin B Shelar 2013-03-25 738 dev->stats.tx_carrier_errors++;
c54419321 Pravin B Shelar 2013-03-25 739 goto tx_error;
c54419321 Pravin B Shelar 2013-03-25 740 }
fb0c8c400 wenxu 2019-02-21 741 if (use_cache)
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
^ permalink raw reply
* Re: pull request: bluetooth-next 2019-02-24
From: David Miller @ 2019-02-25 6:27 UTC (permalink / raw)
To: johan.hedberg; +Cc: netdev, linux-bluetooth
In-Reply-To: <20190224083634.GA82295@jhedberg-mac01.home>
From: Johan Hedberg <johan.hedberg@gmail.com>
Date: Sun, 24 Feb 2019 10:36:34 +0200
> Here's the main bluetooth-next pull request for the 5.1 kernel.
>
> - Fixes & improvements to mediatek, hci_qca, btrtl, and btmrvl HCI drivers
> - Fixes to parsing invalid L2CAP config option sizes
> - Locking fix to bt_accept_enqueue()
> - Add support for new Marvel sd8977 chipset
> - Various other smaller fixes & cleanups
>
> Please let me know if there are any issues pulling. Thanks.
Pulled, thanks Johan.
^ permalink raw reply
* Re: [PATCH net-next] net: phy: improve auto-neg emulation in swphy
From: David Miller @ 2019-02-25 6:28 UTC (permalink / raw)
To: hkallweit1; +Cc: andrew, f.fainelli, linux, netdev
In-Reply-To: <a290442f-fdae-26da-6073-3675bf635af1@gmail.com>
From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Sun, 24 Feb 2019 17:41:47 +0100
> Auto-neg emulation currently doesn't set bit BMCR_ANENABLE in BMCR,
> add this. Users will ignore speed and duplex settings in BMCR because
> we're emulating auto-neg, therefore we can remove related code.
> See also following discussion [0].
>
> [0] https://marc.info/?t=155041784900002&r=1&w=2
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Applied, thanks Heiner.
^ permalink raw reply
* Re: [PATCH net] net: phy: fix reading fixed phy status
From: David Miller @ 2019-02-25 6:29 UTC (permalink / raw)
To: hkallweit1; +Cc: andrew, f.fainelli, netdev
In-Reply-To: <7ab8732d-bcc1-cc49-4bc8-34826e78038b@gmail.com>
From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Sun, 24 Feb 2019 18:01:18 +0100
> With the switch to phy_resolve_aneg_linkmode() we don't read from the
> chip any longer what is advertised but use phydev->advertising directly.
> For a fixed phy however this bitmap is empty so far, what results in
> no common mode being found. This breaks DSA. Fix this by advertising
> everything that is supported. For a normal phy this done by phy_probe().
>
> Fixes: 5502b218e001 ("net: phy: use phy_resolve_aneg_linkmode in genphy_read_status")
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Applied to net-next.
Let me know if I got this wrong.
^ permalink raw reply
* Re: [PATCH net-next] dsa: Remove phydev parameter from disable_port call
From: David Miller @ 2019-02-25 6:30 UTC (permalink / raw)
To: andrew
Cc: netdev, f.fainelli, vivien.didelot, hauke, Woojung.Huh, sean.wang,
linus.walleij
In-Reply-To: <20190224194443.20693-1-andrew@lunn.ch>
From: Andrew Lunn <andrew@lunn.ch>
Date: Sun, 24 Feb 2019 20:44:43 +0100
> No current DSA driver makes use of the phydev parameter passed to the
> disable_port call. Remove it.
>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Applied to net-next, with some fuzz...
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox