19 May, 2014

2 commits

  • Armin pointed me to the fact that the identifier which is used to ensure the
    unique include processing in lunux/include/uapi/linux/can.h is CAN_H.
    This clashed with his own source as includes from libraries and APIs should
    use an underscore '_' at the identifier start.

    This patch fixes the protection identifiers in all CAN relavant includes.

    Reported-by: Armin Burchardt
    Signed-off-by: Oliver Hartkopp
    Signed-off-by: Marc Kleine-Budde

    Oliver Hartkopp
     
  • Add support for the CAN controller found in Renesas R-Car SoCs.

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Marc Kleine-Budde

    Sergei Shtylyov
     

07 Mar, 2014

2 commits

  • The configuration for CAN FD depends on CAN_CTRLMODE_FD enabled in the driver
    specific ctrlmode_supported capabilities.

    The configuration can be done either with the 'fd { on | off }' option in the
    'ip' tool from iproute2 or by setting the CAN netdevice MTU to CAN_MTU (16) or
    to CANFD_MTU (72).

    Signed-off-by: Oliver Hartkopp
    Acked-by: Stephane Grosjean
    Signed-off-by: Marc Kleine-Budde

    Oliver Hartkopp
     
  • As CAN FD offers a second bitrate for the data section of the CAN frame the
    infrastructure for storing and configuring this second bitrate is introduced.
    Improved the readability of the if-statement by inserting some newlines.

    Signed-off-by: Oliver Hartkopp
    Acked-by: Stephane Grosjean
    Signed-off-by: Marc Kleine-Budde

    Oliver Hartkopp
     

14 Feb, 2014

1 commit

  • linux-can-next-for-3.15-20140212

    Marc Kleine-Budde says:

    ====================
    this is a pull request of eight patches for net-next/master.

    Florian Vaussard contributed a series that merged the sja1000 of_platform
    into the platform driver. The of_platform driver is finally removed.
    Stephane Grosjean supplied a patch to allocate CANFD skbs. In a patch
    by Uwe Kleine-König another missing copyright information was added to
    a userspace header. And a patch by Yoann DI RUZZA that adds listen only
    mode to the at91_can driver.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     

04 Feb, 2014

1 commit


31 Jan, 2014

1 commit

  • Self generated skbuffs in net/can/bcm.c are setting a skb->sk reference but
    no explicit destructor which is enforced since Linux 3.11 with commit
    376c7311bdb6 (net: add a temporary sanity check in skb_orphan()).

    This patch adds some helper functions to make sure that a destructor is
    properly defined when a sock reference is assigned to a CAN related skb.
    To create an unshared skb owned by the original sock a common helper function
    has been introduced to replace open coded functions to create CAN echo skbs.

    Signed-off-by: Oliver Hartkopp
    Tested-by: Andre Naujoks
    Reviewed-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     

21 Aug, 2013

2 commits


27 Jun, 2013

1 commit


29 Jan, 2013

1 commit


26 Jan, 2013

