Skip to content

rhel: Re-add can-dev features that were removed accidentally

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2213891
Upstream Status: RHEL only

With the CAN bus subsystem upgrade to Linux 6.0 in MR !1584 (merged), a new
config option has been introduced, CONFIG_CAN_NETLINK, which controls
features of the can-dev module that were previously included by default.
The drivers/net/can/dev/Makefile is self-explanatory.

drivers/net/can/dev/Makefile before MR !1584 (merged):

obj-$(CONFIG_CAN_DEV) += can-dev.o
can-dev-y += bittiming.o
can-dev-y += dev.o
can-dev-y += length.o
can-dev-y += netlink.o
can-dev-y += rx-offload.o
can-dev-y += skb.o

drivers/net/can/dev/Makefile after MR !1584 (merged):

obj-$(CONFIG_CAN_DEV) += can-dev.o

can-dev-y += skb.o

can-dev-$(CONFIG_CAN_CALC_BITTIMING) += calc_bittiming.o
can-dev-$(CONFIG_CAN_NETLINK) += bittiming.o
can-dev-$(CONFIG_CAN_NETLINK) += dev.o
can-dev-$(CONFIG_CAN_NETLINK) += length.o
can-dev-$(CONFIG_CAN_NETLINK) += netlink.o
can-dev-$(CONFIG_CAN_RX_OFFLOAD) += rx-offload.o

The relevant RHEL kernel commits that introduced those changes are:
e6cee3aa ("can: Kconfig: rename config symbol CAN_DEV ...")
506aaeb4 ("can: Kconfig: turn menu "CAN Device Drivers" ...")

However, in 66b2bd05 ("rhel: Set initial defaults for CAN configs")
we set CONFIG_CAN_NETLINK to "n" in the generic config layer, and then
enabled it specifically for aarch64. This essentially removes all the
corresponding features from the can-dev module, which were previously
included by default, for all supported architectures other than aarch64.

A side effect is that it also shadows multiple CAN interface drivers,
which we explicitly enable in our generic configuration layer:
CONFIG_CAN_SLCAN=m
CONFIG_CAN_M_CAN_PCI=m
CONFIG_CAN_PEAK_PCIEFD=m
CONFIG_CAN_MCP251X=m
CONFIG_CAN_MCP251XFD=m
CONFIG_CAN_8DEV_USB=m
CONFIG_CAN_EMS_USB=m
CONFIG_CAN_KVASER_USB=m
CONFIG_CAN_PEAK_USB=m

Enable CONFIG_CAN_NETLINK in the generic config layer instead, to
restore feature parity with previous RHEL kernel versions, before
MR !1584 (merged) was introduced.

Fixes: 66b2bd05 ("rhel: Set initial defaults for CAN configs")
Signed-off-by: Radu Rendec rrendec@redhat.com

Merge request reports

Loading