* Re: [RFC net-next] ipip: Add room for custom tunnel header
From: Kristian Evensen @ 2013-08-16 13:11 UTC (permalink / raw)
To: Eric Dumazet; +Cc: netdev
In-Reply-To: <1375977658.4004.106.camel@edumazet-glaptop>
Hi,
Thank you very much for your feedback and sorry for not replying
earlier. I modified the patch and implemented setting a custom header
length as a netlink message attribute instead
(http://patchwork.ozlabs.org/patch/266456/). It was initially rejected
on the basis that I needed to provide some use-cases, which I did, so
lets see what happens. However, your comments apply to both patches,
so it would be interesting to discuss this.
> What happens if hlen is bigger than available headroom ?
>
> hlen comes from userspace and there is no safety check, right ?
Based on my understanding of the code, hlen will not be bigger than
available headroom. dev->needed_headroom is set to the tunnel header
length in ip_tunnel_bind_dev(). hlen is only read when adding a new
link, so this assignment cannot be skipped. However, I see that a
check along the lines of "hlen > 0 && hlen < (ETH_DATA_LEN -
LL_MAX_HDR - sizeof(iphdr)" should be added.
One potential side-effect is that one can overflow the mtu by
providing a large hlen. Will that be considered a security risk or
misconfiguration? Since you have to have the same rights to create a
tunnel as to create a link, a similar behavior can be accomplished by
creating a new link with a large mtu.
> What guarantee do we have _something_ will fill the bytes ?
> (We do not want to leak prior content of those bytes to the wire)
In the current patch, none. I assumed this was ok as inserting the
custom header does not make sense without another module filling in
the content. I do agree though, a memset should be added to zero out
the custom header.
Thanks again,
Kristian
^ permalink raw reply
* [PATCH] net: cdc_ncm: Export cdc_ncm_{tx,rx}_fixup functions for re-use
From: Enrico Mioso @ 2013-08-16 13:39 UTC (permalink / raw)
To: Bjørn Mork
Cc: Greg Kroah-Hartman, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-usb-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <87bo4xx3ef.fsf-lbf33ChDnrE/G1V5fR+Y7Q@public.gmane.org>
Some drivers implementing NCM-like protocols, may re-use those functions, as is
the case in the huawei_cdc_ncm driver.
Export them via EXPORT_SYMBOL_GPL.
Signed-off-by: Enrico Mioso <mrkiko.rs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
drivers/net/usb/cdc_ncm.c | 6 ++++--
include/linux/usb/cdc_ncm.h | 3 +++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 43afde8..62686be 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -858,7 +858,7 @@ static void cdc_ncm_txpath_bh(unsigned long param)
}
}
-static struct sk_buff *
+struct sk_buff *
cdc_ncm_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags)
{
struct sk_buff *skb_out;
@@ -885,6 +885,7 @@ error:
return NULL;
}
+EXPORT_SYMBOL_GPL(cdc_ncm_tx_fixup);
/* verify NTB header and return offset of first NDP, or negative error */
int cdc_ncm_rx_verify_nth16(struct cdc_ncm_ctx *ctx, struct sk_buff *skb_in)
@@ -965,7 +966,7 @@ error:
}
EXPORT_SYMBOL_GPL(cdc_ncm_rx_verify_ndp16);
-static int cdc_ncm_rx_fixup(struct usbnet *dev, struct sk_buff *skb_in)
+int cdc_ncm_rx_fixup(struct usbnet *dev, struct sk_buff *skb_in)
{
struct sk_buff *skb;
struct cdc_ncm_ctx *ctx = (struct cdc_ncm_ctx *)dev->data[0];
@@ -1040,6 +1041,7 @@ err_ndp:
error:
return 0;
}
+EXPORT_SYMBOL_GPL(cdc_ncm_rx_fixup);
static void
cdc_ncm_speed_change(struct cdc_ncm_ctx *ctx,
diff --git a/include/linux/usb/cdc_ncm.h b/include/linux/usb/cdc_ncm.h
index cc25b70..163244b 100644
--- a/include/linux/usb/cdc_ncm.h
+++ b/include/linux/usb/cdc_ncm.h
@@ -133,3 +133,6 @@ extern void cdc_ncm_unbind(struct usbnet *dev, struct usb_interface *intf);
extern struct sk_buff *cdc_ncm_fill_tx_frame(struct cdc_ncm_ctx *ctx, struct sk_buff *skb, __le32 sign);
extern int cdc_ncm_rx_verify_nth16(struct cdc_ncm_ctx *ctx, struct sk_buff *skb_in);
extern int cdc_ncm_rx_verify_ndp16(struct sk_buff *skb_in, int ndpoffset);
+struct sk_buff *
+cdc_ncm_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags);
+int cdc_ncm_rx_fixup(struct usbnet *dev, struct sk_buff *skb_in);
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [PATCH] net: huawei_cdc_ncm: Introduce new huawei_cdc_ncm driver
From: Enrico Mioso @ 2013-08-16 13:44 UTC (permalink / raw)
To: Bjørn Mork; +Cc: Greg Kroah-Hartman, linux-kernel, linux-usb, netdev
In-Reply-To: <87bo4xx3ef.fsf@nemi.mork.no>
This driver supports devices using the NCM protocol as an encapsulation layer
for other protocols, like the E3131 Huawei 3G modem.
Suggested-by: Bjorn Mork <bjorn@mork.no>
Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
---
drivers/net/usb/Kconfig | 11 ++
drivers/net/usb/Makefile | 1 +
drivers/net/usb/huawei_cdc_ncm.c | 210 ++++++++++++++++++++++++++++++++++++++
3 files changed, 222 insertions(+)
create mode 100644 drivers/net/usb/huawei_cdc_ncm.c
diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig
index d84bfd4..6e56751 100644
--- a/drivers/net/usb/Kconfig
+++ b/drivers/net/usb/Kconfig
@@ -242,6 +242,17 @@ config USB_NET_CDC_NCM
* ST-Ericsson M343 HSPA Mobile Broadband Modem (reference design)
* Ericsson F5521gw Mobile Broadband Module
+config USB_NET_HUAWEI_CDC_NCM
+ tristate "Huawei-style CDC NCM support"
+ depends on USB_USBNET
+ select USB_WDM
+ select USB_NET_CDC_NCM
+ help
+ This driver aims to support huawei-style NCM devices, that use ncm as a
+ transport for other protocols.
+ To compile this driver as a module, choose M here: the module will be
+ called huawei_cdc_ncm.
+
config USB_NET_CDC_MBIM
tristate "CDC MBIM support"
depends on USB_USBNET
diff --git a/drivers/net/usb/Makefile b/drivers/net/usb/Makefile
index e817178..fd0e6a7 100644
--- a/drivers/net/usb/Makefile
+++ b/drivers/net/usb/Makefile
@@ -31,6 +31,7 @@ obj-$(CONFIG_USB_IPHETH) += ipheth.o
obj-$(CONFIG_USB_SIERRA_NET) += sierra_net.o
obj-$(CONFIG_USB_NET_CX82310_ETH) += cx82310_eth.o
obj-$(CONFIG_USB_NET_CDC_NCM) += cdc_ncm.o
+obj-$(CONFIG_USB_NET_HUAWEI_CDC_NCM) += huawei_cdc_ncm.o
obj-$(CONFIG_USB_VL600) += lg-vl600.o
obj-$(CONFIG_USB_NET_QMI_WWAN) += qmi_wwan.o
obj-$(CONFIG_USB_NET_CDC_MBIM) += cdc_mbim.o
diff --git a/drivers/net/usb/huawei_cdc_ncm.c b/drivers/net/usb/huawei_cdc_ncm.c
new file mode 100644
index 0000000..d3426b9
--- /dev/null
+++ b/drivers/net/usb/huawei_cdc_ncm.c
@@ -0,0 +1,210 @@
+/*
+ * huawei_cdc_ncm.c - handles huawei-style NCM devices.
+ * Copyright (C) 2013 Enrico Mioso <mrkiko.rs@gmail.com>
+ * This driver handles devices resembling the CDC NCM standard, but
+ * encapsulating another protocol inside it. An example are some Huawei 3G
+ * devices, exposing an embedded AT channel where you can set up the NCM
+ * connection.
+ * This code has been heavily inspired by the cdc_mbim.c driver, which is
+ * Copyright (c) 2012 Smith Micro Software, Inc.
+ * Copyright (c) 2012 Bj??rn Mork <bjorn@mork.no>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ */
+
+#include <linux/module.h>
+#include <linux/netdevice.h>
+#include <linux/ethtool.h>
+#include <linux/if_vlan.h>
+#include <linux/ip.h>
+#include <linux/mii.h>
+#include <linux/usb.h>
+#include <linux/usb/cdc.h>
+#include <linux/usb/usbnet.h>
+#include <linux/usb/cdc-wdm.h>
+#include <linux/usb/cdc_ncm.h>
+
+/* Driver data */
+struct huawei_cdc_ncm_state {
+ struct cdc_ncm_ctx *ctx;
+ atomic_t pmcount;
+ struct usb_driver *subdriver;
+ struct usb_interface *control;
+ struct usb_interface *data;
+};
+
+static int huawei_cdc_ncm_manage_power(struct usbnet *usbnet_dev, int on)
+{
+ struct huawei_cdc_ncm_state *drvstate = (void *)&usbnet_dev->data;
+ int rv = 0;
+
+ if ((on && atomic_add_return(1, &drvstate->pmcount) == 1) || (!on && atomic_dec_and_test(&drvstate->pmcount))) {
+ rv = usb_autopm_get_interface(usbnet_dev->intf);
+ if (rv < 0)
+ goto err;
+ usbnet_dev->intf->needs_remote_wakeup = on;
+ usb_autopm_put_interface(usbnet_dev->intf);
+ }
+err:
+ return rv;
+}
+
+static int huawei_cdc_ncm_wdm_manage_power(struct usb_interface *intf, int status)
+{
+ struct usbnet *usbnet_dev = usb_get_intfdata(intf);
+
+ /* can be called while disconnecting */
+ if (!usbnet_dev)
+ return 0;
+
+ return huawei_cdc_ncm_manage_power(usbnet_dev, status);
+}
+
+
+static int huawei_cdc_ncm_bind(struct usbnet *usbnet_dev, struct usb_interface *intf)
+{
+ struct cdc_ncm_ctx *ctx;
+ struct usb_driver *subdriver = ERR_PTR(-ENODEV);
+ int ret = -ENODEV;
+ struct huawei_cdc_ncm_state *drvstate = (void *)&usbnet_dev->data;
+
+ ret = cdc_ncm_bind_common(usbnet_dev, intf, 1); /* altsetting should be 1 for NCM devices */
+ if (ret)
+ goto err;
+
+ ctx = drvstate->ctx;
+
+ if (usbnet_dev->status)
+ subdriver = usb_cdc_wdm_register(ctx->control,
+ &usbnet_dev->status->desc,
+ 256, /* CDC-WMC r1.1 requires wMaxCommand to be "at least 256 decimal (0x100)" */
+ huawei_cdc_ncm_wdm_manage_power);
+ if (IS_ERR(subdriver)) {
+ ret = PTR_ERR(subdriver);
+ cdc_ncm_unbind(usbnet_dev, intf);
+ goto err;
+ }
+
+ /* Prevent usbnet from using the status descriptor */
+ usbnet_dev->status = NULL;
+
+ drvstate->subdriver = subdriver;
+
+err:
+ return ret;
+}
+
+static void huawei_cdc_ncm_unbind(struct usbnet *usbnet_dev, struct usb_interface *intf)
+{
+ struct huawei_cdc_ncm_state *drvstate = (void *)&usbnet_dev->data;
+ struct cdc_ncm_ctx *ctx = drvstate->ctx;
+
+ if (drvstate->subdriver && drvstate->subdriver->disconnect)
+ drvstate->subdriver->disconnect(ctx->control);
+ drvstate->subdriver = NULL;
+
+ cdc_ncm_unbind(usbnet_dev, intf);
+}
+
+static int huawei_cdc_ncm_suspend(struct usb_interface *intf, pm_message_t message)
+{
+ int ret = 0;
+ struct usbnet *usbnet_dev = usb_get_intfdata(intf);
+ struct huawei_cdc_ncm_state *drvstate = (void *)&usbnet_dev->data;
+ struct cdc_ncm_ctx *ctx = drvstate->ctx;
+
+ if (ctx == NULL) {
+ ret = -1;
+ goto error;
+ }
+
+ ret = usbnet_suspend(intf, message);
+ if (ret < 0)
+ goto error;
+
+ if (intf == ctx->control && drvstate->subdriver && drvstate->subdriver->suspend)
+ ret = drvstate->subdriver->suspend(intf, message);
+ if (ret < 0)
+ usbnet_resume(intf);
+
+error:
+ return ret;
+}
+
+static int huawei_cdc_ncm_resume(struct usb_interface *intf)
+{
+ int ret = 0;
+ struct usbnet *usbnet_dev = usb_get_intfdata(intf);
+ struct huawei_cdc_ncm_state *drvstate = (void *)&usbnet_dev->data;
+ struct cdc_ncm_ctx *ctx = drvstate->ctx;
+ bool callsub = (intf == ctx->control && drvstate->subdriver && drvstate->subdriver->resume); /* should we call subdriver's resume? ? */
+
+ if (callsub)
+ ret = drvstate->subdriver->resume(intf);
+ if (ret < 0)
+ goto err;
+ ret = usbnet_resume(intf);
+ if (ret < 0 && callsub && drvstate->subdriver->suspend)
+ drvstate->subdriver->suspend(intf, PMSG_SUSPEND);
+err:
+ return ret;
+}
+
+static int huawei_cdc_ncm_check_connect(struct usbnet *usbnet_dev)
+{
+ struct cdc_ncm_ctx *ctx;
+
+ ctx = (struct cdc_ncm_ctx *)usbnet_dev->data[0];
+
+ if (ctx == NULL)
+ return 1; /* disconnected */
+
+ return !ctx->connected;
+}
+
+static const struct driver_info huawei_cdc_ncm_info = {
+ .description = "Huawei CDC NCM device",
+ .flags = FLAG_NO_SETINT | FLAG_MULTI_PACKET | FLAG_WWAN,
+ .bind = huawei_cdc_ncm_bind,
+ .unbind = huawei_cdc_ncm_unbind,
+ .check_connect = huawei_cdc_ncm_check_connect,
+ .manage_power = huawei_cdc_ncm_manage_power,
+ .rx_fixup = cdc_ncm_rx_fixup,
+ .tx_fixup = cdc_ncm_tx_fixup,
+};
+
+static const struct usb_device_id huawei_cdc_ncm_devs[] = {
+ /* Huawei NCM devices disguised as vendor specific */
+ { USB_VENDOR_AND_INTERFACE_INFO(0x12d1, 0xff, 0x02, 0x16),
+ .driver_info = (unsigned long)&huawei_cdc_ncm_info,
+ },
+ { USB_VENDOR_AND_INTERFACE_INFO(0x12d1, 0xff, 0x02, 0x46),
+ .driver_info = (unsigned long)&huawei_cdc_ncm_info,
+ },
+ { USB_VENDOR_AND_INTERFACE_INFO(0x12d1, 0xff, 0x02, 0x76),
+ .driver_info = (unsigned long)&huawei_cdc_ncm_info,
+ },
+
+ /* Terminating entry */
+ {
+ },
+};
+MODULE_DEVICE_TABLE(usb, huawei_cdc_ncm_devs);
+
+static struct usb_driver huawei_cdc_ncm_driver = {
+ .name = "huawei_cdc_ncm",
+ .id_table = huawei_cdc_ncm_devs,
+ .probe = usbnet_probe,
+ .disconnect = usbnet_disconnect,
+ .suspend = huawei_cdc_ncm_suspend,
+ .resume = huawei_cdc_ncm_resume,
+ .reset_resume = huawei_cdc_ncm_resume,
+ .supports_autosuspend = 1,
+ .disable_hub_initiated_lpm = 1,
+};
+module_usb_driver(huawei_cdc_ncm_driver);
+MODULE_AUTHOR("Enrico Mioso <mrkiko.rs@gmail.com>");
+MODULE_DESCRIPTION("USB CDC NCM host driver with encapsulated protocol support");
+MODULE_LICENSE("GPL");
^ permalink raw reply related
* [PATCH] net: cdc_ncm: remove non-standard NCM device IDs
From: Enrico Mioso @ 2013-08-16 13:47 UTC (permalink / raw)
To: bjorn; +Cc: linux-kernel, linux-usb, netdev, Greg Kroah-Hartman
Remove device IDs of NCM-like (but not NCM-conformant) devices, that are
handled by the huawwei_cdc_ncm driver now.
Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
---
drivers/net/usb/cdc_ncm.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 62686be..31f43f7 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -1236,17 +1236,6 @@ static const struct usb_device_id cdc_devs[] = {
.driver_info = (unsigned long)&wwan_info,
},
- /* Huawei NCM devices disguised as vendor specific */
- { USB_VENDOR_AND_INTERFACE_INFO(0x12d1, 0xff, 0x02, 0x16),
- .driver_info = (unsigned long)&wwan_info,
- },
- { USB_VENDOR_AND_INTERFACE_INFO(0x12d1, 0xff, 0x02, 0x46),
- .driver_info = (unsigned long)&wwan_info,
- },
- { USB_VENDOR_AND_INTERFACE_INFO(0x12d1, 0xff, 0x02, 0x76),
- .driver_info = (unsigned long)&wwan_info,
- },
-
/* Infineon(now Intel) HSPA Modem platform */
{ USB_DEVICE_AND_INTERFACE_INFO(0x1519, 0x0443,
USB_CLASS_COMM,
^ permalink raw reply related
* Re: [PATCH] net: cdc_ncm: Export cdc_ncm_{tx,rx}_fixup functions for re-use
From: Greg Kroah-Hartman @ 2013-08-16 13:49 UTC (permalink / raw)
To: Enrico Mioso; +Cc: Bjørn Mork, linux-kernel, linux-usb, netdev
In-Reply-To: <alpine.LNX.2.02.1308161534410.23935@eeeadesso>
On Fri, Aug 16, 2013 at 03:39:19PM +0200, Enrico Mioso wrote:
> Some drivers implementing NCM-like protocols, may re-use those functions, as is
> the case in the huawei_cdc_ncm driver.
Where is that driver at, I don't see it in the kernel tree.
> Export them via EXPORT_SYMBOL_GPL.
Normally we don't export symbols until code that actually uses the
symbols lands in the tree at the same time.
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH] net: cdc_ncm: Export cdc_ncm_{tx,rx}_fixup functions for re-use
From: Enrico Mioso @ 2013-08-16 13:51 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Enrico Mioso, Bjørn Mork, linux-kernel, linux-usb, netdev
In-Reply-To: <20130816134907.GA10987@kroah.com>
Yes, you're right. I'm sorry - this time I didn't apply numbering scheme to
those 3 patches - yet they are consequential, but not depending on each other
from a strict point of view.
Thank you for your review Greg!
On Fri, 16 Aug 2013, Greg Kroah-Hartman wrote:
==Date: Fri, 16 Aug 2013 06:49:07 -0700
==From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
==To: Enrico Mioso <mrkiko.rs@gmail.com>
==Cc: Bj?rn Mork <bjorn@mork.no>, linux-kernel@vger.kernel.org,
== linux-usb@vger.kernel.org, netdev@vger.kernel.org
==Subject: Re: [PATCH] net: cdc_ncm: Export cdc_ncm_{tx,
== rx}_fixup functions for re-use
==
==On Fri, Aug 16, 2013 at 03:39:19PM +0200, Enrico Mioso wrote:
==> Some drivers implementing NCM-like protocols, may re-use those functions, as is
==> the case in the huawei_cdc_ncm driver.
==
==Where is that driver at, I don't see it in the kernel tree.
==
==> Export them via EXPORT_SYMBOL_GPL.
==
==Normally we don't export symbols until code that actually uses the
==symbols lands in the tree at the same time.
==
==thanks,
==
==greg k-h
==
^ permalink raw reply
* Re: [PATCH] net: cdc_ncm: Export cdc_ncm_{tx,rx}_fixup functions for re-use
From: Greg Kroah-Hartman @ 2013-08-16 13:52 UTC (permalink / raw)
To: Enrico Mioso; +Cc: Bjørn Mork, linux-kernel, linux-usb, netdev
In-Reply-To: <20130816134907.GA10987@kroah.com>
On Fri, Aug 16, 2013 at 06:49:07AM -0700, Greg Kroah-Hartman wrote:
> On Fri, Aug 16, 2013 at 03:39:19PM +0200, Enrico Mioso wrote:
> > Some drivers implementing NCM-like protocols, may re-use those functions, as is
> > the case in the huawei_cdc_ncm driver.
>
> Where is that driver at, I don't see it in the kernel tree.
And you sent it in a different email, sorry about that.
Normally you would number the patches (i.e. [1/3], and so on), so that
people know which order to apply them in, and that there really is 3
patches in the series...
thanks,
greg k-h
^ permalink raw reply
* [PATCH v5 0/2] ARM: davinci: da850: add ethernet driver DT support
From: Lad, Prabhakar @ 2013-08-16 14:11 UTC (permalink / raw)
To: Sekhar Nori
Cc: DLOS, LKML, devicetree-discuss, linux-arm-kernel, netdev,
Lad, Prabhakar
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
This patch set enables Ethernet support through device tree model.
This patch set enables mii interface only and is being tested to boot via
rootfs.
Patches 1-2 of v4 are queued for v3-12, just resending patch
4-5 by fixing review comments pointed by Sergei
Lad, Prabhakar (2):
ARM: davinci: da850: add DT node for ethernet
ARM: davinci: da850: add OF_DEV_AUXDATA entry for davinci_emac
arch/arm/boot/dts/da850-evm.dts | 5 +++++
arch/arm/boot/dts/da850.dtsi | 30 ++++++++++++++++++++++++++++++
arch/arm/mach-davinci/da8xx-dt.c | 2 ++
3 files changed, 37 insertions(+)
--
1.7.9.5
^ permalink raw reply
* [PATCH v5 1/2] ARM: davinci: da850: add DT node for ethernet
From: Lad, Prabhakar @ 2013-08-16 14:11 UTC (permalink / raw)
To: Sekhar Nori
Cc: DLOS, netdev-u79uwXL29TY76Z2rM5mHXA,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, LKML,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
In-Reply-To: <1376662262-21795-1-git-send-email-prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
From: "Lad, Prabhakar" <prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Add ethernet device tree node information and pinmux for mii to da850 by
providing interrupt details and local mac address.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
arch/arm/boot/dts/da850-evm.dts | 5 +++++
arch/arm/boot/dts/da850.dtsi | 30 ++++++++++++++++++++++++++++++
2 files changed, 35 insertions(+)
diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index 1f8cfdd..44f3fbc 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -96,6 +96,11 @@
pinctrl-0 = <&mdio_pins>;
bus_freq = <2200000>;
};
+ ethernet: emac@1e20000 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&mii_pins>;
+ };
};
nand_cs3@62000000 {
status = "okay";
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index d5138b4..a5d30d9 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -131,6 +131,22 @@
0x10 0x00000088 0x000000ff
>;
};
+ mii_pins: pinmux_mii_pins {
+ pinctrl-single,bits = <
+ /*
+ * MII_TXEN, MII_TXCLK, MII_COL
+ * MII_TXD_3, MII_TXD_2, MII_TXD_1
+ * MII_TXD_0
+ */
+ 0x8 0x88888880 0xfffffff0
+ /*
+ * MII_RXER, MII_CRS, MII_RXCLK
+ * MII_RXDV, MII_RXD_3, MII_RXD_2
+ * MII_RXD_1, MII_RXD_0
+ */
+ 0xc 0x88888888 0xffffffff
+ >;
+ };
};
serial0: serial@1c42000 {
@@ -226,6 +242,20 @@
#size-cells = <0>;
reg = <0x224000 0x1000>;
};
+ ethernet: emac@1e20000 {
+ compatible = "ti,davinci-dm6467-emac";
+ reg = <0x220000 0x4000>;
+ ti,davinci-ctrl-reg-offset = <0x3000>;
+ ti,davinci-ctrl-mod-reg-offset = <0x2000>;
+ ti,davinci-ctrl-ram-offset = <0>;
+ ti,davinci-ctrl-ram-size = <0x2000>;
+ local-mac-address = [ 00 00 00 00 00 00 ];
+ interrupts = <33
+ 34
+ 35
+ 36
+ >;
+ };
};
nand_cs3@62000000 {
compatible = "ti,davinci-nand";
--
1.7.9.5
^ permalink raw reply related
* [PATCH v5 2/2] ARM: davinci: da850: add OF_DEV_AUXDATA entry for davinci_emac
From: Lad, Prabhakar @ 2013-08-16 14:11 UTC (permalink / raw)
To: Sekhar Nori
Cc: DLOS, LKML, devicetree-discuss, linux-arm-kernel, netdev,
Lad, Prabhakar
In-Reply-To: <1376662262-21795-1-git-send-email-prabhakar.csengg@gmail.com>
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
Add OF_DEV_AUXDATA for ethernet davinci_emac driver in da850 board dt
file to use emac clock.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
---
arch/arm/mach-davinci/da8xx-dt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
index d172563..d2bc574 100644
--- a/arch/arm/mach-davinci/da8xx-dt.c
+++ b/arch/arm/mach-davinci/da8xx-dt.c
@@ -44,6 +44,8 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
OF_DEV_AUXDATA("ns16550a", 0x01d0c000, "serial8250.1", NULL),
OF_DEV_AUXDATA("ns16550a", 0x01d0d000, "serial8250.2", NULL),
OF_DEV_AUXDATA("ti,davinci_mdio", 0x01e24000, "davinci_mdio.0", NULL),
+ OF_DEV_AUXDATA("ti,davinci-dm6467-emac", 0x01e20000, "davinci_emac.1",
+ NULL),
{}
};
--
1.7.9.5
^ permalink raw reply related
* Re: [PATCH net] skge: dma_sync the whole receive buffer
From: poma @ 2013-08-16 14:36 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David Miller, netdev
In-Reply-To: <20130815084117.2f48fc58@nehalam.linuxnetplumber.net>
On 15.08.2013 17:41, Stephen Hemminger wrote:
> In the course of debugging this, I moved the card to another slot
> and all the problems went away. I suspect either card insertion or more likely
> the crap consumer motherboards don't have full PCI support on some slots.
>
> There doesn't seem to be anyway to address this in software.
>
Noted, thanks.
Follows overhaul.
poma
^ permalink raw reply
* Money available for pick up
From: © Western Union @ 2013-08-16 15:02 UTC (permalink / raw)
This is to re-notify you of the US$500,000.00(Dollars)
which was deposited in western union office in your name and favor, it is
still available for pickup. Contact the person of Agent Rick James
Email: rickjamesharts002@admin.in.th for your M.T.C.N Numbers,
Mobile:+44-7035-916-544
^ permalink raw reply
* [PATCH] tcp: set timestamps for restored skb-s
From: Andrey Vagin @ 2013-08-16 15:04 UTC (permalink / raw)
To: netdev
Cc: linux-kernel, Andrey Vagin, David S. Miller, Alexey Kuznetsov,
James Morris, Hideaki YOSHIFUJI, Patrick McHardy
When the repair mode is turned off, the write queue seqs are
updated so that the whole queue is considered to be 'already sent.
The "when" field must be set for such skb. It's used in tcp_rearm_rto
for example. If the "when" field isn't set, the retransmit timeout can
be calculated incorrectly and a tcp connected can stop for two minutes
(TCP_RTO_MAX).
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: James Morris <jmorris@namei.org>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
---
net/ipv4/tcp.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 5423223..b2f6c74 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1121,6 +1121,13 @@ new_segment:
goto wait_for_memory;
/*
+ * All packets are restored as if they have
+ * already been sent.
+ */
+ if (tp->repair)
+ TCP_SKB_CB(skb)->when = tcp_time_stamp;
+
+ /*
* Check whether we can use HW checksum.
*/
if (sk->sk_route_caps & NETIF_F_ALL_CSUM)
--
1.8.3.1
^ permalink raw reply related
* Re: [GLIBC Patch v2] inet: avoid redefinition of some structs in kernel
From: Carlos O'Donell @ 2013-08-16 15:15 UTC (permalink / raw)
To: Cong Wang, Andreas Jaeger
Cc: netdev, David S. Miller, Thomas Backlund, libc-alpha,
YOSHIFUJI Hideaki
In-Reply-To: <1376558891-26221-2-git-send-email-amwang@redhat.com>
On 08/15/2013 05:28 AM, Cong Wang wrote:
> From: Carlos O'Donell <carlos@redhat.com>
>
> - Synchronize linux's `include/uapi/linux/in6.h'
> with glibc's `inet/netinet/in.h'.
> - Synchronize glibc's `inet/netinet/in.h with linux's
> `include/uapi/linux/in6.h'.
> - Allow including the headers in either other.
> - First header included defines the structures and macros.
>
> Notes:
> - You want netinet/in.h to include bits/in.h as early as possible,
> but it needs in_addr so define in_addr early.
> - You want bits/in.h included as early as possible so you can use
> the linux specific code to define __USE_KERNEL_DEFS based on
> the _UAPI_* macro definition and use those to cull in.h.
> - glibc was missing IPPROTO_MH, added here.
Andreas,
Would you mind reviewing this?
I'd like an objective review from another senior glibc reviewer.
The goal here is simple, support including the kernel and glibc
headers in any order and coordinate structure definitions to maintain
the ABI.
The kernel headers often have structures and definitions that are
required by specialized userspace applications, and we'd like those
applications to be easy to write and maintain. Coordinate the headers
is going to make this simpler for everyone.
Cheers,
Carlos.
> Reported-by: Thomas Backlund <tmb@mageia.org>
> Cc: Thomas Backlund <tmb@mageia.org>
> Cc: libc-alpha@sourceware.org
> Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Carlos O'Donell <carlos@redhat.com>
> Tested-by: Cong Wang <amwang@redhat.com>
> Signed-off-by: Cong Wang <amwang@redhat.com>
>
> 2013-08-13 Carlos O'Donell <carlos@redhat.com>
> Cong Wang <amwang@redhat.com>
>
> * sysdeps/unix/sysv/linux/bits/in.h
> [_UAPI_LINUX_IN6_H]: Define __USE_KERNEL_IPV6_DEFS.
> * inet/netinet/in.h: Move in_addr definition and bits/in.h inclusion
> before __USE_KERNEL_IPV6_DEFS uses.
> * inet/netinet/in.h [!__USE_KERNEL_IPV6_DEFS]: Define IPPROTO_MH, and
> IPPROTO_BEETPH.
> [__USE_KERNEL_IPV6_DEFS]: Don't define any of IPPROTO_*, in6_addr,
> sockaddr_in6, or ipv6_mreq.
> ---
>
> diff --git a/inet/netinet/in.h b/inet/netinet/in.h
> index 89e3813..05c77e2 100644
> --- a/inet/netinet/in.h
> +++ b/inet/netinet/in.h
> @@ -26,13 +26,21 @@
>
> __BEGIN_DECLS
>
> +/* Internet address. */
> +typedef uint32_t in_addr_t;
> +struct in_addr
> + {
> + in_addr_t s_addr;
> + };
> +
> +/* Get system-specific definitions. */
> +#include <bits/in.h>
> +
> /* Standard well-defined IP protocols. */
> enum
> {
> IPPROTO_IP = 0, /* Dummy protocol for TCP. */
> #define IPPROTO_IP IPPROTO_IP
> - IPPROTO_HOPOPTS = 0, /* IPv6 Hop-by-Hop options. */
> -#define IPPROTO_HOPOPTS IPPROTO_HOPOPTS
> IPPROTO_ICMP = 1, /* Internet Control Message Protocol. */
> #define IPPROTO_ICMP IPPROTO_ICMP
> IPPROTO_IGMP = 2, /* Internet Group Management Protocol. */
> @@ -55,10 +63,6 @@ enum
> #define IPPROTO_DCCP IPPROTO_DCCP
> IPPROTO_IPV6 = 41, /* IPv6 header. */
> #define IPPROTO_IPV6 IPPROTO_IPV6
> - IPPROTO_ROUTING = 43, /* IPv6 routing header. */
> -#define IPPROTO_ROUTING IPPROTO_ROUTING
> - IPPROTO_FRAGMENT = 44, /* IPv6 fragmentation header. */
> -#define IPPROTO_FRAGMENT IPPROTO_FRAGMENT
> IPPROTO_RSVP = 46, /* Reservation Protocol. */
> #define IPPROTO_RSVP IPPROTO_RSVP
> IPPROTO_GRE = 47, /* General Routing Encapsulation. */
> @@ -67,14 +71,10 @@ enum
> #define IPPROTO_ESP IPPROTO_ESP
> IPPROTO_AH = 51, /* authentication header. */
> #define IPPROTO_AH IPPROTO_AH
> - IPPROTO_ICMPV6 = 58, /* ICMPv6. */
> -#define IPPROTO_ICMPV6 IPPROTO_ICMPV6
> - IPPROTO_NONE = 59, /* IPv6 no next header. */
> -#define IPPROTO_NONE IPPROTO_NONE
> - IPPROTO_DSTOPTS = 60, /* IPv6 destination options. */
> -#define IPPROTO_DSTOPTS IPPROTO_DSTOPTS
> IPPROTO_MTP = 92, /* Multicast Transport Protocol. */
> #define IPPROTO_MTP IPPROTO_MTP
> + IPPROTO_BEETPH = 94, /* IP option pseudo header for BEET. */
> +#define IPPROTO_BEETPH IPPROTO_BEETPH
> IPPROTO_ENCAP = 98, /* Encapsulation Header. */
> #define IPPROTO_ENCAP IPPROTO_ENCAP
> IPPROTO_PIM = 103, /* Protocol Independent Multicast. */
> @@ -90,6 +90,28 @@ enum
> IPPROTO_MAX
> };
>
> +/* If __USER_KERNEL_IPV6_DEFS is defined then the user has included the kernel
> + network headers first and we should use those ABI-identical definitions
> + instead of our own. */
> +#ifndef __USE_KERNEL_IPV6_DEFS
> +enum
> + {
> + IPPROTO_HOPOPTS = 0, /* IPv6 Hop-by-Hop options. */
> +#define IPPROTO_HOPOPTS IPPROTO_HOPOPTS
> + IPPROTO_ROUTING = 43, /* IPv6 routing header. */
> +#define IPPROTO_ROUTING IPPROTO_ROUTING
> + IPPROTO_FRAGMENT = 44, /* IPv6 fragmentation header. */
> +#define IPPROTO_FRAGMENT IPPROTO_FRAGMENT
> + IPPROTO_ICMPV6 = 58, /* ICMPv6. */
> +#define IPPROTO_ICMPV6 IPPROTO_ICMPV6
> + IPPROTO_NONE = 59, /* IPv6 no next header. */
> +#define IPPROTO_NONE IPPROTO_NONE
> + IPPROTO_DSTOPTS = 60, /* IPv6 destination options. */
> +#define IPPROTO_DSTOPTS IPPROTO_DSTOPTS
> + IPPROTO_MH = 135, /* IPv6 mobility header. */
> +#define IPPROTO_MH IPPROTO_MH
> + };
> +#endif /* !__USE_KERNEL_IPV6_DEFS */
>
> /* Type to represent a port. */
> typedef uint16_t in_port_t;
> @@ -134,15 +156,6 @@ enum
> IPPORT_USERRESERVED = 5000
> };
>
> -
> -/* Internet address. */
> -typedef uint32_t in_addr_t;
> -struct in_addr
> - {
> - in_addr_t s_addr;
> - };
> -
> -
> /* Definitions of the bits in an Internet address integer.
>
> On subnets, host and network parts are found according to
> @@ -191,7 +204,7 @@ struct in_addr
> #define INADDR_ALLRTRS_GROUP ((in_addr_t) 0xe0000002) /* 224.0.0.2 */
> #define INADDR_MAX_LOCAL_GROUP ((in_addr_t) 0xe00000ff) /* 224.0.0.255 */
>
> -
> +#ifndef __USE_KERNEL_IPV6_DEFS
> /* IPv6 address */
> struct in6_addr
> {
> @@ -209,6 +222,7 @@ struct in6_addr
> # define s6_addr32 __in6_u.__u6_addr32
> #endif
> };
> +#endif /* !__USE_KERNEL_IPV6_DEFS */
>
> extern const struct in6_addr in6addr_any; /* :: */
> extern const struct in6_addr in6addr_loopback; /* ::1 */
> @@ -233,6 +247,7 @@ struct sockaddr_in
> sizeof (struct in_addr)];
> };
>
> +#ifndef __USE_KERNEL_IPV6_DEFS
> /* Ditto, for IPv6. */
> struct sockaddr_in6
> {
> @@ -242,7 +257,7 @@ struct sockaddr_in6
> struct in6_addr sin6_addr; /* IPv6 address */
> uint32_t sin6_scope_id; /* IPv6 scope-id */
> };
> -
> +#endif /* !__USE_KERNEL_IPV6_DEFS */
>
> #if defined __USE_MISC || defined __USE_GNU
> /* IPv4 multicast request. */
> @@ -268,7 +283,7 @@ struct ip_mreq_source
> };
> #endif
>
> -
> +#ifndef __USE_KERNEL_IPV6_DEFS
> /* Likewise, for IPv6. */
> struct ipv6_mreq
> {
> @@ -278,7 +293,7 @@ struct ipv6_mreq
> /* local interface */
> unsigned int ipv6mr_interface;
> };
> -
> +#endif /* !__USE_KERNEL_IPV6_DEFS */
>
> #if defined __USE_MISC || defined __USE_GNU
> /* Multicast group request. */
> @@ -349,10 +364,6 @@ struct group_filter
> * sizeof (struct sockaddr_storage)))
> #endif
>
> -
> -/* Get system-specific definitions. */
> -#include <bits/in.h>
> -
> /* Functions to convert between host and network byte order.
>
> Please note that these functions normally take `unsigned long int' or
> diff --git a/sysdeps/unix/sysv/linux/bits/in.h b/sysdeps/unix/sysv/linux/bits/in.h
> index e959b33..d763ce9 100644
> --- a/sysdeps/unix/sysv/linux/bits/in.h
> +++ b/sysdeps/unix/sysv/linux/bits/in.h
> @@ -21,6 +21,18 @@
> # error "Never use <bits/in.h> directly; include <netinet/in.h> instead."
> #endif
>
> +/* If the application has already included linux/in6.h from a linux-based
> + kernel then we will not define the IPv6 IPPROTO_* defines, in6_addr (nor the
> + defines), sockaddr_in6, or ipv6_mreq. The ABI used by the linux-kernel and
> + glibc match exactly. Neither the linux kernel nor glibc should break this
> + ABI without coordination. */
> +#ifdef _UAPI_LINUX_IN6_H
> +/* This is not quite the same API since the kernel always defines s6_addr16 and
> + s6_addr32. This is not a violation of POSIX since POSIX says "at least the
> + following member" and that holds true. */
> +# define __USE_KERNEL_IPV6_DEFS
> +#endif
> +
> /* Options for use with `getsockopt' and `setsockopt' at the IP level.
> The first word in the comment at the right is the data type used;
> "bool" means a boolean value stored in an `int'. */
>
^ permalink raw reply
* Re: [GLIBC Patch v2] inet: avoid redefinition of some structs in kernel
From: Andreas Jaeger @ 2013-08-16 15:32 UTC (permalink / raw)
To: Cong Wang
Cc: netdev, David S. Miller, Thomas Backlund, libc-alpha,
YOSHIFUJI Hideaki, Carlos O'Donell
In-Reply-To: <1376558891-26221-2-git-send-email-amwang@redhat.com>
On 08/15/2013 11:28 AM, Cong Wang wrote:
> From: Carlos O'Donell <carlos@redhat.com>
>
> - Synchronize linux's `include/uapi/linux/in6.h'
> with glibc's `inet/netinet/in.h'.
> - Synchronize glibc's `inet/netinet/in.h with linux's
> `include/uapi/linux/in6.h'.
> - Allow including the headers in either other.
> - First header included defines the structures and macros.
Let me first say that I really love where this is going and would love
to see more of this work.
Will this work with older kernels as well? Meaning: Can I compile
today's user land programs with a new glibc and Kernel 3.10? My reading
of the patch assumes it does but I would like to hear that you tested it.
The patch itself looks fine, thanks,
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
^ permalink raw reply
* Re: [GLIBC Patch v2] inet: avoid redefinition of some structs in kernel
From: Carlos O'Donell @ 2013-08-16 15:44 UTC (permalink / raw)
To: Andreas Jaeger
Cc: Cong Wang, netdev, David S. Miller, Thomas Backlund, libc-alpha,
YOSHIFUJI Hideaki
In-Reply-To: <520E461B.8040406@suse.com>
On 08/16/2013 11:32 AM, Andreas Jaeger wrote:
> On 08/15/2013 11:28 AM, Cong Wang wrote:
>> From: Carlos O'Donell <carlos@redhat.com>
>>
>> - Synchronize linux's `include/uapi/linux/in6.h'
>> with glibc's `inet/netinet/in.h'.
>> - Synchronize glibc's `inet/netinet/in.h with linux's
>> `include/uapi/linux/in6.h'.
>> - Allow including the headers in either other.
>> - First header included defines the structures and macros.
>
> Let me first say that I really love where this is going and would love
> to see more of this work.
The plan would be to eventually tackle more of the conflicting headers
in a uniform way.
> Will this work with older kernels as well? Meaning: Can I compile
> today's user land programs with a new glibc and Kernel 3.10? My reading
> of the patch assumes it does but I would like to hear that you tested it.
You can indeed take a new glibc, and a new kernel, and old programs
that previously failed to compile will now work. The ABI is maintained
and the headers coordinate.
I did not test this explicitly except through the small test case
I wrote which permutes inclusion order and the use of various
structures defined in the headers.
The only quibble one could have is with Linux. In that if you
include the Linux headers first you will get more definitions than
required by POSIX e.g. s6_addr16 and s6_add32. However as I note
in the comment this is not a violation of POSIX since POSIX says
"at least the following member" and that holds true.
> The patch itself looks fine, thanks,
Thanks for reviewing.
If the kernel patches get accepted I will check these into
glibc 2.19 for Cong.
Cheers,
Carlos.
^ permalink raw reply
* Re: [GLIBC Patch v2] inet: avoid redefinition of some structs in kernel
From: Carlos O'Donell @ 2013-08-16 15:47 UTC (permalink / raw)
To: Cong Wang
Cc: netdev, David S. Miller, Thomas Backlund, libc-alpha,
YOSHIFUJI Hideaki
In-Reply-To: <1376558891-26221-2-git-send-email-amwang@redhat.com>
On 08/15/2013 05:28 AM, Cong Wang wrote:
> 2013-08-13 Carlos O'Donell <carlos@redhat.com>
> Cong Wang <amwang@redhat.com>
>
> * sysdeps/unix/sysv/linux/bits/in.h
> [_UAPI_LINUX_IN6_H]: Define __USE_KERNEL_IPV6_DEFS.
> * inet/netinet/in.h: Move in_addr definition and bits/in.h inclusion
> before __USE_KERNEL_IPV6_DEFS uses.
> * inet/netinet/in.h [!__USE_KERNEL_IPV6_DEFS]: Define IPPROTO_MH, and
> IPPROTO_BEETPH.
> [__USE_KERNEL_IPV6_DEFS]: Don't define any of IPPROTO_*, in6_addr,
> sockaddr_in6, or ipv6_mreq.
Cong,
Given that this is a user visible change could you please file
a glibc bugzilla bug in sourceware[1] so we can track the commit and so
that future users can reopen the bug to discuss any defects?
Then you need to add the BZ# to the ChangeLog, and whomever
commits this for you will mark it fixed in the NEWS. We should
also write up a NEWS blurb for this since it's the first explicit
header coordination of it's kind and we should highlight that
so developers take note and help us coordinate more headers.
Cheers,
Carlos.
[1] http://sourceware.org/bugzilla/
^ permalink raw reply
* Re: Where are OVS VXLAN patches?
From: Jesse Gross @ 2013-08-16 15:58 UTC (permalink / raw)
To: Cong Wang; +Cc: Stephen Hemminger, netdev, David S. Miller, Pravin B Shelar
In-Reply-To: <1376628625.2934.57.camel@cr0>
On Thu, Aug 15, 2013 at 9:50 PM, Cong Wang <amwang@redhat.com> wrote:
> (Re-adding netdev and davem...)
>
> On Thu, 2013-08-15 at 21:33 -0700, Stephen Hemminger wrote:
>> Send them to netdev. The vxlan-next tree was temporary when there were
>> 3 people working on VXLAN at
>> same time (Pravin, ong, and me). I see no point in keeping a separate
>> tree over the long term.
>>
>
> I agree. There is some misunderstanding between you and David on taking
> these patches. :)
Thanks for following up Cong.
David, if you just want to take the whole series at this point, there
shouldn't be any conflicts on my end and that way we can finally get
this in.
^ permalink raw reply
* Re: [PATCH v4 3/5] ARM: davinci: da850: add OF_DEV_AUXDATA entry for mdio.
From: Sekhar Nori @ 2013-08-16 15:58 UTC (permalink / raw)
To: Lad, Prabhakar
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, DLOS, LKML,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1376546497-26931-4-git-send-email-prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On 8/15/2013 11:31 AM, Lad, Prabhakar wrote:
> From: "Lad, Prabhakar" <prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>
> Add OF_DEV_AUXDATA for mdio driver in da850 board dt
> file to use mdio clock.
>
> Signed-off-by: Lad, Prabhakar <prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Queued for v3.12
Thanks,
Sekhar
^ permalink raw reply
* Re: [PATCH v5 1/2] ARM: davinci: da850: add DT node for ethernet
From: Sekhar Nori @ 2013-08-16 16:08 UTC (permalink / raw)
To: Lad, Prabhakar
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
netdev-u79uwXL29TY76Z2rM5mHXA, DLOS, LKML,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
In-Reply-To: <1376662262-21795-2-git-send-email-prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On 8/16/2013 7:41 PM, Lad, Prabhakar wrote:
> From: "Lad, Prabhakar" <prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>
> Add ethernet device tree node information and pinmux for mii to da850 by
> providing interrupt details and local mac address.
>
> Signed-off-by: Lad, Prabhakar <prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> arch/arm/boot/dts/da850-evm.dts | 5 +++++
> arch/arm/boot/dts/da850.dtsi | 30 ++++++++++++++++++++++++++++++
> 2 files changed, 35 insertions(+)
>
> diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
> index 1f8cfdd..44f3fbc 100644
> --- a/arch/arm/boot/dts/da850-evm.dts
> +++ b/arch/arm/boot/dts/da850-evm.dts
> @@ -96,6 +96,11 @@
> pinctrl-0 = <&mdio_pins>;
> bus_freq = <2200000>;
> };
> + ethernet: emac@1e20000 {
You misunderstood what Sergei said. This should be:
eth0: ethernet@1e20000 {
Thanks,
Sekhar
^ permalink raw reply
* Re: [PATCH v5 2/2] ARM: davinci: da850: add OF_DEV_AUXDATA entry for davinci_emac
From: Sekhar Nori @ 2013-08-16 16:14 UTC (permalink / raw)
To: Lad, Prabhakar
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, DLOS, LKML,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1376662262-21795-3-git-send-email-prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On 8/16/2013 7:41 PM, Lad, Prabhakar wrote:
> From: "Lad, Prabhakar" <prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>
> Add OF_DEV_AUXDATA for ethernet davinci_emac driver in da850 board dt
> file to use emac clock.
>
> Signed-off-by: Lad, Prabhakar <prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Queuing this for v3.12. Please fix the address of devicetree list in
future submissions.
Thanks,
Sekhar
^ permalink raw reply
* [PATCH v6] ARM: davinci: da850: add DT node for ethernet
From: Lad, Prabhakar @ 2013-08-16 17:07 UTC (permalink / raw)
To: Sekhar Nori
Cc: DLOS, LKML, devicetree, linux-arm-kernel, netdev, Lad, Prabhakar
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
Add ethernet device tree node information and pinmux for mii to da850 by
providing interrupt details and local mac address.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
---
Changes for v6:
1: Fixed review comment pointed by Sergei.
arch/arm/boot/dts/da850-evm.dts | 5 +++++
arch/arm/boot/dts/da850.dtsi | 30 ++++++++++++++++++++++++++++++
2 files changed, 35 insertions(+)
diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index 1f8cfdd..588ce58 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -96,6 +96,11 @@
pinctrl-0 = <&mdio_pins>;
bus_freq = <2200000>;
};
+ eth0: ethernet@1e20000 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&mii_pins>;
+ };
};
nand_cs3@62000000 {
status = "okay";
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index d5138b4..8d17346 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -131,6 +131,22 @@
0x10 0x00000088 0x000000ff
>;
};
+ mii_pins: pinmux_mii_pins {
+ pinctrl-single,bits = <
+ /*
+ * MII_TXEN, MII_TXCLK, MII_COL
+ * MII_TXD_3, MII_TXD_2, MII_TXD_1
+ * MII_TXD_0
+ */
+ 0x8 0x88888880 0xfffffff0
+ /*
+ * MII_RXER, MII_CRS, MII_RXCLK
+ * MII_RXDV, MII_RXD_3, MII_RXD_2
+ * MII_RXD_1, MII_RXD_0
+ */
+ 0xc 0x88888888 0xffffffff
+ >;
+ };
};
serial0: serial@1c42000 {
@@ -226,6 +242,20 @@
#size-cells = <0>;
reg = <0x224000 0x1000>;
};
+ eth0: ethernet@1e20000 {
+ compatible = "ti,davinci-dm6467-emac";
+ reg = <0x220000 0x4000>;
+ ti,davinci-ctrl-reg-offset = <0x3000>;
+ ti,davinci-ctrl-mod-reg-offset = <0x2000>;
+ ti,davinci-ctrl-ram-offset = <0>;
+ ti,davinci-ctrl-ram-size = <0x2000>;
+ local-mac-address = [ 00 00 00 00 00 00 ];
+ interrupts = <33
+ 34
+ 35
+ 36
+ >;
+ };
};
nand_cs3@62000000 {
compatible = "ti,davinci-nand";
--
1.7.9.5
^ permalink raw reply related
* Why UDP can't confirm ARP state?
From: Lin Ming @ 2013-08-16 17:07 UTC (permalink / raw)
To: networking
Hi list,
When TCP receives a packet, it can confirm the related ARP cache entry
in REACHABLE state.
Why can't UDP?
I think it's because UDP is connectionless.
But I don't get the exact reason.
Any hint?
Thanks,
Lin Ming
^ permalink raw reply
* Re: [PATCH v3 7/7] net: davinci_mdio: use platform_{get,set}_drvdata()
From: Prabhakar Lad @ 2013-08-16 17:15 UTC (permalink / raw)
To: Libo Chen
Cc: David Miller, Mugunthan V N, bigeasy, b-liu, netdev, LKML,
Li Zefan, Sergei Shtylyov
In-Reply-To: <520CD13E.7090802@huawei.com>
On Thu, Aug 15, 2013 at 6:31 PM, Libo Chen <clbchenlibo.chen@huawei.com> wrote:
> Use the wrapper functions for getting and setting the driver data using
> platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
> so we can directly pass a struct platform_device.
>
> Signed-off-by: Libo Chen <libo.chen@huawei.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Regards,
--Prabhakar Lad
^ permalink raw reply
* Re: [PATCH v5 1/2] ARM: davinci: da850: add DT node for ethernet
From: Sergei Shtylyov @ 2013-08-16 18:46 UTC (permalink / raw)
To: Lad, Prabhakar
Cc: Sekhar Nori, DLOS, netdev, devicetree-discuss, LKML,
linux-arm-kernel
In-Reply-To: <1376662262-21795-2-git-send-email-prabhakar.csengg@gmail.com>
Hello.
On 08/16/2013 06:11 PM, Lad, Prabhakar wrote:
> From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
> Add ethernet device tree node information and pinmux for mii to da850 by
> providing interrupt details and local mac address.
> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
> ---
> arch/arm/boot/dts/da850-evm.dts | 5 +++++
> arch/arm/boot/dts/da850.dtsi | 30 ++++++++++++++++++++++++++++++
> 2 files changed, 35 insertions(+)
> diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
> index 1f8cfdd..44f3fbc 100644
> --- a/arch/arm/boot/dts/da850-evm.dts
> +++ b/arch/arm/boot/dts/da850-evm.dts
> @@ -96,6 +96,11 @@
> pinctrl-0 = <&mdio_pins>;
> bus_freq = <2200000>;
> };
> + ethernet: emac@1e20000 {
Why label the node in the board file too?
> + status = "okay";
> + pinctrl-names = "default";
> + pinctrl-0 = <&mii_pins>;
> + };
> };
> nand_cs3@62000000 {
> status = "okay";
> diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
> index d5138b4..a5d30d9 100644
> --- a/arch/arm/boot/dts/da850.dtsi
> +++ b/arch/arm/boot/dts/da850.dtsi
[...]
> @@ -226,6 +242,20 @@
> #size-cells = <0>;
> reg = <0x224000 0x1000>;
> };
> + ethernet: emac@1e20000 {
I said node should be named "ethernet", not labelled. You're the second
person that doesn't know the difference between the two. :-)
WBR, Sergei
^ 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