aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-06-30Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller6-14/+65
Several cases of overlapping changes, except the packet scheduler conflicts which deal with the addition of the free list parameter to qdisc_enqueue(). Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-23can: mcp251x: add message about sucessful/unsuccessful probeEd Spiridonov1-1/+6
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: Ed Spiridonov <edo.rus@gmail.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-06-23can: rcar_canfd: Add back-to-error-active supportRamesh Shanmugasundaram1-20/+56
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: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-06-23can: rcar_canfd: Add Classical CAN only mode supportRamesh Shanmugasundaram1-114/+241
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: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-06-23can: kvaser_usb: Add support for more Kvaser Leaf v2 devicesJimmy Assarsson2-1/+9
This patch adds support for Kvaser Leaf Light HS v2 OEM, Mini PCI Express 2xHS and USBcan Light 2xHS. Signed-off-by: Jimmy Assarsson <jimmyassarsson@gmail.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-06-23can: fix oops caused by wrong rtnl dellink usageOliver Hartkopp1-0/+6
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 993e6f2fd ("can: fix oops caused by wrong rtnl newlink usage") but for dellink. Reported-by: ajneu <ajneu1@gmail.com> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Cc: <stable@vger.kernel.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-06-23can: fix handling of unmodifiable configuration options fixOliver Hartkopp1-0/+3
With upstream commit bb208f144cf3f59 (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: ajneu <ajneu1@gmail.com> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Cc: <stable@vger.kernel.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-06-20can: gs_usb: Add Basic support for the bytewerk.org candleLight interfaceMaximilian Schneider2-4/+13
This patchs adds basic support for the bytewerk.org candleLight interface, a open hardware (CERN OHL) USB CAN adapter. Signed-off-by: Hubert Denkmair <hubert@denkmair.de> Signed-off-by: Maximilian Schneider <max@schneidersoft.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-06-20can: at91_can: RX queue could get stuck at high bus loadWolfgang Grandegger1-2/+3
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: Wolfgang Grandegger <wg@grandegger.com> Tested-by: Amr Bekhit <amrbekhit@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-06-20can: c_can: Update D_CAN TX and RX functions to 32 bit - fix Altera Cyclone accessThor Thayer1-7/+31
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: Richard Andrysek <richard.andrysek@gomtec.de> Signed-off-by: Thor Thayer <tthayer@opensource.altera.com> Cc: <stable@vger.kernel.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-06-17can: rcar_can: Move Renesas CAN driver to rcar dirRamesh Shanmugasundaram5-12/+12
This patch clubs the Renesas controller drivers in one rcar dir. Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-06-17can: rcar_canfd: Add Renesas R-Car CAN FD driverRamesh Shanmugasundaram5-0/+1713
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: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com> Acked-by: Rob Herring <robh@kernel.org> Reviewed-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-06-17can: gs_usb: add ethtool set_phys_id callback to locate physical deviceMaximilian Schneider1-31/+85
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: Hubert Denkmair <hubert@denkmair.de> Signed-off-by: Maximilian Schneider <max@schneidersoft.net> [mkl: split codingstyle change sinto separate patch] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-06-17can: gs_usb: codingstyle: introduce use of BIT() + fix indentionMaximilian Schneider1-11/+14
This patch converts "1 << n" by BIT(n) and fixes the indention. No functional change. Signed-off-by: Hubert Denkmair <hubert@denkmair.de> Signed-off-by: Maximilian Schneider <max@schneidersoft.net> [mkl: split codingstyle changes into separate patch] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-06-17can: tscan1: Utilize the module_isa_driver macroWilliam Breathitt Gray1-11/+1
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: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-06-17can: slcan: Replace sizeof struct can_frame with CAN_MTUMarek Vasut1-2/+2
Use CAN_MTU macro instead of sizeof(struct can_frame) just like the other drivers do. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Oliver Hartkopp <socketcan@hartkopp.net> Cc: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-06-17can: dev: can-calc-bit-timing(): better sample point calculationMarc Kleine-Budde1-55/+85
This patch optimizes the calculation of the sample point. To understand what it does have a look at the original implementation. If there is a combination of timing parameters where both the bitrate and sample point error are 0 the current implementation will find it. However if the reference clock doesn't allow an optimal bitrate (this means the bitrate error is always != 0) there might be several timing parameter combinations having the same bitrate error. The original implementation will allways choose the one with the highest brp. The actual sample point error isn't taken into account. This patch changes the algorithm to minimize the sample point error, too. Now a brp/tseg combination is accepted as better if one of these condition are fulfilled: 1) the bit rate error must be smaller, or 2) the bit rate error must be equal and the sample point error must be equal or smaller If a smaller bit rate error is found the sample point error is reset. This ensures that we first optimize for small bit rate error and then for small sample point errors. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-05-09can: ifi: Add more detailed error reportingMarek Vasut1-6/+107
The updated specification for the IFI CANFD core contains description of more detailed error reporting capability of the core. Implement support for this detailed error reporting. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-05-09can: ifi: Increment TX counters only on real transmissionMarek Vasut1-2/+4
Only increment the TX counters in the irq handler if a CAN message was sent. The current code incremented the counters also if the TX FIFO empty interrupt happened, which is incorrect. Signed-off-by: Marek 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> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-05-09can: ifi: Treat CAN_CTRLMODE_FD_NON_ISO correctlyMarek Vasut1-2/+3
The CAN_CTRLMODE_FD flag is set for both ISO and BOSCH CANFD mode, while the CAN_CTRLMODE_FD_NON_ISO is additional flag which is only set for CANFD-BOSCH mode. Fix the handling of the flags to reflect this. Signed-off-by: Marek 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> Reviewed-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-05-09can: ifi: Unify timing constantsMarek Vasut1-13/+1
There is no distinction between bittiming constants for the slow and fast part of the CANFD operation on this controller, so just use one single bittiming constant set. Signed-off-by: Marek 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> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-05-09can: ifi: Update timing configuration codeMarek Vasut1-33/+21
The updated documentation regarding the IFI CANFD core from April 2016 adds more details regarding the timing calculation. There is no longer any distinction in the timing calculation between CANFD and CAN2.0, but instead there are two timing modes -- 4_12_6_6 and 7_9_8_8 -- where the numbers mean the width in bits of the SJW/Prescaler/TimeA/TimeB fields. The code uses 7_9_8_8 mode, which allows more fine-grained control over the timing. Signed-off-by: Marek 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> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-05-09can: ifi: Start NAPI poll on bus warning tooMarek Vasut1-2/+3
Start the NAPI polling in case the bus warning interrupt happens, since it is the poll function which checks and reports the warning. Signed-off-by: Marek 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> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-05-09can: gs_usb: modify the usb device table to use only the first usb interfaceMaximilian Schneider1-1/+2
Modified the USB device table to use only the first USB interface, as is the case with GS USB devices. This allows other GS USB compatible devices to be more flexible with their remaining interfaces. Signed-off-by: Maximilian Schneider <max@schneidersoft.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-05-09can: janz-ican3: error handling for CAL/CANopen firmwareAndreas Gröger1-9/+95
My patch of May 2015 was missing the changed handling of error indications. With CAL/CANopen firmware the NMTS-SlaveEventIndication must be used instead of CAN-EventIndication. An appropriate slave node must be configured to report the errors. In our department (about 15 development systems with Janz ICAN3- modules with firmware 1.48, my system also with firmware ICANOS 1.35) we use the driver with this patch for about one year: no known problems. Signed-off-by: Andreas Gröger <andreas24groeger@gmail.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-05-09can: fix handling of unmodifiable configuration optionsOliver Hartkopp2-5/+53
As described in 'can: m_can: tag current CAN FD controllers as non-ISO' (6cfda7fbebe) 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: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Reviewed-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com> Cc: <stable@vger.kernel.org> # >= 3.18 Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-05-09can: mcp251x: Replace create_freezable_workqueue with alloc_workqueueAmitoj Kaur Chawla1-1/+2
Replace scheduled to be removed create_freezable_workqueue with alloc_workqueue. priv->wq should be explicitly set as freezable to ensure it is frozen in the suspend sequence and work items are drained so that no new work item starts execution until thawed. Thus, use of WQ_FREEZABLE flag here is required. WQ_MEM_RECLAIM flag has been set here to ensure forward progress regardless of memory pressure. The order of execution is not important so set @max_active as 0. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-05-09can: sja1000: plx_pci: Add support for Marathon CAN-bus-PCIe cardNikita Edward Baruzdin1-8/+56
This patch adds support for the Marathon CAN-bus-PCIe card to the sja1000 driver. For more information see: http://can.marathon.ru/page/devices/can-bus-pcie Signed-off-by: Nikita Edward Baruzdin <nebaruzdin@gmail.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-05-09can: sja1000: Fix error location forwardingAlexander Gerasiov1-1/+5
According to SJA1000 documentation the location of error is available regardless of an error type. Therefore it should always be forwarded to SocketCAN. Signed-off-by: Nikita Edward Baruzdin <nebaruzdin@lvk.cs.msu.su> Signed-off-by: Alexander GQ Gerasiov <gq@cs.msu.su> Acked-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-05-04treewide: replace dev->trans_start update with helperFlorian Westphal4-8/+8
Replace all trans_start updates with netif_trans_update helper. change was done via spatch: struct net_device *d; @@ - d->trans_start = jiffies + netif_trans_update(d) Compile tested only. Cc: user-mode-linux-devel@lists.sourceforge.net Cc: linux-xtensa@linux-xtensa.org Cc: linux1394-devel@lists.sourceforge.net Cc: linux-rdma@vger.kernel.org Cc: netdev@vger.kernel.org Cc: MPT-FusionLinux.pdl@broadcom.com Cc: linux-scsi@vger.kernel.org Cc: linux-can@vger.kernel.org Cc: linux-parisc@vger.kernel.org Cc: linux-omap@vger.kernel.org Cc: linux-hams@vger.kernel.org Cc: linux-usb@vger.kernel.org Cc: linux-wireless@vger.kernel.org Cc: linux-s390@vger.kernel.org Cc: devel@driverdev.osuosl.org Cc: b.a.t.m.a.n@lists.open-mesh.org Cc: linux-bluetooth@vger.kernel.org Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Acked-by: Mugunthan V N <mugunthanvnm@ti.com> Acked-by: Antonio Quartulli <a@unstable.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10can: rcar_can: Add r8a7795 supportRamesh Shanmugasundaram2-1/+2
Added r8a7795 SoC support. Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-03-10can: ifi: Add obscure bit swap for EFF frame IDsMarek Vasut1-2/+29
In case of CAN2.0 EFF frame, the controller handles frame IDs in a rather bizzare way. The ID is split into an extended part, IDX[28:11] and standard part, ID[10:0]. In the TX path, the core first sends the top 11 bits of the IDX, followed by ID and finally the rest of IDX. In the RX path, the core stores the ID the LSbit part of IDX field, followed by the LSbit parts of real IDX. The MSbit parts of IDX are stored in ID field of the register. This patch implements the necessary bit shuffling to mitigate this obscure behavior. In case two of these controllers are connected together, the RX and TX bit swapping nullifies itself and the issue does not manifest. The issue only manifests when talking to another different CAN controller. Signed-off-by: Marek 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> Reviewed-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-03-10can: ifi: Fix RX and TX ID maskMarek Vasut1-4/+4
The RX and TX ID mask for CAN2.0 is 11 bits wide. This patch fixes the incorrect mask, which caused the CAN IDs to miss the MSBit both on receive and transmit. Signed-off-by: Marek 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> Reviewed-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-03-10can: ifi: Fix TX DLC configurationMarek Vasut1-8/+6
The TX DLC, the transmission length information, was not written into the transmit configuration register. When using the CAN core with different CAN controller, the receiving CAN controller will receive only the ID part of the CAN frame, but no data at all. This patch adds the TX DLC into the register to fix this issue. Signed-off-by: Marek 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> Reviewed-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-03-10can: ifi: Fix clock generator configurationMarek Vasut1-21/+23
The clock generation does not match reality when using the CAN IP core outside of the FPGA design. This patch fixes the computation of values which are programmed into the clock generator registers. First, there are some off-by-one errors which manifest themselves only when communicating with different controller, so those are fixed. Second, the bits in the clock generator registers have different meaning depending on whether the core is in ISO CANFD mode or any of the other modes (BOSCH CANFD or CAN2.0). Detect the ISO CANFD mode and fix handling of this special case of clock configuration. Finally, the CAN clock speed is in CANCLOCK register, not SYSCLOCK register, so fix this as well. Signed-off-by: Marek 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> Reviewed-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-03-08Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2-14/+12
Several cases of overlapping changes, as well as one instance (vxlan) of a bug fix in 'net' overlapping with code movement in 'net-next'. Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-04can: mcp251x: avoid write to error flag register if it's unnecessaryEd Spiridonov1-1/+1
Only two bits (RX0OVR and RX1OVR) are writable in EFLG, write is useless if these bits aren't set. Signed-off-by: Ed Spiridonov <edo.rus@gmail.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-02-26can: rcar: add gen[12] fallback compatibility stringsSimon Horman1-0/+2
Add fallback compatibility string for R-Car Gen 1 and Gen2. In the case of Renesas R-Car hardware we know that there are generations of SoCs, e.g. Gen 1 and Gen 2. But beyond that its not clear what the relationship between IP blocks might be. For example, I believe that r8a7779 is older than r8a7778 but that doesn't imply that the latter is a descendant of the former or vice versa. We can, however, by examining the documentation and behaviour of the hardware at run-time observe that the current driver implementation appears to be compatible with the IP blocks on SoCs within a given generation. For the above reasons and convenience when enabling new SoCs a per-generation fallback compatibility string scheme being adopted for drivers for Renesas SoCs. Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Acked-by: Rob Herring <robh@kernel.org> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-02-26can: ems_usb: fix coding styleMarc Kleine-Budde1-5/+3
This patch fixes the coding style issues introduced in commit: 90cfde46586d can: ems_usb: Fix possible tx overflow Reported-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-02-26can: gs_usb: fixed disconnect bug by removing erroneous use of kfree()Maximilain Schneider1-13/+11
gs_destroy_candev() erroneously calls kfree() on a struct gs_can *, which is allocated through alloc_candev() and should instead be freed using free_candev() alone. The inappropriate use of kfree() causes the kernel to hang when gs_destroy_candev() is called. Only the struct gs_usb * which is allocated through kzalloc() should be freed using kfree() when the device is disconnected. Signed-off-by: Maximilian Schneider <max@schneidersoft.net> Cc: linux-stable <stable@vger.kernel.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-02-23Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-4/+10
Conflicts: drivers/net/phy/bcm7xxx.c drivers/net/phy/marvell.c drivers/net/vxlan.c All three conflicts were cases of simple overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-21can: ems_usb: Fix possible tx overflowGerhard Uttenthaler1-4/+10
This patch fixes the problem that more CAN messages could be sent to the interface as could be send on the CAN bus. This was more likely for slow baud rates. The sleeping _start_xmit was woken up in the _write_bulk_callback. Under heavy TX load this produced another bulk transfer without checking the free_slots variable and hence caused the overflow in the interface. Signed-off-by: Gerhard Uttenthaler <uttenthaler@ems-wuensche.com> Cc: linux-stable <stable@vger.kernel.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-02-20can: ifi: Add IFI CANFD IP supportMarek Vasut5-0/+932
The patch adds support for IFI CAN/FD controller [1]. This driver currently supports sending and receiving both standard CAN and new CAN/FD frames. Both ISO and BOSCH variant of CAN/FD is supported. [1] http://www.ifi-pld.de/IP/CANFD/canfd.html Signed-off-by: Marek 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> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-02-20can: Makefile: Sort the MakefileMarek Vasut1-8/+8
Just sort the drivers in the Makefile, no functional change. Signed-off-by: Marek 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> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-02-20can: Kconfig: sort drivers alphabeticallyMarc Kleine-Budde1-25/+24
Sort the drivers that are directly listed in the Kconfig alphabetically, no functional change. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-02-20can: Kconfig: Sort the Kconfig includesMarek Vasut1-10/+4
Sort the Kconfig includes, no functional change. Signed-off-by: Marek 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> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-02-20can: sja1000: of: add compatibility with Technologic Systems versionDamien Riegel1-0/+47
Technologic Systems provides an IP compatible with the SJA1000, instantiated in an FPGA. Because of some bus widths issue, access to registers is made through a "window" that works like this: base + 0x0: address to read/write base + 0x2: 8-bit register value This commit adds a new compatible device, "technologic,sja1000", with read and write functions using the window mechanism. Signed-off-by: Damien Riegel <damien.riegel@savoirfairelinux.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-02-20can: sja1000: of: add per-compatible init hookDamien Riegel1-9/+31
This commit adds the capability to allocate and init private data embedded in the sja1000_priv structure on a per-compatible basis. The device node is passed as a parameter of the init callback to allow parsing of custom device tree properties. Signed-off-by: Damien Riegel <damien.riegel@savoirfairelinux.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-12-03Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller16-45/+24
Conflicts: drivers/net/ethernet/renesas/ravb_main.c kernel/bpf/syscall.c net/ipv4/ipmr.c All three conflicts were cases of overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-23can: xilinx: Convert to runtime_pmKedareswara rao Appana1-75/+101
Instead of enabling/disabling clocks at several locations in the driver, Use the runtime_pm framework. This consolidates the actions for runtime PM In the appropriate callbacks and makes the driver more readable and mantainable. Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>