From 40025c2a949165b3681dcd271316df89cc67e7a2 Mon Sep 17 00:00:00 2001 From: thuermann Date: Wed, 14 Nov 2007 12:12:20 +0000 Subject: [PATCH] Rebase patch series to net-2.6.25 and update to r542. git-svn-id: svn://svn.berlios.de//socketcan/trunk@543 030b6a49-0b11-0410-94ab-b0dab22257f2 --- .../01-can-proto-numbers.diff | 42 ++++---- .../02-can-core.diff | 98 ++++++++++--------- .../03-can-raw-proto.diff | 31 +++--- .../04-can-bcm-proto.diff | 20 ++-- .../05-can-vcan-driver.diff | 24 ++--- .../06-can-maintainers.diff | 18 ++-- .../07-can-doc.diff | 16 +-- patch-series/{net-2.6.24 => net-2.6.25}/intro | 48 ++++----- .../{net-2.6.24 => net-2.6.25}/series | 0 9 files changed, 152 insertions(+), 145 deletions(-) rename patch-series/{net-2.6.24 => net-2.6.25}/01-can-proto-numbers.diff (77%) rename patch-series/{net-2.6.24 => net-2.6.25}/02-can-core.diff (96%) rename patch-series/{net-2.6.24 => net-2.6.25}/03-can-raw-proto.diff (96%) rename patch-series/{net-2.6.24 => net-2.6.25}/04-can-bcm-proto.diff (98%) rename patch-series/{net-2.6.24 => net-2.6.25}/05-can-vcan-driver.diff (92%) rename patch-series/{net-2.6.24 => net-2.6.25}/06-can-maintainers.diff (78%) rename patch-series/{net-2.6.24 => net-2.6.25}/07-can-doc.diff (98%) rename patch-series/{net-2.6.24 => net-2.6.25}/intro (88%) rename patch-series/{net-2.6.24 => net-2.6.25}/series (100%) diff --git a/patch-series/net-2.6.24/01-can-proto-numbers.diff b/patch-series/net-2.6.25/01-can-proto-numbers.diff similarity index 77% rename from patch-series/net-2.6.24/01-can-proto-numbers.diff rename to patch-series/net-2.6.25/01-can-proto-numbers.diff index 0597770..ac8f692 100644 --- a/patch-series/net-2.6.24/01-can-proto-numbers.diff +++ b/patch-series/net-2.6.25/01-can-proto-numbers.diff @@ -17,10 +17,10 @@ Signed-off-by: Urs Thuermann net/core/sock.c | 4 ++-- 6 files changed, 11 insertions(+), 4 deletions(-) -Index: net-2.6.24/include/linux/if_arp.h +Index: net-2.6.25/include/linux/if_arp.h =================================================================== ---- net-2.6.24.orig/include/linux/if_arp.h 2007-10-02 12:10:51.000000000 +0200 -+++ net-2.6.24/include/linux/if_arp.h 2007-10-02 12:11:01.000000000 +0200 +--- net-2.6.25.orig/include/linux/if_arp.h 2007-11-14 13:04:26.000000000 +0100 ++++ net-2.6.25/include/linux/if_arp.h 2007-11-14 13:04:46.000000000 +0100 @@ -52,6 +52,7 @@ #define ARPHRD_ROSE 270 #define ARPHRD_X25 271 /* CCITT X.25 */ @@ -29,10 +29,10 @@ Index: net-2.6.24/include/linux/if_arp.h #define ARPHRD_PPP 512 #define ARPHRD_CISCO 513 /* Cisco HDLC */ #define ARPHRD_HDLC ARPHRD_CISCO -Index: net-2.6.24/include/linux/if_ether.h +Index: net-2.6.25/include/linux/if_ether.h =================================================================== ---- net-2.6.24.orig/include/linux/if_ether.h 2007-10-02 12:10:51.000000000 +0200 -+++ net-2.6.24/include/linux/if_ether.h 2007-10-02 12:11:01.000000000 +0200 +--- net-2.6.25.orig/include/linux/if_ether.h 2007-11-14 13:04:26.000000000 +0100 ++++ net-2.6.25/include/linux/if_ether.h 2007-11-14 13:04:46.000000000 +0100 @@ -90,6 +90,7 @@ #define ETH_P_WAN_PPP 0x0007 /* Dummy type for WAN PPP frames*/ #define ETH_P_PPP_MP 0x0008 /* Dummy type for PPP MP frames */ @@ -41,10 +41,10 @@ Index: net-2.6.24/include/linux/if_ether.h #define ETH_P_PPPTALK 0x0010 /* Dummy type for Atalk over PPP*/ #define ETH_P_TR_802_2 0x0011 /* 802.2 frames */ #define ETH_P_MOBITEX 0x0015 /* Mobitex (kaz@cafe.net) */ -Index: net-2.6.24/include/linux/socket.h +Index: net-2.6.25/include/linux/socket.h =================================================================== ---- net-2.6.24.orig/include/linux/socket.h 2007-10-02 12:10:51.000000000 +0200 -+++ net-2.6.24/include/linux/socket.h 2007-10-02 12:11:01.000000000 +0200 +--- net-2.6.25.orig/include/linux/socket.h 2007-11-14 13:04:26.000000000 +0100 ++++ net-2.6.25/include/linux/socket.h 2007-11-14 13:04:46.000000000 +0100 @@ -185,6 +185,7 @@ #define AF_PPPOX 24 /* PPPoX sockets */ #define AF_WANPIPE 25 /* Wanpipe API Sockets */ @@ -61,12 +61,12 @@ Index: net-2.6.24/include/linux/socket.h #define PF_TIPC AF_TIPC #define PF_BLUETOOTH AF_BLUETOOTH #define PF_IUCV AF_IUCV -Index: net-2.6.24/include/linux/tty.h +Index: net-2.6.25/include/linux/tty.h =================================================================== ---- net-2.6.24.orig/include/linux/tty.h 2007-10-02 12:10:51.000000000 +0200 -+++ net-2.6.24/include/linux/tty.h 2007-10-02 12:11:02.000000000 +0200 -@@ -24,7 +24,7 @@ - #define NR_PTYS CONFIG_LEGACY_PTY_COUNT /* Number of legacy ptys */ +--- net-2.6.25.orig/include/linux/tty.h 2007-11-14 13:04:26.000000000 +0100 ++++ net-2.6.25/include/linux/tty.h 2007-11-14 13:04:46.000000000 +0100 +@@ -23,7 +23,7 @@ + */ #define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */ #define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */ -#define NR_LDISCS 17 @@ -74,7 +74,7 @@ Index: net-2.6.24/include/linux/tty.h /* line disciplines */ #define N_TTY 0 -@@ -45,6 +45,7 @@ +@@ -44,6 +44,7 @@ #define N_SYNC_PPP 14 /* synchronous PPP */ #define N_HCI 15 /* Bluetooth HCI UART */ #define N_GIGASET_M101 16 /* Siemens Gigaset M101 serial DECT adapter */ @@ -82,10 +82,10 @@ Index: net-2.6.24/include/linux/tty.h /* * This character is the same as _POSIX_VDISABLE: it cannot be used as -Index: net-2.6.24/net/core/sock.c +Index: net-2.6.25/net/core/sock.c =================================================================== ---- net-2.6.24.orig/net/core/sock.c 2007-10-02 12:10:51.000000000 +0200 -+++ net-2.6.24/net/core/sock.c 2007-10-02 12:11:02.000000000 +0200 +--- net-2.6.25.orig/net/core/sock.c 2007-11-14 13:04:26.000000000 +0100 ++++ net-2.6.25/net/core/sock.c 2007-11-14 13:04:47.000000000 +0100 @@ -154,7 +154,7 @@ "sk_lock-AF_ASH" , "sk_lock-AF_ECONET" , "sk_lock-AF_ATMSVC" , "sk_lock-21" , "sk_lock-AF_SNA" , "sk_lock-AF_IRDA" , @@ -104,10 +104,10 @@ Index: net-2.6.24/net/core/sock.c "slock-AF_TIPC" , "slock-AF_BLUETOOTH", "slock-AF_IUCV" , "slock-AF_RXRPC" , "slock-AF_MAX" }; -Index: net-2.6.24/include/linux/if.h +Index: net-2.6.25/include/linux/if.h =================================================================== ---- net-2.6.24.orig/include/linux/if.h 2007-10-02 12:10:28.000000000 +0200 -+++ net-2.6.24/include/linux/if.h 2007-10-02 12:09:34.000000000 +0200 +--- net-2.6.25.orig/include/linux/if.h 2007-11-14 13:04:26.000000000 +0100 ++++ net-2.6.25/include/linux/if.h 2007-11-14 13:04:47.000000000 +0100 @@ -50,7 +50,9 @@ #define IFF_LOWER_UP 0x10000 /* driver signals L1 up */ #define IFF_DORMANT 0x20000 /* driver signals dormant */ diff --git a/patch-series/net-2.6.24/02-can-core.diff b/patch-series/net-2.6.25/02-can-core.diff similarity index 96% rename from patch-series/net-2.6.24/02-can-core.diff rename to patch-series/net-2.6.25/02-can-core.diff index 43a3c4f..56c55cb 100644 --- a/patch-series/net-2.6.24/02-can-core.diff +++ b/patch-series/net-2.6.25/02-can-core.diff @@ -16,15 +16,15 @@ Signed-off-by: Urs Thuermann net/Makefile | 1 net/can/Kconfig | 25 + net/can/Makefile | 6 - net/can/af_can.c | 969 ++++++++++++++++++++++++++++++++++++++++++++++ + net/can/af_can.c | 975 ++++++++++++++++++++++++++++++++++++++++++++++ net/can/af_can.h | 120 +++++ net/can/proc.c | 532 +++++++++++++++++++++++++ - 10 files changed, 1936 insertions(+) + 10 files changed, 1942 insertions(+) -Index: net-2.6.24/include/linux/can.h +Index: net-2.6.25/include/linux/can.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ net-2.6.24/include/linux/can.h 2007-10-05 08:11:15.000000000 +0200 ++++ net-2.6.25/include/linux/can.h 2007-11-14 13:04:49.000000000 +0100 @@ -0,0 +1,111 @@ +/* + * linux/can.h @@ -137,10 +137,10 @@ Index: net-2.6.24/include/linux/can.h +#define CAN_INV_FILTER 0x20000000U /* to be set in can_filter.can_id */ + +#endif /* CAN_H */ -Index: net-2.6.24/include/linux/can/core.h +Index: net-2.6.25/include/linux/can/core.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ net-2.6.24/include/linux/can/core.h 2007-10-05 08:11:15.000000000 +0200 ++++ net-2.6.25/include/linux/can/core.h 2007-11-14 13:04:49.000000000 +0100 @@ -0,0 +1,78 @@ +/* + * linux/can/core.h @@ -163,7 +163,7 @@ Index: net-2.6.24/include/linux/can/core.h +#include +#include + -+#define CAN_VERSION "20071004" ++#define CAN_VERSION "20071027" + +/* increment this number each time you change some user-space interface */ +#define CAN_ABI_VERSION "8" @@ -220,10 +220,10 @@ Index: net-2.6.24/include/linux/can/core.h +#endif + +#endif /* CAN_CORE_H */ -Index: net-2.6.24/net/Kconfig +Index: net-2.6.25/net/Kconfig =================================================================== ---- net-2.6.24.orig/net/Kconfig 2007-10-05 08:11:10.000000000 +0200 -+++ net-2.6.24/net/Kconfig 2007-10-05 08:11:15.000000000 +0200 +--- net-2.6.25.orig/net/Kconfig 2007-11-14 13:04:26.000000000 +0100 ++++ net-2.6.25/net/Kconfig 2007-11-14 13:04:49.000000000 +0100 @@ -218,6 +218,7 @@ endmenu @@ -232,10 +232,10 @@ Index: net-2.6.24/net/Kconfig source "net/irda/Kconfig" source "net/bluetooth/Kconfig" source "net/rxrpc/Kconfig" -Index: net-2.6.24/net/Makefile +Index: net-2.6.25/net/Makefile =================================================================== ---- net-2.6.24.orig/net/Makefile 2007-10-05 08:11:10.000000000 +0200 -+++ net-2.6.24/net/Makefile 2007-10-05 08:11:15.000000000 +0200 +--- net-2.6.25.orig/net/Makefile 2007-11-14 13:04:26.000000000 +0100 ++++ net-2.6.25/net/Makefile 2007-11-14 13:04:49.000000000 +0100 @@ -34,6 +34,7 @@ obj-$(CONFIG_NETROM) += netrom/ obj-$(CONFIG_ROSE) += rose/ @@ -244,10 +244,10 @@ Index: net-2.6.24/net/Makefile obj-$(CONFIG_IRDA) += irda/ obj-$(CONFIG_BT) += bluetooth/ obj-$(CONFIG_SUNRPC) += sunrpc/ -Index: net-2.6.24/net/can/Kconfig +Index: net-2.6.25/net/can/Kconfig =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ net-2.6.24/net/can/Kconfig 2007-10-05 11:16:25.000000000 +0200 ++++ net-2.6.25/net/can/Kconfig 2007-11-14 13:04:49.000000000 +0100 @@ -0,0 +1,25 @@ +# +# Controller Area Network (CAN) network layer core configuration @@ -274,10 +274,10 @@ Index: net-2.6.24/net/can/Kconfig + Say Y here if you want the CAN core to produce a bunch of debug + messages. Select this if you are having a problem with CAN + support and want to see more of what is going on. -Index: net-2.6.24/net/can/Makefile +Index: net-2.6.25/net/can/Makefile =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ net-2.6.24/net/can/Makefile 2007-10-05 11:15:08.000000000 +0200 ++++ net-2.6.25/net/can/Makefile 2007-11-14 13:04:49.000000000 +0100 @@ -0,0 +1,6 @@ +# +# Makefile for the Linux Controller Area Network core. @@ -285,11 +285,11 @@ Index: net-2.6.24/net/can/Makefile + +obj-$(CONFIG_CAN) += can.o +can-objs := af_can.o proc.o -Index: net-2.6.24/net/can/af_can.c +Index: net-2.6.25/net/can/af_can.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ net-2.6.24/net/can/af_can.c 2007-10-05 11:09:07.000000000 +0200 -@@ -0,0 +1,969 @@ ++++ net-2.6.25/net/can/af_can.c 2007-11-14 13:04:49.000000000 +0100 +@@ -0,0 +1,975 @@ +/* + * af_can.c - Protocol family CAN core module + * (used by different CAN protocol modules) @@ -421,7 +421,7 @@ Index: net-2.6.24/net/can/af_can.c + struct sock *sk; + struct can_proto *cp; + char module_name[sizeof("can-proto-000")]; -+ int ret = 0; ++ int err = 0; + + DBG("socket %p, type %d, proto %d\n", sock, sock->type, protocol); + @@ -438,18 +438,18 @@ Index: net-2.6.24/net/can/af_can.c + /* try to load protocol module, when CONFIG_KMOD is defined */ + if (!proto_tab[protocol]) { + sprintf(module_name, "can-proto-%d", protocol); -+ ret = request_module(module_name); ++ err = request_module(module_name); + + /* + * In case of error we only print a message but don't + * return the error code immediately. Below we will + * return -EPROTONOSUPPORT + */ -+ if (ret == -ENOSYS) { ++ if (err == -ENOSYS) { + if (printk_ratelimit()) + printk(KERN_INFO "can: request_module(%s)" + " not implemented.\n", module_name); -+ } else if (ret) { ++ } else if (err) { + if (printk_ratelimit()) + printk(KERN_ERR "can: request_module(%s)" + " failed.\n", module_name); @@ -462,22 +462,26 @@ Index: net-2.6.24/net/can/af_can.c + cp = NULL; + spin_unlock(&proto_tab_lock); + -+ /* check for success and correct type */ -+ if (!cp || cp->type != sock->type) { -+ ret = -EPROTONOSUPPORT; ++ /* check for available protocol and correct usage */ ++ ++ if (!cp) ++ return -EPROTONOSUPPORT; ++ ++ if (cp->type != sock->type) { ++ err = -EPROTONOSUPPORT; + goto errout; + } + + if (cp->capability >= 0 && !capable(cp->capability)) { -+ ret = -EPERM; ++ err = -EPERM; + goto errout; + } + + sock->ops = cp->ops; + -+ sk = sk_alloc(net, PF_CAN, GFP_KERNEL, cp->prot, 1); ++ sk = sk_alloc(net, PF_CAN, GFP_KERNEL, cp->prot); + if (!sk) { -+ ret = -ENOMEM; ++ err = -ENOMEM; + goto errout; + } + @@ -487,9 +491,9 @@ Index: net-2.6.24/net/can/af_can.c + DBG("created sock: %p\n", sk); + + if (sk->sk_prot->init) -+ ret = sk->sk_prot->init(sk); ++ err = sk->sk_prot->init(sk); + -+ if (ret) { ++ if (err) { + /* release sk on errors */ + sock_orphan(sk); + sock_put(sk); @@ -497,7 +501,7 @@ Index: net-2.6.24/net/can/af_can.c + + errout: + module_put(cp->prot->owner); -+ return ret; ++ return err; +} + +/* @@ -531,6 +535,8 @@ Index: net-2.6.24/net/can/af_can.c + } + + skb->protocol = htons(ETH_P_CAN); ++ skb_reset_network_header(skb); ++ skb_reset_transport_header(skb); + + if (loop) { + /* local loopback of sent CAN frames */ @@ -588,7 +594,7 @@ Index: net-2.6.24/net/can/af_can.c + +static struct dev_rcv_lists *find_dev_rcv_lists(struct net_device *dev) +{ -+ struct dev_rcv_lists *d; ++ struct dev_rcv_lists *d = NULL; + struct hlist_node *n; + + /* @@ -686,7 +692,7 @@ Index: net-2.6.24/net/can/af_can.c + struct receiver *r; + struct hlist_head *rl; + struct dev_rcv_lists *d; -+ int ret = 0; ++ int err = 0; + + /* insert new receiver (dev,canid,mask) -> (func,data) */ + @@ -720,12 +726,12 @@ Index: net-2.6.24/net/can/af_can.c + DBG("receive list not found for dev %s, id %03X, mask %03X\n", + DNAME(dev), can_id, mask); + kmem_cache_free(rcv_cache, r); -+ ret = -ENODEV; ++ err = -ENODEV; + } + + spin_unlock(&rcv_lists_lock); + -+ return ret; ++ return err; +} +EXPORT_SYMBOL(can_rx_register); + @@ -1259,10 +1265,10 @@ Index: net-2.6.24/net/can/af_can.c + +module_init(can_init); +module_exit(can_exit); -Index: net-2.6.24/net/can/af_can.h +Index: net-2.6.25/net/can/af_can.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ net-2.6.24/net/can/af_can.h 2007-10-05 08:11:15.000000000 +0200 ++++ net-2.6.25/net/can/af_can.h 2007-11-14 13:04:49.000000000 +0100 @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2002-2007 Volkswagen Group Electronic Research @@ -1384,10 +1390,10 @@ Index: net-2.6.24/net/can/af_can.h +extern struct hlist_head rx_dev_list; /* rx dispatcher structures */ + +#endif /* AF_CAN_H */ -Index: net-2.6.24/net/can/proc.c +Index: net-2.6.25/net/can/proc.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ net-2.6.24/net/can/proc.c 2007-10-05 08:11:15.000000000 +0200 ++++ net-2.6.25/net/can/proc.c 2007-11-14 13:04:49.000000000 +0100 @@ -0,0 +1,532 @@ +/* + * proc.c - procfs support for Protocol family CAN core module @@ -1500,7 +1506,7 @@ Index: net-2.6.24/net/can/proc.c +static unsigned long calc_rate(unsigned long oldjif, unsigned long newjif, + unsigned long count) +{ -+ unsigned long ret = 0; ++ unsigned long rate; + + if (oldjif == newjif) + return 0; @@ -1512,9 +1518,9 @@ Index: net-2.6.24/net/can/proc.c + return 99999999; + } + -+ ret = (count * HZ) / (newjif - oldjif); ++ rate = (count * HZ) / (newjif - oldjif); + -+ return ret; ++ return rate; +} + +void can_stat_update(unsigned long data) @@ -1921,10 +1927,10 @@ Index: net-2.6.24/net/can/proc.c + if (can_dir) + proc_net_remove(&init_net, "can"); +} -Index: net-2.6.24/include/linux/can/error.h +Index: net-2.6.25/include/linux/can/error.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ net-2.6.24/include/linux/can/error.h 2007-10-05 08:11:15.000000000 +0200 ++++ net-2.6.25/include/linux/can/error.h 2007-11-14 13:04:49.000000000 +0100 @@ -0,0 +1,93 @@ +/* + * linux/can/error.h diff --git a/patch-series/net-2.6.24/03-can-raw-proto.diff b/patch-series/net-2.6.25/03-can-raw-proto.diff similarity index 96% rename from patch-series/net-2.6.24/03-can-raw-proto.diff rename to patch-series/net-2.6.25/03-can-raw-proto.diff index 4430b2f..729a48c 100644 --- a/patch-series/net-2.6.24/03-can-raw-proto.diff +++ b/patch-series/net-2.6.25/03-can-raw-proto.diff @@ -10,13 +10,13 @@ Signed-off-by: Urs Thuermann include/linux/can/raw.h | 31 + net/can/Kconfig | 11 net/can/Makefile | 3 - net/can/raw.c | 810 ++++++++++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 855 insertions(+) + net/can/raw.c | 811 ++++++++++++++++++++++++++++++++++++++++++++++++ + 4 files changed, 856 insertions(+) -Index: net-2.6.24/include/linux/can/raw.h +Index: net-2.6.25/include/linux/can/raw.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ net-2.6.24/include/linux/can/raw.h 2007-10-05 11:11:41.000000000 +0200 ++++ net-2.6.25/include/linux/can/raw.h 2007-11-14 13:04:51.000000000 +0100 @@ -0,0 +1,31 @@ +/* + * linux/can/raw.h @@ -49,10 +49,10 @@ Index: net-2.6.24/include/linux/can/raw.h +}; + +#endif -Index: net-2.6.24/net/can/Kconfig +Index: net-2.6.25/net/can/Kconfig =================================================================== ---- net-2.6.24.orig/net/can/Kconfig 2007-10-05 11:11:04.000000000 +0200 -+++ net-2.6.24/net/can/Kconfig 2007-10-05 11:12:35.000000000 +0200 +--- net-2.6.25.orig/net/can/Kconfig 2007-11-14 13:04:49.000000000 +0100 ++++ net-2.6.25/net/can/Kconfig 2007-11-14 13:04:51.000000000 +0100 @@ -16,6 +16,17 @@ If you want CAN support you should say Y here and also to the specific driver for your controller(s) below. @@ -71,10 +71,10 @@ Index: net-2.6.24/net/can/Kconfig config CAN_DEBUG_CORE bool "CAN Core debugging messages" depends on CAN -Index: net-2.6.24/net/can/Makefile +Index: net-2.6.25/net/can/Makefile =================================================================== ---- net-2.6.24.orig/net/can/Makefile 2007-10-05 11:08:05.000000000 +0200 -+++ net-2.6.24/net/can/Makefile 2007-10-05 11:11:41.000000000 +0200 +--- net-2.6.25.orig/net/can/Makefile 2007-11-14 13:04:49.000000000 +0100 ++++ net-2.6.25/net/can/Makefile 2007-11-14 13:04:51.000000000 +0100 @@ -4,3 +4,6 @@ obj-$(CONFIG_CAN) += can.o @@ -82,11 +82,11 @@ Index: net-2.6.24/net/can/Makefile + +obj-$(CONFIG_CAN_RAW) += can-raw.o +can-raw-objs := raw.o -Index: net-2.6.24/net/can/raw.c +Index: net-2.6.25/net/can/raw.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ net-2.6.24/net/can/raw.c 2007-10-05 11:11:41.000000000 +0200 -@@ -0,0 +1,810 @@ ++++ net-2.6.25/net/can/raw.c 2007-11-14 13:04:51.000000000 +0100 +@@ -0,0 +1,811 @@ +/* + * raw.c - Raw sockets for protocol family CAN + * @@ -770,10 +770,11 @@ Index: net-2.6.24/net/can/raw.c + return -ENXIO; + } + -+ skb = alloc_skb(size, GFP_KERNEL); ++ skb = sock_alloc_send_skb(sk, size, msg->msg_flags & MSG_DONTWAIT, ++ &err); + if (!skb) { + dev_put(dev); -+ return -ENOMEM; ++ return err; + } + + err = memcpy_fromiovec(skb_put(skb, size), msg->msg_iov, size); diff --git a/patch-series/net-2.6.24/04-can-bcm-proto.diff b/patch-series/net-2.6.25/04-can-bcm-proto.diff similarity index 98% rename from patch-series/net-2.6.24/04-can-bcm-proto.diff rename to patch-series/net-2.6.25/04-can-bcm-proto.diff index 4de96c2..9db0240 100644 --- a/patch-series/net-2.6.24/04-can-bcm-proto.diff +++ b/patch-series/net-2.6.25/04-can-bcm-proto.diff @@ -13,10 +13,10 @@ Signed-off-by: Urs Thuermann net/can/bcm.c | 1763 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1844 insertions(+) -Index: net-2.6.24/include/linux/can/bcm.h +Index: net-2.6.25/include/linux/can/bcm.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ net-2.6.24/include/linux/can/bcm.h 2007-10-05 11:13:17.000000000 +0200 ++++ net-2.6.25/include/linux/can/bcm.h 2007-11-14 13:04:52.000000000 +0100 @@ -0,0 +1,65 @@ +/* + * linux/can/bcm.h @@ -83,10 +83,10 @@ Index: net-2.6.24/include/linux/can/bcm.h +#define RX_RTR_FRAME 0x0400 + +#endif /* CAN_BCM_H */ -Index: net-2.6.24/net/can/Kconfig +Index: net-2.6.25/net/can/Kconfig =================================================================== ---- net-2.6.24.orig/net/can/Kconfig 2007-10-05 11:12:35.000000000 +0200 -+++ net-2.6.24/net/can/Kconfig 2007-10-05 11:13:49.000000000 +0200 +--- net-2.6.25.orig/net/can/Kconfig 2007-11-14 13:04:51.000000000 +0100 ++++ net-2.6.25/net/can/Kconfig 2007-11-14 13:04:52.000000000 +0100 @@ -27,6 +27,19 @@ socket has several filter options e.g. ID masking / error frames. To receive/send raw CAN messages, use AF_CAN with protocol CAN_RAW. @@ -107,10 +107,10 @@ Index: net-2.6.24/net/can/Kconfig config CAN_DEBUG_CORE bool "CAN Core debugging messages" depends on CAN -Index: net-2.6.24/net/can/Makefile +Index: net-2.6.25/net/can/Makefile =================================================================== ---- net-2.6.24.orig/net/can/Makefile 2007-10-05 11:11:41.000000000 +0200 -+++ net-2.6.24/net/can/Makefile 2007-10-05 11:13:17.000000000 +0200 +--- net-2.6.25.orig/net/can/Makefile 2007-11-14 13:04:51.000000000 +0100 ++++ net-2.6.25/net/can/Makefile 2007-11-14 13:04:52.000000000 +0100 @@ -7,3 +7,6 @@ obj-$(CONFIG_CAN_RAW) += can-raw.o @@ -118,10 +118,10 @@ Index: net-2.6.24/net/can/Makefile + +obj-$(CONFIG_CAN_BCM) += can-bcm.o +can-bcm-objs := bcm.o -Index: net-2.6.24/net/can/bcm.c +Index: net-2.6.25/net/can/bcm.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ net-2.6.24/net/can/bcm.c 2007-10-05 11:13:17.000000000 +0200 ++++ net-2.6.25/net/can/bcm.c 2007-11-14 13:04:52.000000000 +0100 @@ -0,0 +1,1763 @@ +/* + * bcm.c - Broadcast Manager to filter/send (cyclic) CAN content diff --git a/patch-series/net-2.6.24/05-can-vcan-driver.diff b/patch-series/net-2.6.25/05-can-vcan-driver.diff similarity index 92% rename from patch-series/net-2.6.24/05-can-vcan-driver.diff rename to patch-series/net-2.6.25/05-can-vcan-driver.diff index 02ac10b..56010f8 100644 --- a/patch-series/net-2.6.24/05-can-vcan-driver.diff +++ b/patch-series/net-2.6.25/05-can-vcan-driver.diff @@ -16,10 +16,10 @@ Signed-off-by: Urs Thuermann net/can/Kconfig | 3 5 files changed, 241 insertions(+) -Index: net-2.6.24/drivers/net/Makefile +Index: net-2.6.25/drivers/net/Makefile =================================================================== ---- net-2.6.24.orig/drivers/net/Makefile 2007-10-05 11:08:03.000000000 +0200 -+++ net-2.6.24/drivers/net/Makefile 2007-10-05 11:17:41.000000000 +0200 +--- net-2.6.25.orig/drivers/net/Makefile 2007-11-14 13:04:24.000000000 +0100 ++++ net-2.6.25/drivers/net/Makefile 2007-11-14 13:04:54.000000000 +0100 @@ -12,6 +12,7 @@ obj-$(CONFIG_CHELSIO_T1) += chelsio/ obj-$(CONFIG_CHELSIO_T3) += cxgb3/ @@ -28,10 +28,10 @@ Index: net-2.6.24/drivers/net/Makefile obj-$(CONFIG_BONDING) += bonding/ obj-$(CONFIG_ATL1) += atl1/ obj-$(CONFIG_GIANFAR) += gianfar_driver.o -Index: net-2.6.24/drivers/net/can/Kconfig +Index: net-2.6.25/drivers/net/can/Kconfig =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ net-2.6.24/drivers/net/can/Kconfig 2007-10-05 11:17:41.000000000 +0200 ++++ net-2.6.25/drivers/net/can/Kconfig 2007-11-14 13:04:54.000000000 +0100 @@ -0,0 +1,25 @@ +menu "CAN Device Drivers" + depends on CAN @@ -58,20 +58,20 @@ Index: net-2.6.24/drivers/net/can/Kconfig + on. + +endmenu -Index: net-2.6.24/drivers/net/can/Makefile +Index: net-2.6.25/drivers/net/can/Makefile =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ net-2.6.24/drivers/net/can/Makefile 2007-10-05 11:17:41.000000000 +0200 ++++ net-2.6.25/drivers/net/can/Makefile 2007-11-14 13:04:54.000000000 +0100 @@ -0,0 +1,5 @@ +# +# Makefile for the Linux Controller Area Network drivers. +# + +obj-$(CONFIG_CAN_VCAN) += vcan.o -Index: net-2.6.24/drivers/net/can/vcan.c +Index: net-2.6.25/drivers/net/can/vcan.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ net-2.6.24/drivers/net/can/vcan.c 2007-10-05 11:17:41.000000000 +0200 ++++ net-2.6.25/drivers/net/can/vcan.c 2007-11-14 13:04:54.000000000 +0100 @@ -0,0 +1,207 @@ +/* + * vcan.c - Virtual CAN interface @@ -280,10 +280,10 @@ Index: net-2.6.24/drivers/net/can/vcan.c + +module_init(vcan_init_module); +module_exit(vcan_cleanup_module); -Index: net-2.6.24/net/can/Kconfig +Index: net-2.6.25/net/can/Kconfig =================================================================== ---- net-2.6.24.orig/net/can/Kconfig 2007-10-05 11:17:28.000000000 +0200 -+++ net-2.6.24/net/can/Kconfig 2007-10-05 11:18:19.000000000 +0200 +--- net-2.6.25.orig/net/can/Kconfig 2007-11-14 13:04:52.000000000 +0100 ++++ net-2.6.25/net/can/Kconfig 2007-11-14 13:04:54.000000000 +0100 @@ -47,3 +47,6 @@ Say Y here if you want the CAN core to produce a bunch of debug messages. Select this if you are having a problem with CAN diff --git a/patch-series/net-2.6.24/06-can-maintainers.diff b/patch-series/net-2.6.25/06-can-maintainers.diff similarity index 78% rename from patch-series/net-2.6.24/06-can-maintainers.diff rename to patch-series/net-2.6.25/06-can-maintainers.diff index 88f343f..b49a0a3 100644 --- a/patch-series/net-2.6.24/06-can-maintainers.diff +++ b/patch-series/net-2.6.25/06-can-maintainers.diff @@ -11,11 +11,11 @@ Signed-off-by: Urs Thuermann MAINTAINERS | 9 +++++++++ 2 files changed, 25 insertions(+) -Index: net-2.6.24/CREDITS +Index: net-2.6.25/CREDITS =================================================================== ---- net-2.6.24.orig/CREDITS 2007-09-20 06:37:28.000000000 +0200 -+++ net-2.6.24/CREDITS 2007-10-02 12:03:43.000000000 +0200 -@@ -1347,6 +1347,14 @@ +--- net-2.6.25.orig/CREDITS 2007-11-14 13:04:23.000000000 +0100 ++++ net-2.6.25/CREDITS 2007-11-14 13:04:55.000000000 +0100 +@@ -1353,6 +1353,14 @@ S: 5623 HZ Eindhoven S: The Netherlands @@ -30,7 +30,7 @@ Index: net-2.6.24/CREDITS N: Andrew Haylett E: ajh@primag.co.uk D: Selection mechanism -@@ -3300,6 +3308,14 @@ +@@ -3306,6 +3314,14 @@ S: F-35042 Rennes Cedex S: France @@ -45,11 +45,11 @@ Index: net-2.6.24/CREDITS N: Jon Tombs E: jon@gte.esi.us.es W: http://www.esi.us.es/~jon -Index: net-2.6.24/MAINTAINERS +Index: net-2.6.25/MAINTAINERS =================================================================== ---- net-2.6.24.orig/MAINTAINERS 2007-09-28 18:01:52.000000000 +0200 -+++ net-2.6.24/MAINTAINERS 2007-10-02 12:03:43.000000000 +0200 -@@ -991,6 +991,15 @@ +--- net-2.6.25.orig/MAINTAINERS 2007-11-14 13:04:23.000000000 +0100 ++++ net-2.6.25/MAINTAINERS 2007-11-14 13:04:56.000000000 +0100 +@@ -981,6 +981,15 @@ L: video4linux-list@redhat.com S: Maintained diff --git a/patch-series/net-2.6.24/07-can-doc.diff b/patch-series/net-2.6.25/07-can-doc.diff similarity index 98% rename from patch-series/net-2.6.24/07-can-doc.diff rename to patch-series/net-2.6.25/07-can-doc.diff index 1dc53b8..f40e2c7 100644 --- a/patch-series/net-2.6.24/07-can-doc.diff +++ b/patch-series/net-2.6.25/07-can-doc.diff @@ -11,10 +11,10 @@ Signed-off-by: Urs Thuermann Documentation/networking/can.txt | 637 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 639 insertions(+) -Index: net-2.6.24/Documentation/networking/can.txt +Index: net-2.6.25/Documentation/networking/can.txt =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ net-2.6.24/Documentation/networking/can.txt 2007-10-02 08:43:50.000000000 +0200 ++++ net-2.6.25/Documentation/networking/can.txt 2007-11-14 13:04:57.000000000 +0100 @@ -0,0 +1,637 @@ +============================================================================ + @@ -653,16 +653,16 @@ Index: net-2.6.24/Documentation/networking/can.txt + Klaus Hitschler (PEAK driver integration) + Uwe Koppe (CAN netdevices with PF_PACKET approach) + Michael Schulze (driver layer loopback requirement, RT CAN drivers review) -Index: net-2.6.24/Documentation/networking/00-INDEX +Index: net-2.6.25/Documentation/networking/00-INDEX =================================================================== ---- net-2.6.24.orig/Documentation/networking/00-INDEX 2007-09-25 15:28:50.000000000 +0200 -+++ net-2.6.24/Documentation/networking/00-INDEX 2007-10-02 08:43:21.000000000 +0200 -@@ -26,6 +26,8 @@ +--- net-2.6.25.orig/Documentation/networking/00-INDEX 2007-11-14 13:04:23.000000000 +0100 ++++ net-2.6.25/Documentation/networking/00-INDEX 2007-11-14 13:04:57.000000000 +0100 +@@ -24,6 +24,8 @@ - info on the driver for Baycom style amateur radio modems bridge.txt - where to get user space programs for ethernet bridging with Linux. +can.txt + - documentation on CAN protocol family. - comx.txt - - info on drivers for COMX line of synchronous serial adapters. cops.txt + - info on the COPS LocalTalk Linux driver + cs89x0.txt diff --git a/patch-series/net-2.6.24/intro b/patch-series/net-2.6.25/intro similarity index 88% rename from patch-series/net-2.6.24/intro rename to patch-series/net-2.6.25/intro index f4350b5..23da127 100644 --- a/patch-series/net-2.6.24/intro +++ b/patch-series/net-2.6.25/intro @@ -1,13 +1,33 @@ SUBJECT -CAN: Add new PF_CAN protocol family, try #10 +CAN: New PF_CAN protocol family for 2.6.25 ESUBJECT Hello Dave, hello Patrick, -this is the tenth post of the patch series that adds the PF_CAN -protocol family for the Controller Area Network. +this patch series that adds the PF_CAN protocol family for the +Controller Area Network. Since our last post we have changed: -We've fixed some cosmetic issues as remarked by Arnaldo: +* Fix a bug causing NULL pointer dereference when module autoloading fails. +* Initialize skb using skb_reset_{transport,network}_header(). +* Use sock_alloc_send_skb() instead of alloc_skb(). +* Adapt to changes in sk_alloc() parameter list. +* Rename some local variables for readability. + +This patch series applies against net-2.6.25 and is derived from Subversion +revision r542 of http://svn.berlios.de/svnroot/repos/socketcan. +It can be found in the directory +http://svn.berlios.de/svnroot/repos/socketcan/trunk/patch-series/. + +Thanks very much for your work! + +Best regards, + +Urs Thuermann +Oliver Hartkopp + + + +The changes in try #10 were: * Rename our static debug variables to {can,raw,bcm,vcan}_debug. * Use module_param_named() so that the module option names remain. @@ -15,13 +35,6 @@ We've fixed some cosmetic issues as remarked by Arnaldo: * Cleanup of can_addr union in sockaddr_can. * Change type of echo module parameter to boolean. -Thanks to all reviewers for the constructive feedback! - -Regards, -urs - - - The changes in try #9 were: * Changes suggested by Arnaldo Carvalho de Melo: @@ -121,16 +134,3 @@ The changes in try #2 were: * added entry for can.txt in Documentation/networking/00-INDEX * added error frame definitions in include/linux/can/error.h, which are to be used by CAN network drivers. - - -This patch series applies against net-2.6.24 and is derived from Subversion -revision r522 of http://svn.berlios.de/svnroot/repos/socketcan. -It can be found in the directory -http://svn.berlios.de/svnroot/repos/socketcan/trunk/patch-series/. - -Thanks very much for your work! - -Best regards, - -Urs Thuermann -Oliver Hartkopp diff --git a/patch-series/net-2.6.24/series b/patch-series/net-2.6.25/series similarity index 100% rename from patch-series/net-2.6.24/series rename to patch-series/net-2.6.25/series -- 2.39.2