summaryrefslogtreecommitdiffstats
path: root/drivers/net/can/cc770/cc770.c
Commit message (Collapse)AuthorAgeFilesLines
* can: cc770: don't touch skb after netif_rx()Marc Kleine-Budde2015-07-151-2/+2
| | | | | | | | | | There is no guarantee that the skb is in the same state after calling net_receive_skb() or netif_rx(). It might be freed or reused. Not really harmful as its a read access, except you turn on the proper debugging options which catch a use after free. Cc: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* can: move can_stats.bus_off++ from can_bus_off into can_change_stateAndri Yngvason2015-01-201-0/+1
| | | | | | | | | | | | | In order to be able to move the stats increment from can_bus_off() into can_change_state(), the increment had to be moved back into code that was using can_bus_off() but not can_change_state(). As a side-effect, this patch fixes the following bugs: * Redundant call to can_bus_off() in c_can. * Bus-off counted twice in xilinx_can. Signed-off-by: Andri Yngvason <andri.yngvason@marel.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* can: fix spelling errorsJeremiah Mahler2014-12-071-1/+1
| | | | | | | | Fix various spelling errors in the comments of the CAN modules. Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com> Acked-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* can: Unify MTU settings for CAN interfacesOliver Hartkopp2014-03-171-0/+1
| | | | | | | | | | | | | CAN interfaces only support MTU values of 16 (CAN 2.0) and 72 (CAN FD). Setting the MTU to other values is pointless but it does not really hurt. With the introduction of the CAN FD support in drivers/net/can a new function to switch the MTU for CAN FD has been introduced. This patch makes use of this can_change_mtu() function to check for correct MTU settings also in legacy CAN (2.0) devices. Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* can: mark bittiming_const pointer in struct can_priv as constMarc Kleine-Budde2012-07-201-1/+1
| | | | | | | | This patch marks the bittiming_const pointer as in the struct can_pric as "const". This allows us to mark the struct can_bittiming_const in the CAN drivers as "const", too. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* can: cc770: fix sparse warning for cc770_interruptMarc Kleine-Budde2012-07-021-1/+1
| | | | | | | | Make cc770_interrupt static to fix the following sparse warning: drivers/net/can/cc770/cc770.c:699:13: warning: symbol 'cc770_interrupt' was not declared. Should it be static? Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* can: cc770: linux/can/dev.h included twiceDanny Kukawka2012-03-031-1/+0
| | | | | | | | drivers/net/can/cc770/cc770.c included 'linux/can/dev.h' twice, remove the duplicate. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* can: cc770: store echo skb before starting the transferWolfgang Grandegger2012-02-031-1/+3
| | | | | | | | | On slow systems and high CAN bitrates, the error message "can_put_echo_skb: BUG! echo_skb is occupied!" did show up because can_put_echo_skb() was called after starting the transfer. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* can: cc770: add driver core for the Bosch CC770 and Intel AN82527Wolfgang Grandegger2011-12-011-0/+881
| | | | | | Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* can: Revert outdated cc770 driver patches.David S. Miller2011-11-301-895/+0
| | | | | | | Newer versions have been floating about, and I applied to older variant unfortunately. Signed-off-by: David S. Miller <davem@davemloft.net>
* can: cc770: add driver core for the Bosch CC770 and Intel AN82527Wolfgang Grandegger2011-11-291-0/+895
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: David S. Miller <davem@davemloft.net>