- 20 11月, 2020 3 次提交
-
-
由 Oliver Hartkopp 提交于
The helper functions can_len2dlc and can_dlc2len are only relevant for CAN FD data length code (DLC) conversion. To fit the introduced can_cc_dlc2len for Classical CAN we rename: can_dlc2len -> can_fd_dlc2len to get the payload length from the DLC can_len2dlc -> can_fd_len2dlc to get the DLC from the payload length Suggested-by: NVincent Mailhol <mailhol.vincent@wanadoo.fr> Signed-off-by: NOliver Hartkopp <socketcan@hartkopp.net> Link: https://lore.kernel.org/r/20201110101852.1973-6-socketcan@hartkopp.netSigned-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Oliver Hartkopp 提交于
The naming of can_dlc as element of struct can_frame and also as variable name is misleading as it claims to be a 'data length CODE' but in reality it always was a plain data length. With the indroduction of a new 'len' element in struct can_frame we can now remove can_dlc as name and make clear which of the former uses was a plain length (-> 'len') or a data length code (-> 'dlc') value. Signed-off-by: NOliver Hartkopp <socketcan@hartkopp.net> Link: https://lore.kernel.org/r/20201120100444.3199-1-socketcan@hartkopp.net [mkl: gs_usb: keep struct gs_host_frame::can_dlc as is] Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Oliver Hartkopp 提交于
The get_can_dlc() macro is used to ensure the payload length information of the Classical CAN frame to be max 8 bytes (the CAN_MAX_DLEN). Rename the macro and use the correct constant in preparation of the len/dlc cleanup for Classical CAN frames. Signed-off-by: NOliver Hartkopp <socketcan@hartkopp.net> Link: https://lore.kernel.org/r/20201110101852.1973-3-socketcan@hartkopp.netSigned-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
- 18 11月, 2020 1 次提交
-
-
由 Jarkko Nikula 提交于
Avoid processing bogus interrupt statuses when the HW is runtime suspended and the M_CAN_IR register read may get all bits 1's. Handler can be called if the interrupt request is shared with other peripherals or at the end of free_irq(). Therefore check the runtime suspended status before processing. Fixes: cdf8259d ("can: m_can: Add PM Support") Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Link: https://lore.kernel.org/r/20200915134715.696303-1-jarkko.nikula@linux.intel.comSigned-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
- 16 11月, 2020 4 次提交
-
-
由 Faiz Abbas 提交于
There might be some requests pending in the buffer when the interface close sequence occurs. In some devices, these pending requests might lead to the module not shutting down properly when m_can_clk_stop() is called. Therefore, move the device to init state before potentially powering it down. Fixes: e0d1f481 ("can: m_can: add Bosch M_CAN controller support") Signed-off-by: NFaiz Abbas <faiz_abbas@ti.com> Acked-by: NDan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200825055442.16994-1-faiz_abbas@ti.comSigned-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Dan Murphy 提交于
Fix leaking netdev device from peripherial devices. The call to allocate the netdev device is made from and managed by the peripherial. Fixes: f524f829 ("can: m_can: Create a m_can platform framework") Reported-by: NMarc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: NDan Murphy <dmurphy@ti.com> Link: http://lore.kernel.org/r/20200227183829.21854-2-dmurphy@ti.comSigned-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Dan Murphy 提交于
This patch creates a common function that peripherials can call to free the netdev device when failures occur. Fixes: f524f829 ("can: m_can: Create a m_can platform framework") Reported-by: NMarc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: NDan Murphy <dmurphy@ti.com> Link: http://lore.kernel.org/r/20200227183829.21854-2-dmurphy@ti.comSigned-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Wu Bo 提交于
m_can_handle_state_change() is called with the new_state as an argument. In the switch statements for CAN_STATE_ERROR_ACTIVE, the comment and the following code indicate that a CAN_STATE_ERROR_WARNING is handled. This patch fixes this problem by changing the case to CAN_STATE_ERROR_WARNING. Signed-off-by: NWu Bo <wubo.oduw@gmail.com> Link: http://lore.kernel.org/r/20200129022330.21248-2-wubo.oduw@gmail.com Cc: Dan Murphy <dmurphy@ti.com> Fixes: e0d1f481 ("can: m_can: add Bosch M_CAN controller support") Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
- 12 11月, 2019 2 次提交
-
-
由 Pankaj Sharma 提交于
The Bosch MCAN hardware (3.1.0 and above) supports interrupt flag to detect Protocol error in arbitration phase. Transmit error statistics is currently not updated from the MCAN driver. Protocol error in arbitration phase is a TX error and the network statistics should be updated accordingly. The member "tx_error" of "struct net_device_stats" should be incremented as arbitration is a transmit protocol error. Also "arbitration_lost" of "struct can_device_stats" should be incremented to report arbitration lost. Signed-off-by: NPankaj Sharma <pankj.sharma@samsung.com> Signed-off-by: NSriram Dash <sriram.dash@samsung.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Pankaj Sharma 提交于
According to the CAN Specification (see ISO 11898-1:2015, 8.3.4 Recovery Management), the M_CAN provides means for automatic retransmission of frames that have lost arbitration or that have been disturbed by errors during transmission. By default automatic retransmission is enabled. The Bosch MCAN controller has support for disabling automatic retransmission. To support time-triggered communication as described in ISO 11898-1:2015, chapter 9.2, the automatic retransmission may be disabled via CCCR.DAR. CAN_CTRLMODE_ONE_SHOT is used for disabling automatic retransmission. Signed-off-by: NPankaj Sharma <pankj.sharma@samsung.com> Signed-off-by: NSriram Dash <sriram.dash@samsung.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
- 24 7月, 2019 3 次提交
-
-
由 Dan Murphy 提交于
Rename the common m_can_priv class structure to m_can_classdev as this is more descriptive. Acked-by: NWolfgang Grandegger <wg@grandegger.com> Signed-off-by: NDan Murphy <dmurphy@ti.com> Acked-by: NFaiz Abbas <faiz_abbas@ti.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Dan Murphy 提交于
Create a m_can platform framework that peripheral devices can register to and use common code and register sets. The peripheral devices may provide read/write and configuration support of the IP. Acked-by: NWolfgang Grandegger <wg@grandegger.com> Signed-off-by: NDan Murphy <dmurphy@ti.com> Acked-by: NFaiz Abbas <faiz_abbas@ti.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Dan Murphy 提交于
Fix checkpatch issues found during the m_can framework creation, before framework creation in the following patches. Fix these 4 check issues: CHECK: Unnecessary parentheses around 'cdev->can.state != CAN_STATE_ERROR_WARNING' if (psr & PSR_EW && (cdev->can.state != CAN_STATE_ERROR_WARNING)) { CHECK: Unnecessary parentheses around 'cdev->can.state != CAN_STATE_ERROR_PASSIVE' if ((psr & PSR_EP) && (cdev->can.state != CAN_STATE_ERROR_PASSIVE)) { CHECK: Unnecessary parentheses around 'cdev->can.state != CAN_STATE_BUS_OFF' if ((psr & PSR_BO) && (cdev->can.state != CAN_STATE_BUS_OFF)) { CHECK: Unnecessary parentheses around 'priv->version <= 31' if ((priv->version <= 31) && (irqstatus & IR_MRAF) && (m_can_read(priv, M_CAN_ECR) & ECR_RP)) { Signed-off-by: NDan Murphy <dmurphy@ti.com> Acked-by: NFaiz Abbas <faiz_abbas@ti.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
- 08 6月, 2019 1 次提交
-
-
由 Eugen Hristev 提交于
During frame reception while the MCAN is in Error Passive state and the Receive Error Counter has thevalue MCAN_ECR.REC = 127, it may happen that MCAN_IR.MRAF is set although there was no Message RAM access failure. If MCAN_IR.MRAF is enabled, an interrupt to the Host CPU is generated. Work around: The Message RAM Access Failure interrupt routine needs to check whether MCAN_ECR.RP = '1' and MCAN_ECR.REC = '127'. In this case, reset MCAN_IR.MRAF. No further action is required. This affects versions older than 3.2.0 Errata explained on Sama5d2 SoC which includes this hardware block: http://ww1.microchip.com/downloads/en/DeviceDoc/SAMA5D2-Family-Silicon-Errata-and-Data-Sheet-Clarification-DS80000803B.pdf chapter 6.2 Reproducibility: If 2 devices with m_can are connected back to back, configuring different bitrate on them will lead to interrupt storm on the receiving side, with error "Message RAM access failure occurred". Another way is to have a bad hardware connection. Bad wire connection can lead to this issue as well. This patch fixes the issue according to provided workaround. Signed-off-by: NEugen Hristev <eugen.hristev@microchip.com> Reviewed-by: NLudovic Desroches <ludovic.desroches@microchip.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
- 23 7月, 2018 3 次提交
-
-
由 Faiz Abbas 提交于
MCAN message ram should only be accessed once clocks are enabled. Therefore, move the call to parse/init the message ram to after clocks are enabled. Signed-off-by: NFaiz Abbas <faiz_abbas@ti.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Faiz Abbas 提交于
pm_runtime_get_sync() returns a 1 if the state of the device is already 'active'. This is not a failure case and should return a success. Therefore fix error handling for pm_runtime_get_sync() call such that it returns success when the value is 1. Also cleanup the TODO for using runtime PM for sleep mode as that is implemented. Signed-off-by: NFaiz Abbas <faiz_abbas@ti.com> Cc: <stable@vger.kernel.org Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Roman Fietze 提交于
Inside m_can_chip_config(), when setting up the new value of the CCCR, the CCCR_NISO bit is not cleared like the others, CCCR_TEST, CCCR_MON, CCCR_BRSE and CCCR_FDOE, before checking the can.ctrlmode bits for CAN_CTRLMODE_FD_NON_ISO. This way once the controller was configured for CAN_CTRLMODE_FD_NON_ISO, this mode could never be cleared again. This fix is only relevant for controllers with version 3.1.x or 3.2.x. Older versions do not support NISO. Signed-off-by: NRoman Fietze <roman.fietze@telemotive.de> Cc: linux-stable <stable@vger.kernel.org> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
- 12 3月, 2018 2 次提交
-
-
由 Bich HEMON 提交于
Make sure to apply the correct pin state in suspend/resume callbacks. Putting pins in sleep state saves power. Signed-off-by: NBich Hemon <bich.hemon@st.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Wolfram Sang 提交于
Due to a typo, the mask was destroyed by a comparison instead of a bit shift. Reported-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
- 19 1月, 2018 1 次提交
-
-
由 Arnd Bergmann 提交于
Building without CONFIG_PM results in a harmless warning: drivers/net/can/m_can/m_can.c:1763:12: error: 'm_can_runtime_resume' defined but not used [-Werror=unused-function] drivers/net/can/m_can/m_can.c:1752:12: error: 'm_can_runtime_suspend' defined but not used [-Werror=unused-function] Marking the functions as __maybe_unused lets the compiler silently drop them instead. Fixes: cdf8259d ("can: m_can: Add PM Support") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
- 16 1月, 2018 6 次提交
-
-
由 Franklin S Cooper Jr 提交于
Add call to new generic functions that provides support via a binding to limit the arbitration rate and/or data rate imposed by the physical transceiver connected to the MCAN peripheral. Signed-off-by: NFranklin S Cooper Jr <fcooper@ti.com> Signed-off-by: NSekhar Nori <nsekhar@ti.com> Signed-off-by: NFaiz Abbas <faiz_abbas@ti.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Faiz Abbas 提交于
Add support for CONFIG_PM which is the new way to handle managing clocks. Move the clock management to pm_runtime_resume() and pm_runtime_suspend() callbacks for the driver. CONFIG_PM is required by OMAP based devices to handle clock management. Therefore, this allows future Texas Instruments SoCs that have the MCAN IP to work with this driver. Signed-off-by: NFaiz Abbas <faiz_abbas@ti.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Marc Kleine-Budde 提交于
As the previous patch removed alloc_m_can_dev(), let's get rid of the corresponding free_m_can_dev() and call free_candev() directly. Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Faiz Abbas 提交于
With the version no longer required to allocate the net device, it can be moved to probe and the alloc_m_can_dev() function can be simplified. Therefore, move the allocation of net device to probe and change alloc_m_can_dev() to setup_m_can_dev(). Signed-off-by: NFaiz Abbas <faiz_abbas@ti.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Faiz Abbas 提交于
Currently the m_can version is used to set the tx_fifo_count to 1 when allocating the net device. However, this is redundant as a value of 1 for the tx_fifo_count needs to be provided in the bosch,mram-cfg property of the device tree node anyway. Therefore, remove check for version when allocating the net device. Signed-off-by: NFaiz Abbas <faiz_abbas@ti.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Franklin S Cooper Jr 提交于
During test transmitting using CAN-FD at high bitrates (> 2 Mbps) would fail. Scoping the signals I noticed that only a single bit was being transmitted and with a bit more investigation realized the actual MCAN IP would go back to initialization mode automatically. It appears this issue is due to the MCAN needing to use the Transmitter Delay Compensation Mode with the correct value for the transmitter delay compensation offset (tdco). What impacts the tdco value isn't 100% clear but to calculate it you use an equation defined in the MCAN User's Guide. The user guide mentions that this register needs to be set based on clock values, secondary sample point and the data bitrate. One of the key variables that can't automatically be determined is the secondary sample point (ssp). This ssp is similar to the sp but is specific to this transmitter delay compensation mode. The guidelines for configuring ssp is rather vague but via some CAN test it appears for DRA76x that putting the value same as data sampling point works. The CAN-CIA's "Bit Time Requirements for CAN FD" paper presented at the International CAN Conference 2013 indicates that this TDC mode is only needed for data bit rates above 2.5 Mbps. Therefore, only enable this mode when the data bit rate is above 2.5 Mbps. Signed-off-by: NFranklin S Cooper Jr <fcooper@ti.com> Signed-off-by: NSekhar Nori <nsekhar@ti.com> Signed-off-by: NFaiz Abbas <faiz_abbas@ti.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
- 18 5月, 2017 4 次提交
-
-
由 Quentin Schulz 提交于
This adds Power Management deep Suspend/Resume support for Bosch M_CAN chip. When entering deep sleep, the clocks are gated, the interrupts are disabled. When resuming from deep sleep, the chip needs to be reinitialized, the clocks ungated and the interrupts enabled. Signed-off-by: NQuentin Schulz <quentin.schulz@free-electrons.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Quentin Schulz 提交于
This creates a function to ungate M_CAN clocks and another to gate the same clocks, then swaps all gating/ungating code with their respective function. Signed-off-by: NQuentin Schulz <quentin.schulz@free-electrons.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Quentin Schulz 提交于
This moves clocks gating outside of the m_can_stop function as the m_can_start function does not (and cannot, at least in current implementation) ungate clocks. This way, both functions can now be used symmetrically. Signed-off-by: NQuentin Schulz <quentin.schulz@free-electrons.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Quentin Schulz 提交于
To avoid possible ECC/parity checksum errors when reading an uninitialized buffer, the entire Message RAM is initialized when probing the driver. This initialization is done in the same function reading the Device Tree properties. This patch moves the RAM initialization to a separate function so it can be called separately from device initialization from Device Tree. Signed-off-by: NQuentin Schulz <quentin.schulz@free-electrons.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
- 25 4月, 2017 7 次提交
-
-
由 Mario Huettel 提交于
* Added defines for TX Event FIFO Element * Adapted ndo_start_xmit function. For versions >= v3.1.x it uses the TX FIFO to optimize the data throughput. It stores the echo skb at the same index as in the M_CAN's TX FIFO. The frame's message marker is set to this index. This message marker is received in the TX Event FIFO after the message was successfully transmitted. It is used to echo the correct echo skb back to the network stack. * Added m_can_echo_tx_event function. It reads all received message markers in the TX Event FIFO and loops back the corresponding echo skbs. * ISR checks for new TX Event Entry interrupt for version >= 3.1.x. Signed-off-by: NMario Huettel <mario.huettel@gmx.net> Reviewed-by: NOliver Hartkopp <socketcan@hartkopp.net> Tested-by: NQuentin Schulz <quentin.schulz@free-electrons.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Mario Huettel 提交于
* TX/TX Event FIFO sizes are configured for version >= v3.1.x Signed-off-by: NMario Huettel <mario.huettel@gmx.net> Tested-by: NQuentin Schulz <quentin.schulz@free-electrons.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Mario Huettel 提交于
This patch adapts the initialization of the M_CAN. So it can be used with all versions >= 3.0.x. Changes: * Added version element to m_can_priv structure to hold M_CAN version. * Renamed bittiming structs for version 3.0.x * Added new bittiming structs for version >= 3.1.x * Function alloc_m_can_dev takes 2 new arguments. The TX FIFO size and the base address of the module. * Chip configuration for CAN_CTRLMODE_LOOPBACK is changed: Enabled CCCR_MON bit. In combination with TEST_LBCK it activates the internal loopback mode. Leaving CCCR_MON '0' results in external loopback mode. * Clocks are temporarily enabled by platform_propbe function in order to allow read access to the Core Release register and the Control Register. Registers are used to detect M_CAN version and optional Non-ISO Feature. Initialization of M_CAN for version >= 3.1.x: * TX FIFO of M_CAN is used to transmit frames. The driver does not need to stop the tx queue after each frame sent. * Initialization of TX Event FIFO is added. * NON-ISO is fixed for all M_CAN versions < 3.2.x. Version 3.2.x _can_ have the NISO (Non-ISO) bit which can switch the mode of the M_CAN to Non-ISO mode. This bit does not have to be writeable. Therefore it is checked. If it is writable Non-ISO support is added to the controllers supported CAN modes. New Functions: * Function to check the Core Release version. The read value determines the behaviour of the driver. * Function to check if the NISO bit for version >= 3.2.x is implemented. Signed-off-by: NMario Huettel <mario.huettel@gmx.net> Reviewed-by: NOliver Hartkopp <socketcan@hartkopp.net> Tested-by: NQuentin Schulz <quentin.schulz@free-electrons.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Mario Huettel 提交于
* Updated register defines to newest M_CAN version (v3.2.1). * Changed defines in the whole code. Signed-off-by: NMario Huettel <mario.huettel@gmx.net> Reviewed-by: NOliver Hartkopp <socketcan@hartkopp.net> Tested-by: NQuentin Schulz <quentin.schulz@free-electrons.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Mario Huettel 提交于
The virtual address of the device was printed. I removed it because it leaks internal information. Signed-off-by: NMario Huettel <mario.huettel@gmx.net> Tested-by: NQuentin Schulz <quentin.schulz@free-electrons.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Mario Huettel 提交于
FIFO water marks disabled because the driver doesn't handle water mark events. Signed-off-by: NMario Huettel <mario.huettel@gmx.net> Reviewed-by: NOliver Hartkopp <socketcan@hartkopp.net> Tested-by: NQuentin Schulz <quentin.schulz@free-electrons.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Mario Huettel 提交于
* Disabled interrupt line 1. The driver didn't use it. Signed-off-by: NMario Huettel <mario.huettel@gmx.net> Tested-by: NQuentin Schulz <quentin.schulz@free-electrons.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
- 31 1月, 2017 1 次提交
-
-
由 Eric Dumazet 提交于
napi_complete_done() allows to opt-in for gro_flush_timeout, added back in linux-3.19, commit 3b47d303 ("net: gro: add a per device gro flush timer") This allows for more efficient GRO aggregation without sacrifying latencies. Signed-off-by: NEric Dumazet <edumazet@google.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 09 5月, 2016 1 次提交
-
-
由 Oliver Hartkopp 提交于
As described in 'can: m_can: tag current CAN FD controllers as non-ISO' (6cfda7fb) it is possible to define fixed configuration options by setting the according bit in 'ctrlmode' and clear it in 'ctrlmode_supported'. This leads to the incovenience that the fixed configuration bits can not be passed by netlink even when they have the correct values (e.g. non-ISO, FD). This patch fixes that issue and not only allows fixed set bit values to be set again but now requires(!) to provide these fixed values at configuration time. A valid CAN FD configuration consists of a nominal/arbitration bittiming, a data bittiming and a control mode with CAN_CTRLMODE_FD set - which is now enforced by a new can_validate() function. This fix additionally removed the inconsistency that was prohibiting the support of 'CANFD-only' controller drivers, like the RCar CAN FD. For this reason a new helper can_set_static_ctrlmode() has been introduced to provide a proper interface to handle static enabled CAN controller options. Reported-by: NRamesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com> Signed-off-by: NOliver Hartkopp <socketcan@hartkopp.net> Reviewed-by: NRamesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com> Cc: <stable@vger.kernel.org> # >= 3.18 Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
- 23 11月, 2015 1 次提交
-
-
由 Oliver Hartkopp 提交于
The assignment 'cf->data[2] |= CAN_ERR_PROT_UNSPEC' used at CAN error message creation time is obsolete as CAN_ERR_PROT_UNSPEC is zero and cf->data[2] is initialized with zero in alloc_can_err_skb() anyway. So we could either assign 'cf->data[2] = CAN_ERR_PROT_UNSPEC' correctly or we can remove the obsolete OR operation entirely. Signed-off-by: NOliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-