4 commits

  • The struct can_skb_priv is used to transport additional information along
    with the stored struct can(fd)_frame that can not be contained in existing
    struct sk_buff elements.

    can_skb_priv is located in the skb headroom, which does not touch the existing
    CAN sk_buff usage with skb->data and skb->len, so that even out-of-tree
    CAN drivers can be used without changes.

    Btw. out-of-tree CAN drivers without can_skb_priv in the sk_buff headroom
    would not support features based on can_skb_priv.

    The can_skb_priv->ifindex contains the first interface where the CAN frame
    appeared on the local host. Unfortunately skb->skb_iif can not be used as this
    value is overwritten in every netif_receive_skb() call.

    Signed-off-by: Oliver Hartkopp
    Signed-off-by: Marc Kleine-Budde

    Oliver Hartkopp
     
  • The LED trigger name for CAN devices is based on the initial
    CAN device name, but does never change. The LED trigger name
    is not guaranteed to be unique in case of hotplugging CAN devices.

    This patch tries to address this problem by modifying the
    LED trigger name according to the CAN device name when
    the latter changes.

    v1 - Kurt Van Dijck
    v2 - Fabio Baltieri
    - remove rename blocking if trigger is bound
    - use led-subsystem function for the actual rename (still WiP)
    - call init/exit functions from dev.c
    v3 - Kurt Van Dijck
    - safe operation for non-candev based devices (vcan, slcan)
    based on earlier patch
    v4 - Kurt Van Dijck
    - trivial patch mistakes fixed

    Signed-off-by: Kurt Van Dijck
    Signed-off-by: Fabio Baltieri
    Signed-off-by: Marc Kleine-Budde

    Kurt Van Dijck
     
  • In net_device notifier calls, it was impossible to determine
    if a CAN device is based on candev in a safe way.
    This patch adds such test in order to access candev storage
    from within those notifiers.

    Signed-off-by: Kurt Van Dijck
    Acked-by: Oliver Hartkopp
    Signed-off-by: Fabio Baltieri
    Signed-off-by: Marc Kleine-Budde

    Kurt Van Dijck
     
  • This patch implements the functions to add two LED triggers, named
    -tx and -rx, to a canbus device driver.

    Triggers are called from specific handlers by each CAN device driver and
    can be disabled altogether with a Kconfig option.

    The implementation keeps the LED on when the interface is UP and blinks
    the LED on network activity at a configurable rate.

    This only supports can-dev based drivers, as it uses some support field
    in the can_priv structure.

    Supported drivers should call devm_can_led_init() and can_led_event() as
    needed.

    Cleanup is handled automatically by devres, so no *_exit function is
    needed.

    Supported events are:
    - CAN_LED_EVENT_OPEN: turn on tx/rx LEDs
    - CAN_LED_EVENT_STOP: turn off tx/rx LEDs
    - CAN_LED_EVENT_TX: trigger tx LED blink
    - CAN_LED_EVENT_RX: trigger tx LED blink

    Cc: Wolfgang Grandegger
    Cc: Marc Kleine-Budde
    Signed-off-by: Fabio Baltieri
    Acked-by: Oliver Hartkopp
    Signed-off-by: Marc Kleine-Budde

    Fabio Baltieri
     

17 Oct, 2012

1 commit

  • Remove non-UAPI Kbuild files that have become empty as a result of UAPI
    disintegration. They used to have only header-y lines in them and those have
    now moved to the Kbuild files in the corresponding uapi/ directories.

    Possibly these should not be removed but rather have a comment inserted to say
    they are intentionally left blank. This would make it easier to add generated
    header lines in future without having to restore the infrastructure.

    Note that at this point not all the UAPI disintegration parts have been merged,
    so it is likely that more empty Kbuild files will turn up.

    It is probably necessary to make the files non-empty to prevent the patch
    program from automatically deleting them when it reduces them to nothing.

    Signed-off-by: David Howells

    David Howells
     

11 Oct, 2012

1 commit


20 Jul, 2012

1 commit


20 Jun, 2012

3 commits


24 May, 2012

1 commit

  • As Heinz-Juergen Oertel pointed out 'CAN error frames' are a already defined
    term for the CAN protocol violation indication on the wire.

    To avoid confusion with the error messages created by CAN drivers available
    via CAN RAW sockets update the documentation and change the naming from
    'error frames' to 'error messages' or 'error message frames'.

    Signed-off-by: Oliver Hartkopp
    Signed-off-by: Marc Kleine-Budde

    Oliver Hartkopp
     

03 Feb, 2012

1 commit


02 Dec, 2011

1 commit


18 Oct, 2011

1 commit


17 Sep, 2011

1 commit

  • This patch adds a CAN Gateway/Router to route (and modify) CAN frames.

    It is based on the PF_CAN core infrastructure for msg filtering and msg
    sending and can optionally modify routed CAN frames on the fly.
    CAN frames can *only* be routed between CAN network interfaces (one hop).
    They can be modified with AND/OR/XOR/SET operations as configured by the
    netlink configuration interface known e.g. from iptables. From the netlink
    view this can-gw implements RTM_{NEW|DEL|GET}ROUTE for PF_CAN.

    The CAN specific userspace tool to manage CAN routing entries can be found in
    the CAN utils http://svn.berlios.de/wsvn/socketcan/trunk/can-utils/cangw.c
    at the SocketCAN SVN on BerliOS.

    Signed-off-by: Oliver Hartkopp
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     

27 Aug, 2011

1 commit


05 May, 2011

1 commit

  • commit 53914b67993c724cec585863755c9ebc8446e83b had the
    same message. That commit did put everything in place but
    did not make can_proto const itself.

    Signed-off-by: Kurt Van Dijck
    Acked-by: Oliver Hartkopp
    Signed-off-by: David S. Miller

    Kurt Van Dijck
     

11 Apr, 2011

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (34 commits)
    net: Add support for SMSC LAN9530, LAN9730 and LAN89530
    mlx4_en: Restoring RX buffer pointer in case of failure
    mlx4: Sensing link type at device initialization
    ipv4: Fix "Set rt->rt_iif more sanely on output routes."
    MAINTAINERS: add entry for Xen network backend
    be2net: Fix suspend/resume operation
    be2net: Rename some struct members for clarity
    pppoe: drop PPPOX_ZOMBIEs in pppoe_flush_dev
    dsa/mv88e6131: add support for mv88e6085 switch
    ipv6: Enable RFS sk_rxhash tracking for ipv6 sockets (v2)
    be2net: Fix a potential crash during shutdown.
    bna: Fix for handling firmware heartbeat failure
    can: mcp251x: Allow pass IRQ flags through platform data.
    smsc911x: fix mac_lock acquision before calling smsc911x_mac_read
    iwlwifi: accept EEPROM version 0x423 for iwl6000
    rt2x00: fix cancelling uninitialized work
    rtlwifi: Fix some warnings/bugs
    p54usb: IDs for two new devices
    wl12xx: fix potential buffer overflow in testmode nvs push
    zd1211rw: reset rx idle timer from tasklet
    ...

    Linus Torvalds
     

07 Apr, 2011

1 commit

  • When an interrupt occurs, the INT pin is driven low by the
    MCP251x controller (falling edge) but in some cases the INT
    pin can be connected to the MPU through a transistor or level
    translator which inverts this signal. In this case interrupt
    should be configured in rising edge.

    This patch adds support to pass the IRQ flags via
    mcp251x_platform_data.

    Signed-off-by: Enric Balletbo i Serra
    Acked-by: Wolfgang Grandegger
    Acked-by: Marc Kleine-Budde
    Signed-off-by: David S. Miller

    Enric Balletbo i Serra
     

31 Mar, 2011

1 commit


28 Mar, 2011

1 commit

  • can_ioctl is the only reason for struct proto to be non-const.
    script/check-patch.pl suggests struct proto be const.

    Setting the reference to the common can_ioctl() in all CAN protocols directly
    removes the need to make the struct proto writable in af_can.c

    Signed-off-by: Kurt Van Dijck
    Signed-off-by: Oliver Hartkopp
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     

18 Oct, 2010

1 commit

  • Since commit e446630c960946b5c1762e4eadb618becef599e7, i.e. v2.6.35-rc1,
    the mcp251x chip model can be selected via the modalias member in the
    struct spi_board_info. The driver stores the actual model in the
    struct mcp251x_platform_data.

    From the driver point of view the platform_data should be read only.
    Since all in-tree users of the mcp251x have already been converted to
    the modalias method, this patch moves the "model" member from the
    struct mcp251x_platform_data to the driver's private data structure.

    Signed-off-by: Marc Kleine-Budde
    Cc: Christian Pellegrin
    Cc: Marc Zyngier

    Marc Kleine-Budde
     

23 Jul, 2010

1 commit

  • This core is found on some Freescale SoCs and also some Coldfire
    SoCs. Support for Coldfire is missing though at the moment as
    they have an older revision of the core which does not have RX FIFO
    support.

    Signed-off-by: Sascha Hauer
    Signed-off-by: Marc Kleine-Budde
    Acked-by: Wolfgang Grandegger
    Signed-off-by: Marc Kleine-Budde

    Marc Kleine-Budde
     

18 May, 2010

1 commit

  • The member "clock" of struct "sja1000_platform_data" is documented as
    "CAN bus oscillator frequency in Hz" but it's actually used as the CAN
    clock frequency, which is half of it. To avoid further confusion, this
    patch fixes it by renaming the member to "osc_freq". That way, also
    non mainline users will notice the change. The platform code for the
    relevant boards is updated accordingly. Furthermore, pre-defined
    values are now used for the members "ocr" and "cdr".

    Signed-off-by: Wolfgang Grandegger
    Acked-by: Marc Kleine-Budde
    Signed-off-by: David S. Miller

    Wolfgang Grandegger
     

13 Apr, 2010

1 commit


31 Mar, 2010

1 commit

  • Chip model can now be selected directly by matching the modalias name
    (instead of filling the .model field in platform_data), and allows the
    module to be auto-loaded. Previous behaviour is of course still supported.

    Convert the two in-tree users to this feature (icontrol & zeus).
    Tested on an Zeus platform (mcp2515).

    Signed-off-by: Marc Zyngier
    Acked-by: Christian Pellegrin
    Cc: Edwin Peer
    Acked-by: Wolfgang Grandegger
    Signed-off-by: David S. Miller

    Marc Zyngier
     

26 Feb, 2010

2 commits


15 Jan, 2010

1 commit