summaryrefslogtreecommitdiffstats
path: root/drivers/net/can/kvaser_pciefd.c
AgeCommit message (Collapse)Author
2020-12-03Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netJakub Kicinski
Conflicts: drivers/net/ethernet/ibm/ibmvnic.c Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-11-30can: kvaser_pciefd: kvaser_pciefd_open(): fix error handlingZhang Qilong
If kvaser_pciefd_bus_on() failed, we should call close_candev() to avoid reference leak. Fixes: 26ad340e582d3 ("can: kvaser_pciefd: Add driver for Kvaser PCIEcan devices") Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> Link: https://lore.kernel.org/r/20201128133922.3276973-3-zhangqilong3@huawei.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2020-11-20can: rename CAN FD related can_len2dlc and can_dlc2len helpersOliver 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: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Link: https://lore.kernel.org/r/20201110101852.1973-6-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2020-11-20can: replace can_dlc as variable/element for payload lengthOliver 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: Oliver 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: Marc Kleine-Budde <mkl@pengutronix.de>
2020-11-18can: kvaser_pciefd: Fix KCAN bittiming limitsJimmy Assarsson
Use correct bittiming limits for the KCAN CAN controller. Fixes: 26ad340e582d ("can: kvaser_pciefd: Add driver for Kvaser PCIEcan devices") Signed-off-by: Jimmy Assarsson <extja@kvaser.com> Link: https://lore.kernel.org/r/20201115163027.16851-1-jimmyassarsson@gmail.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2019-09-03can: kvaser_pciefd: the PWM generator is running at the bus frequency of the ↵Christer Beskow
system. The system clock frequency for the bus connected to the PCIe controller shall be used when calculating the frequency of the PWM, not the CAN system clock frequency. Signed-off-by: Christer Beskow <chbe@kvaser.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2019-08-13can: kvaser_pciefd: Remove unused including <linux/version.h>YueHaibing
Remove including <linux/version.h> that don't need it. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2019-08-13can: kvaser_pciefd: kvaser_pciefd_pwm_stop(): remove unnecessary code when ↵Christer Beskow
setting pwm duty cycle to zero To set the duty cycle to zero (i.e. pwm_stop), the trigger value shall be equal to the top value. This is achieved by reading the value of the top bit field from the pwm register and then writing back this value to the trigger and top bit fields. Addresses-Coverity: ("Logically dead code") Reported-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Christer Beskow <chbe@kvaser.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2019-07-24can: kvaser_pciefd: Add driver for Kvaser PCIEcan devicesHenning Colliander
This patch adds support for Kvaser PCIEcan devices. This includes support for up to 4 CAN channels on a single card, depending on device. Signed-off-by: Henning Colliander <henning.colliander@evidente.se> Signed-off-by: Jimmy Assarsson <extja@kvaser.com> Signed-off-by: Christer Beskow <chbe@kvaser.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>