Commit 2ad119d9 authored by Jakub Kicinski's avatar Jakub Kicinski

Merge tag 'linux-can-next-for-5.10-20201012' of...

Merge tag 'linux-can-next-for-5.10-20201012' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next

Marc Kleine-Budde says:

====================
linux-can-next-for-5.10-20201012

Both patches are by Oliver Hartkopp, the first one addresses Jakub's review
comments of the ISOTP protocol, the other one removes version strings from
various CAN protocols.
====================
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 15f5e48f f726f3d3
...@@ -18,13 +18,6 @@ ...@@ -18,13 +18,6 @@
#include <linux/skbuff.h> #include <linux/skbuff.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
#define CAN_VERSION "20170425"
/* increment this number each time you change some user-space interface */
#define CAN_ABI_VERSION "9"
#define CAN_VERSION_STRING "rev " CAN_VERSION " abi " CAN_ABI_VERSION
#define DNAME(dev) ((dev) ? (dev)->name : "any") #define DNAME(dev) ((dev) ? (dev)->name : "any")
/** /**
......
...@@ -15,7 +15,6 @@ struct can_rcv_lists_stats; ...@@ -15,7 +15,6 @@ struct can_rcv_lists_stats;
struct netns_can { struct netns_can {
#if IS_ENABLED(CONFIG_PROC_FS) #if IS_ENABLED(CONFIG_PROC_FS)
struct proc_dir_entry *proc_dir; struct proc_dir_entry *proc_dir;
struct proc_dir_entry *pde_version;
struct proc_dir_entry *pde_stats; struct proc_dir_entry *pde_stats;
struct proc_dir_entry *pde_reset_stats; struct proc_dir_entry *pde_reset_stats;
struct proc_dir_entry *pde_rcvlist_all; struct proc_dir_entry *pde_rcvlist_all;
......
...@@ -160,7 +160,6 @@ struct can_isotp_ll_options { ...@@ -160,7 +160,6 @@ struct can_isotp_ll_options {
* these default settings can be changed via sockopts. * these default settings can be changed via sockopts.
* For that reason the STmin value is intentionally _not_ checked for * For that reason the STmin value is intentionally _not_ checked for
* consistency and copied directly into the flow control (FC) frame. * consistency and copied directly into the flow control (FC) frame.
*
*/ */
#endif /* !_UAPI_CAN_ISOTP_H */ #endif /* !_UAPI_CAN_ISOTP_H */
...@@ -57,7 +57,6 @@ source "net/can/j1939/Kconfig" ...@@ -57,7 +57,6 @@ source "net/can/j1939/Kconfig"
config CAN_ISOTP config CAN_ISOTP
tristate "ISO 15765-2:2016 CAN transport protocol" tristate "ISO 15765-2:2016 CAN transport protocol"
default y
help help
CAN Transport Protocols offer support for segmented Point-to-Point CAN Transport Protocols offer support for segmented Point-to-Point
communication between CAN nodes via two defined CAN Identifiers. communication between CAN nodes via two defined CAN Identifiers.
...@@ -67,6 +66,8 @@ config CAN_ISOTP ...@@ -67,6 +66,8 @@ config CAN_ISOTP
vehicle diagnosis (UDS, ISO 14229) or IP-over-CAN traffic. vehicle diagnosis (UDS, ISO 14229) or IP-over-CAN traffic.
This protocol driver implements data transfers according to This protocol driver implements data transfers according to
ISO 15765-2:2016 for 'classic' CAN and CAN FD frame types. ISO 15765-2:2016 for 'classic' CAN and CAN FD frame types.
If you want to perform automotive vehicle diagnostic services (UDS),
say 'y'.
source "drivers/net/can/Kconfig" source "drivers/net/can/Kconfig"
......
...@@ -875,7 +875,7 @@ static __init int can_init(void) ...@@ -875,7 +875,7 @@ static __init int can_init(void)
offsetof(struct can_frame, data) != offsetof(struct can_frame, data) !=
offsetof(struct canfd_frame, data)); offsetof(struct canfd_frame, data));
pr_info("can: controller area network core (" CAN_VERSION_STRING ")\n"); pr_info("can: controller area network core\n");
rcv_cache = kmem_cache_create("can_receiver", sizeof(struct receiver), rcv_cache = kmem_cache_create("can_receiver", sizeof(struct receiver),
0, 0, NULL); 0, 0, NULL);
......
...@@ -81,8 +81,6 @@ ...@@ -81,8 +81,6 @@
(CAN_EFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG) : \ (CAN_EFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG) : \
(CAN_SFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG)) (CAN_SFF_MASK | CAN_EFF_FLAG | CAN_RTR_FLAG))
#define CAN_BCM_VERSION "20170425"
MODULE_DESCRIPTION("PF_CAN broadcast manager protocol"); MODULE_DESCRIPTION("PF_CAN broadcast manager protocol");
MODULE_LICENSE("Dual BSD/GPL"); MODULE_LICENSE("Dual BSD/GPL");
MODULE_AUTHOR("Oliver Hartkopp <oliver.hartkopp@volkswagen.de>"); MODULE_AUTHOR("Oliver Hartkopp <oliver.hartkopp@volkswagen.de>");
...@@ -1696,7 +1694,7 @@ static int __init bcm_module_init(void) ...@@ -1696,7 +1694,7 @@ static int __init bcm_module_init(void)
{ {
int err; int err;
pr_info("can: broadcast manager protocol (rev " CAN_BCM_VERSION " t)\n"); pr_info("can: broadcast manager protocol\n");
err = can_proto_register(&bcm_can_proto); err = can_proto_register(&bcm_can_proto);
if (err < 0) { if (err < 0) {
......
...@@ -59,7 +59,6 @@ ...@@ -59,7 +59,6 @@
#include <net/net_namespace.h> #include <net/net_namespace.h>
#include <net/sock.h> #include <net/sock.h>
#define CAN_GW_VERSION "20190810"
#define CAN_GW_NAME "can-gw" #define CAN_GW_NAME "can-gw"
MODULE_DESCRIPTION("PF_CAN netlink gateway"); MODULE_DESCRIPTION("PF_CAN netlink gateway");
...@@ -1194,8 +1193,7 @@ static __init int cgw_module_init(void) ...@@ -1194,8 +1193,7 @@ static __init int cgw_module_init(void)
/* sanitize given module parameter */ /* sanitize given module parameter */
max_hops = clamp_t(unsigned int, max_hops, CGW_MIN_HOPS, CGW_MAX_HOPS); max_hops = clamp_t(unsigned int, max_hops, CGW_MIN_HOPS, CGW_MAX_HOPS);
pr_info("can: netlink gateway (rev " CAN_GW_VERSION ") max_hops=%d\n", pr_info("can: netlink gateway - max_hops=%d\n", max_hops);
max_hops);
ret = register_pernet_subsys(&cangw_pernet_ops); ret = register_pernet_subsys(&cangw_pernet_ops);
if (ret) if (ret)
......
...@@ -72,8 +72,6 @@ ...@@ -72,8 +72,6 @@
#include <net/sock.h> #include <net/sock.h>
#include <net/net_namespace.h> #include <net/net_namespace.h>
#define CAN_ISOTP_VERSION "20200928"
MODULE_DESCRIPTION("PF_CAN isotp 15765-2:2016 protocol"); MODULE_DESCRIPTION("PF_CAN isotp 15765-2:2016 protocol");
MODULE_LICENSE("Dual BSD/GPL"); MODULE_LICENSE("Dual BSD/GPL");
MODULE_AUTHOR("Oliver Hartkopp <socketcan@hartkopp.net>"); MODULE_AUTHOR("Oliver Hartkopp <socketcan@hartkopp.net>");
...@@ -222,8 +220,8 @@ static int isotp_send_fc(struct sock *sk, int ae, u8 flowstatus) ...@@ -222,8 +220,8 @@ static int isotp_send_fc(struct sock *sk, int ae, u8 flowstatus)
can_send_ret = can_send(nskb, 1); can_send_ret = can_send(nskb, 1);
if (can_send_ret) if (can_send_ret)
printk_once(KERN_NOTICE "can-isotp: %s: can_send_ret %d\n", pr_notice_once("can-isotp: %s: can_send_ret %d\n",
__func__, can_send_ret); __func__, can_send_ret);
dev_put(dev); dev_put(dev);
...@@ -769,7 +767,7 @@ static enum hrtimer_restart isotp_tx_timer_handler(struct hrtimer *hrtimer) ...@@ -769,7 +767,7 @@ static enum hrtimer_restart isotp_tx_timer_handler(struct hrtimer *hrtimer)
isotp_tx_burst: isotp_tx_burst:
skb = alloc_skb(so->ll.mtu + sizeof(struct can_skb_priv), skb = alloc_skb(so->ll.mtu + sizeof(struct can_skb_priv),
gfp_any()); GFP_ATOMIC);
if (!skb) { if (!skb) {
dev_put(dev); dev_put(dev);
break; break;
...@@ -798,8 +796,8 @@ static enum hrtimer_restart isotp_tx_timer_handler(struct hrtimer *hrtimer) ...@@ -798,8 +796,8 @@ static enum hrtimer_restart isotp_tx_timer_handler(struct hrtimer *hrtimer)
can_send_ret = can_send(skb, 1); can_send_ret = can_send(skb, 1);
if (can_send_ret) if (can_send_ret)
printk_once(KERN_NOTICE "can-isotp: %s: can_send_ret %d\n", pr_notice_once("can-isotp: %s: can_send_ret %d\n",
__func__, can_send_ret); __func__, can_send_ret);
if (so->tx.idx >= so->tx.len) { if (so->tx.idx >= so->tx.len) {
/* we are done */ /* we are done */
...@@ -942,8 +940,8 @@ static int isotp_sendmsg(struct socket *sock, struct msghdr *msg, size_t size) ...@@ -942,8 +940,8 @@ static int isotp_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
err = can_send(skb, 1); err = can_send(skb, 1);
dev_put(dev); dev_put(dev);
if (err) { if (err) {
printk_once(KERN_NOTICE "can-isotp: %s: can_send_ret %d\n", pr_notice_once("can-isotp: %s: can_send_ret %d\n",
__func__, err); __func__, err);
return err; return err;
} }
...@@ -1408,7 +1406,7 @@ static __init int isotp_module_init(void) ...@@ -1408,7 +1406,7 @@ static __init int isotp_module_init(void)
{ {
int err; int err;
pr_info("can: isotp protocol (rev " CAN_ISOTP_VERSION ")\n"); pr_info("can: isotp protocol\n");
err = can_proto_register(&isotp_can_proto); err = can_proto_register(&isotp_can_proto);
if (err < 0) if (err < 0)
......
...@@ -54,7 +54,6 @@ ...@@ -54,7 +54,6 @@
* proc filenames for the PF_CAN core * proc filenames for the PF_CAN core
*/ */
#define CAN_PROC_VERSION "version"
#define CAN_PROC_STATS "stats" #define CAN_PROC_STATS "stats"
#define CAN_PROC_RESET_STATS "reset_stats" #define CAN_PROC_RESET_STATS "reset_stats"
#define CAN_PROC_RCVLIST_ALL "rcvlist_all" #define CAN_PROC_RCVLIST_ALL "rcvlist_all"
...@@ -293,12 +292,6 @@ static int can_reset_stats_proc_show(struct seq_file *m, void *v) ...@@ -293,12 +292,6 @@ static int can_reset_stats_proc_show(struct seq_file *m, void *v)
return 0; return 0;
} }
static int can_version_proc_show(struct seq_file *m, void *v)
{
seq_printf(m, "%s\n", CAN_VERSION_STRING);
return 0;
}
static inline void can_rcvlist_proc_show_one(struct seq_file *m, int idx, static inline void can_rcvlist_proc_show_one(struct seq_file *m, int idx,
struct net_device *dev, struct net_device *dev,
struct can_dev_rcv_lists *dev_rcv_lists) struct can_dev_rcv_lists *dev_rcv_lists)
...@@ -441,8 +434,6 @@ void can_init_proc(struct net *net) ...@@ -441,8 +434,6 @@ void can_init_proc(struct net *net)
} }
/* own procfs entries from the AF_CAN core */ /* own procfs entries from the AF_CAN core */
net->can.pde_version = proc_create_net_single(CAN_PROC_VERSION, 0644,
net->can.proc_dir, can_version_proc_show, NULL);
net->can.pde_stats = proc_create_net_single(CAN_PROC_STATS, 0644, net->can.pde_stats = proc_create_net_single(CAN_PROC_STATS, 0644,
net->can.proc_dir, can_stats_proc_show, NULL); net->can.proc_dir, can_stats_proc_show, NULL);
net->can.pde_reset_stats = proc_create_net_single(CAN_PROC_RESET_STATS, net->can.pde_reset_stats = proc_create_net_single(CAN_PROC_RESET_STATS,
...@@ -471,9 +462,6 @@ void can_init_proc(struct net *net) ...@@ -471,9 +462,6 @@ void can_init_proc(struct net *net)
*/ */
void can_remove_proc(struct net *net) void can_remove_proc(struct net *net)
{ {
if (net->can.pde_version)
remove_proc_entry(CAN_PROC_VERSION, net->can.proc_dir);
if (net->can.pde_stats) if (net->can.pde_stats)
remove_proc_entry(CAN_PROC_STATS, net->can.proc_dir); remove_proc_entry(CAN_PROC_STATS, net->can.proc_dir);
......
...@@ -55,8 +55,6 @@ ...@@ -55,8 +55,6 @@
#include <net/sock.h> #include <net/sock.h>
#include <net/net_namespace.h> #include <net/net_namespace.h>
#define CAN_RAW_VERSION CAN_VERSION
MODULE_DESCRIPTION("PF_CAN raw protocol"); MODULE_DESCRIPTION("PF_CAN raw protocol");
MODULE_LICENSE("Dual BSD/GPL"); MODULE_LICENSE("Dual BSD/GPL");
MODULE_AUTHOR("Urs Thuermann <urs.thuermann@volkswagen.de>"); MODULE_AUTHOR("Urs Thuermann <urs.thuermann@volkswagen.de>");
...@@ -885,7 +883,7 @@ static __init int raw_module_init(void) ...@@ -885,7 +883,7 @@ static __init int raw_module_init(void)
{ {
int err; int err;
pr_info("can: raw protocol (rev " CAN_RAW_VERSION ")\n"); pr_info("can: raw protocol\n");
err = can_proto_register(&raw_can_proto); err = can_proto_register(&raw_can_proto);
if (err < 0) if (err < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment