- 06 2月, 2017 2 次提交
-
-
由 Marc Kleine-Budde 提交于
Some CAN controllers don't implement a FIFO in hardware, but fill their mailboxes in a particular order (from lowest to highest or highest to lowest). This makes problems to read the frames in the correct order from the hardware, as new frames might be filled into just read (low) mailboxes. This gets worse, when following new frames are received into not read (higher) mailboxes. On the bright side some these CAN controllers put a timestamp on each received CAN frame. This patch adds support to offload CAN frames in interrupt context, order them by timestamp and then transmitted in a NAPI context. Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 David Jander 提交于
Some CAN controllers have a usable FIFO already but can still benefit from off-loading the CAN controller FIFO. The CAN frames of the FIFO are read and put into a skb queue during interrupt and then transmitted in a NAPI context. Signed-off-by: NDavid Jander <david@protonic.nl> 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>
-
- 24 1月, 2017 4 次提交
-
-
由 Colin Ian King 提交于
The error return ret is never zero in the error handling path in softingcs_probe, so the check for non-zero and returning -ENODEV is logically dead code and hence redundant. Remove it and just return ret. Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Marc Kleine-Budde 提交于
Some CAN interfaces only support fixed fixed bitrates. This patch adds a netlink interface to get the list of the CAN interface's fixed bitrates and data bitrates. Inside the driver arrays of supported data- bitrate values are defined. const u32 drvname_bitrate[] = { 20000, 50000, 100000 }; const u32 drvname_data_bitrate[] = { 200000, 500000, 1000000 }; struct drvname_priv *priv; priv = netdev_priv(dev); priv->bitrate_const = drvname_bitrate; priv->bitrate_const_cnt = ARRAY_SIZE(drvname_bitrate); priv->data_bitrate_const = drvname_data_bitrate; priv->data_bitrate_const_cnt = ARRAY_SIZE(drvname_data_bitrate); Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Marc Kleine-Budde 提交于
Until commit 08da7da4 can: provide a separate bittiming_const parameter to bittiming functions it was possible to have devices not providing bittiming_const. This can be used for hardware that only support pre-defined fixed bitrates. Although no mainline driver is using this feature so far. This patch re-introduces this feature for the bitrate and the data bitrate (of CANFD controllers). The driver can specify the {data_,}bittiming_const (if the bittiming parameters should be calculated from the bittiming_const) as before or no {data_,}bittiming_const but implement the do_set_{data,}bittiming callback. Acked-by: NOliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Oliver Hartkopp 提交于
This patch adds a netlink interface to configure the CAN bus termination of CAN interfaces. Inside the driver an array of supported termination values is defined: const u16 drvname_termination[] = { 60, 120, CAN_TERMINATION_DISABLED }; struct drvname_priv *priv; priv = netdev_priv(dev); priv->termination_const = drvname_termination; priv->termination_const_cnt = ARRAY_SIZE(drvname_termination); priv->termination = CAN_TERMINATION_DISABLED; And the funtion to set the value has to be defined: priv->do_set_termination = drvname_set_termination; Signed-off-by: NOliver Hartkopp <socketcan@hartkopp.net> Reviewed-by: NRamesh Shanmugasundaram <Ramesh.shanmugasundaram@bp.renesas.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
- 18 1月, 2017 2 次提交
-
-
由 Yegor Yefremov 提交于
In order to make the driver work with the common clock framework, this patch converts the clk_enable()/clk_disable() to clk_prepare_enable()/clk_disable_unprepare(). Also add error checking for clk_prepare_enable(). Signed-off-by: NYegor Yefremov <yegorslists@googlemail.com> Cc: linux-stable <stable@vger.kernel.org> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Einar Jón 提交于
The priv->device pointer for c_can_pci is never set, but it is used without a NULL check in c_can_start(). Setting it in c_can_pci_probe() like c_can_plat_probe() prevents c_can_pci.ko from crashing, with and without CONFIG_PM. This might also cause the pm_runtime_*() functions in c_can.c to actually be executed for c_can_pci devices - they are the only other place where priv->device is used, but they all contain a null check. Signed-off-by: NEinar Jón <tolvupostur@gmail.com> Cc: linux-stable <stable@vger.kernel.org> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
- 26 12月, 2016 1 次提交
-
-
由 Thomas Gleixner 提交于
ktime_set(S,N) was required for the timespec storage type and is still useful for situations where a Seconds and Nanoseconds part of a time value needs to be converted. For anything where the Seconds argument is 0, this is pointless and can be replaced with a simple assignment. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org>
-
- 16 12月, 2016 1 次提交
-
-
由 Michael S. Tsirkin 提交于
That's the default now, no need for makefiles to set it. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Acked-by: NKalle Valo <kvalo@codeaurora.org> Acked-by: NMarcel Holtmann <marcel@holtmann.org> Acked-by: NMarc Kleine-Budde <mkl@pengutronix.de> Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: NArend van Spriel <arend.vanspriel@broadcom.com>
-
- 08 12月, 2016 1 次提交
-
-
由 추지호 提交于
Fix for bad memory access while disconnecting. netdev is freed before private data free, and dev is accessed after freeing netdev. This makes a slub problem, and it raise kernel oops with slub debugger config. Signed-off-by: NJiho Chu <jiho.chu@samsung.com> Cc: linux-stable <stable@vger.kernel.org> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
- 01 12月, 2016 3 次提交
-
-
由 Colin Ian King 提交于
Trivial fix to spelling mistake "oustanding" to "outstanding" in comment and dev_dbg message. Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Stephane Grosjean 提交于
This adds support for PEAK-System PCAN-USB X6 USB to CAN interface. The CAN FD adapter PCAN-USB X6 allows the connection of up to 6 CAN FD or CAN networks to a computer via USB. The interface is installed in an aluminum profile casing and is shipped in versions with D-Sub connectors or M12 circular connectors. The PCAN-USB X6 registers in the USB sub-system as if 3x PCAN-USB-Pro FD adapters were plugged. So, this patch: - updates the PEAK_USB entry of the corresponding Kconfig file - defines and adds the device id. of the PCAN-USB X6 (0x0014) into the table of supported device ids - defines and adds the new software structure implementing the PCAN-USB X6, which is obviously a clone of the software structure implementing the PCAN-USB Pro FD. Signed-off-by: NStephane Grosjean <s.grosjean@peak-system.com> Tested-by: NOliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Stephane Grosjean 提交于
This fixes the bitimings fields ranges supported by all the CAN-FD USB interfaces of the PEAK-System CAN-FD adapters. Very first development versions of the IP core API defined smaller TSGEx and SJW fields for both nominal and data bittimings records than the production versions. This patch fixes them by enlarging their sizes to the actual values: field: old size: fixed size: nominal TSGEG1 6 8 nominal TSGEG2 4 7 nominal SJW 4 7 data TSGEG1 4 5 data TSGEG2 3 4 data SJW 2 4 Note that this has no other consequences than offering larger choice to bitrate encoding. Signed-off-by: NStephane Grosjean <s.grosjean@peak-system.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
- 01 11月, 2016 1 次提交
-
-
由 Lukas Resch 提交于
This patch adds support for Moxa CAN devices. Signed-off-by: NLukas Resch <l.resch@incubedit.com> Signed-off-by: NChristoph Zehentner <c.zehentner@incubedit.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
- 24 10月, 2016 1 次提交
-
-
由 Mauro Carvalho Chehab 提交于
The previous patch renamed several files that are cross-referenced along the Kernel documentation. Adjust the links to point to the right places. Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
-
- 22 9月, 2016 1 次提交
-
-
由 Sergei Miroshnichenko 提交于
A timer was used to restart after the bus-off state, leading to a relatively large can_restart() executed in an interrupt context, which in turn sets up pinctrl. When this happens during system boot, there is a high probability of grabbing the pinctrl_list_mutex, which is locked already by the probe() of other device, making the kernel suspect a deadlock condition [1]. To resolve this issue, the restart_timer is replaced by a delayed work. [1] https://github.com/victronenergy/venus/issues/24Signed-off-by: NSergei Miroshnichenko <sergeimir@emcraft.com> Cc: linux-stable <stable@vger.kernel.org> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
- 21 9月, 2016 1 次提交
-
-
由 Marek Vasut 提交于
Configure the transmitter delay register at +0x1c to correctly handle the CAN FD bitrate switch (BRS). This moves the SSP (secondary sample point) to a proper offset, so that the TDC mechanism works and won't generate error frames on the CAN link. Signed-off-by: NMarek Vasut <marex@denx.de> Cc: Marc Kleine-Budde <mkl@pengutronix.de> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Oliver Hartkopp <socketcan@hartkopp.net> Cc: Wolfgang Grandegger <wg@grandegger.com> Cc: linux-stable <stable@vger.kernel.org> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
- 19 9月, 2016 1 次提交
-
-
由 Fabio Estevam 提交于
On a imx6ul-pico board the following error is seen during system suspend: dpm_run_callback(): platform_pm_resume+0x0/0x54 returns -110 PM: Device 2090000.flexcan failed to resume: error -110 The reason for this suspend error is because when the CAN interface is not active the clocks are disabled and then flexcan_chip_enable() will always fail due to a timeout error. In order to fix this issue, only call flexcan_chip_enable/disable() when the CAN interface is active. Based on a patch from Dong Aisheng in the NXP kernel. Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Cc: linux-stable <stable@vger.kernel.org> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
- 14 8月, 2016 6 次提交
-
-
由 Wolfram Sang 提交于
kmalloc will print enough information in case of failure. Signed-off-by: NWolfram Sang <wsa-dev@sang-engineering.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Wolfram Sang 提交于
kmalloc will print enough information in case of failure. Signed-off-by: NWolfram Sang <wsa-dev@sang-engineering.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Wolfram Sang 提交于
kmalloc will print enough information in case of failure. Signed-off-by: NWolfram Sang <wsa-dev@sang-engineering.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Wolfram Sang 提交于
kmalloc will print enough information in case of failure. Signed-off-by: NWolfram Sang <wsa-dev@sang-engineering.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Wolfram Sang 提交于
kmalloc will print enough information in case of failure. Signed-off-by: NWolfram Sang <wsa-dev@sang-engineering.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Wolfram Sang 提交于
kmalloc will print enough information in case of failure. Signed-off-by: NWolfram Sang <wsa-dev@sang-engineering.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 23 6月, 2016 6 次提交
-
-
由 Ed Spiridonov 提交于
Silent ignorance of errors during probe procedure is a bad thing, this patch fixes it. Extra message added for hardware initialization failure. Such common issues are mostly caused by wrong wiring. Message about success added as well, it should be useful to debug new hardware configuration, especially in case of several CAN buses. Signed-off-by: NEd Spiridonov <edo.rus@gmail.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Ramesh Shanmugasundaram 提交于
As per Wolfgang G, all new drivers should support decreasing state transition(back-to-error-active). This patch adds this support. This driver configures the controller to halt on bus-off entry. Hence, when in error states less than bus off state, the TEC/REC counters are checked for lower state transition eligibility and action. Signed-off-by: NRamesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Ramesh Shanmugasundaram 提交于
The controller can operate in one of the two global modes - CAN FD only mode (default) - Classical CAN (CAN2.0) only mode This patch adds support for Classical CAN only mode. It can be enabled by defining the optional device tree property "renesas,no-can-fd" of this node. Note: R-Car Gen3 h/w manual v0.51E shows bit6 of RSCFDnCFDGCFG as reserved, which is incorrect. This bit is same as RSCFDnGCFG. Signed-off-by: NRamesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Jimmy Assarsson 提交于
This patch adds support for Kvaser Leaf Light HS v2 OEM, Mini PCI Express 2xHS and USBcan Light 2xHS. Signed-off-by: NJimmy Assarsson <jimmyassarsson@gmail.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Oliver Hartkopp 提交于
For 'real' hardware CAN devices the netlink interface is used to set CAN specific communication parameters. Real CAN hardware can not be created nor removed with the ip tool ... This patch adds a private dellink function for the CAN device driver interface that does just nothing. It's a follow up to commit 993e6f2f ("can: fix oops caused by wrong rtnl newlink usage") but for dellink. Reported-by: Najneu <ajneu1@gmail.com> Signed-off-by: NOliver Hartkopp <socketcan@hartkopp.net> Cc: <stable@vger.kernel.org> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Oliver Hartkopp 提交于
With upstream commit bb208f14 (can: fix handling of unmodifiable configuration options) a new can_validate() function was introduced. When invoking 'ip link set can0 type can' without any configuration data can_validate() tries to validate the content without taking into account that there's totally no content. This patch adds a check for missing content. Reported-by: Najneu <ajneu1@gmail.com> Signed-off-by: NOliver Hartkopp <socketcan@hartkopp.net> Cc: <stable@vger.kernel.org> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
- 20 6月, 2016 3 次提交
-
-
由 Maximilian Schneider 提交于
This patchs adds basic support for the bytewerk.org candleLight interface, a open hardware (CERN OHL) USB CAN adapter. Signed-off-by: NHubert Denkmair <hubert@denkmair.de> Signed-off-by: NMaximilian Schneider <max@schneidersoft.net> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Wolfgang Grandegger 提交于
At high bus load it could happen that "at91_poll()" enters with all RX message boxes filled up. If then at the end the "quota" is exceeded as well, "rx_next" will not be reset to the first RX mailbox and hence the interrupts remain disabled. Signed-off-by: NWolfgang Grandegger <wg@grandegger.com> Tested-by: NAmr Bekhit <amrbekhit@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Thor Thayer 提交于
When testing CAN write floods on Altera's CycloneV, the first 2 bytes are sometimes 0x00, 0x00 or corrupted instead of the values sent. Also observed bytes 4 & 5 were corrupted in some cases. The D_CAN Data registers are 32 bits and changing from 16 bit writes to 32 bit writes fixes the problem. Testing performed on Altera CycloneV (D_CAN). Requesting tests on other C_CAN & D_CAN platforms. Reported-by: NRichard Andrysek <richard.andrysek@gomtec.de> Signed-off-by: NThor Thayer <tthayer@opensource.altera.com> Cc: <stable@vger.kernel.org> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
- 17 6月, 2016 5 次提交
-
-
由 Ramesh Shanmugasundaram 提交于
This patch clubs the Renesas controller drivers in one rcar dir. Signed-off-by: NRamesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Ramesh Shanmugasundaram 提交于
This patch adds support for the CAN FD controller found in Renesas R-Car SoCs. The controller operates in CAN FD only mode by default. CAN FD mode supports both Classical CAN & CAN FD frame formats. The controller supports ISO 11898-1:2015 CAN FD format only. This controller supports two channels and the driver can enable either or both of the channels. Driver uses Rx FIFOs (one per channel) for reception & Common FIFOs (one per channel) for transmission. Rx filter rules are configured to the minimum (one per channel) and it accepts Standard, Extended, Data & Remote Frame combinations. Note: There are few documentation errors in R-Car Gen3 Hardware User Manual v0.5E with respect to CAN FD controller. They are listed below: 1. CAN FD interrupt numbers 29 & 30 are listed as per channel interrupts. However, they are common to both channels (i.e.) they are global and channel interrupts respectively. 2. CANFD clock is derived from PLL1. This is not documented. 3. CANFD clock is further divided by (1/2) within the CAN FD controller. This is not documented. 4. The minimum value of NTSEG1 in RSCFDnCFDCmNCFG register is 2 Tq. It is specified 4 Tq in the manual. 5. The maximum number of message RAM area the controller can use is 3584 bytes. It is specified 10752 bytes in the manual. Signed-off-by: NRamesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com> Acked-by: NRob Herring <robh@kernel.org> Reviewed-by: NUlrich Hecht <ulrich.hecht+renesas@gmail.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Maximilian Schneider 提交于
This patch Implements the ethtool set_phys_id callback to ease the locating of specific physical devices. Currently only supported on candleLight interfaces. Signed-off-by: NHubert Denkmair <hubert@denkmair.de> Signed-off-by: NMaximilian Schneider <max@schneidersoft.net> [mkl: split codingstyle change sinto separate patch] Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 Maximilian Schneider 提交于
This patch converts "1 << n" by BIT(n) and fixes the indention. No functional change. Signed-off-by: NHubert Denkmair <hubert@denkmair.de> Signed-off-by: NMaximilian Schneider <max@schneidersoft.net> [mkl: split codingstyle changes into separate patch] Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-
由 William Breathitt Gray 提交于
This driver does not do anything special in module init/exit. This patch eliminates the module init/exit boilerplate code by utilizing the module_isa_driver macro. Signed-off-by: NWilliam Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
-