05 Nov, 2013

1 commit

  • Conflicts:
    drivers/net/ethernet/emulex/benet/be.h
    drivers/net/netconsole.c
    net/bridge/br_private.h

    Three mostly trivial conflicts.

    The net/bridge/br_private.h conflict was a function signature (argument
    addition) change overlapping with the extern removals from Joe Perches.

    In drivers/net/netconsole.c we had one change adjusting a printk message
    whilst another changed "printk(KERN_INFO" into "pr_info(".

    Lastly, the emulex change was a new inline function addition overlapping
    with Joe Perches's extern removals.

    Signed-off-by: David S. Miller

    David S. Miller
     

01 Nov, 2013

1 commit

  • If we handle end of block messages with higher priority than a lost message,
    we can run into an endless interrupt loop.

    This is reproducable with a am335x processor and "cansequence -r" at 1Mbit.
    As soon as we loose a packet we can't escape from an interrupt loop.

    This patch fixes the problem by handling lost packets before EOB packets.

    Cc: linux-stable
    Signed-off-by: Markus Pargmann
    Signed-off-by: Marc Kleine-Budde

    Markus Pargmann
     

02 Oct, 2013

1 commit


21 Sep, 2013

1 commit


22 Aug, 2013

1 commit

  • This patch adds a type cast from 'unsigned int' to 'int'.

    'priv->instance' may less than zero, so need a type cast, the related
    warnings (allmodconfig, "EXTRA_CFLAGS=-W"):

    drivers/net/can/c_can/c_can_platform.c:198:3: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

    Signed-off-by: Chen Gang
    Signed-off-by: Marc Kleine-Budde

    Chen Gang
     

12 Jul, 2013

1 commit


12 Jun, 2013

1 commit

  • Commit 75096579c3ac ("lib: devres: Introduce devm_ioremap_resource()")
    introduced devm_ioremap_resource() and deprecated the use of
    devm_request_and_ioremap().

    Signed-off-by: Tushar Behera
    CC: netdev@vger.kernel.org
    CC: linux-can@vger.kernel.org
    CC: Marc Kleine-Budde
    CC: Wolfgang Grandegger
    Acked-by: Marc Kleine-Budde
    Signed-off-by: David S. Miller

    Tushar Behera
     

16 May, 2013

1 commit

  • The driver core clears the driver data to NULL after device_release
    or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
    (device-core: Ensure drvdata = NULL when no driver is bound).
    Thus, it is not needed to manually clear the device driver data to NULL.

    Signed-off-by: Jingoo Han
    Signed-off-by: Marc Kleine-Budde

    Jingoo Han
     

06 Feb, 2013

1 commit

  • Conflicts:
    drivers/net/ethernet/intel/e1000e/ethtool.c
    drivers/net/vmxnet3/vmxnet3_drv.c
    drivers/net/wireless/iwlwifi/dvm/tx.c
    net/ipv6/route.c

    The ipv6 route.c conflict is simple, just ignore the 'net' side change
    as we fixed the same problem in 'net-next' by eliminating cached
    neighbours from ipv6 routes.

    The e1000e conflict is an addition of a new statistic in the ethtool
    code, trivial.

    The vmxnet3 conflict is about one change in 'net' removing a guarding
    conditional, whilst in 'net-next' we had a netdev_info() conversion.

    The iwlwifi conflict is dealing with a WARN_ON() conversion in
    'net-next' vs. a revert happening in 'net'.

    Signed-off-by: David S. Miller

    David S. Miller
     

01 Feb, 2013

1 commit


30 Jan, 2013

1 commit


27 Jan, 2013

1 commit


26 Jan, 2013

2 commits


08 Dec, 2012

1 commit


04 Dec, 2012

1 commit

  • CONFIG_HOTPLUG is going away as an option. As result the __dev*
    markings will be going away.

    Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
    and __devexit.

    Signed-off-by: Bill Pemberton
    Cc: Wolfgang Grandegger
    Cc: Marc Kleine-Budde
    Cc: linux-can@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     

27 Nov, 2012

2 commits

  • This patch adds a MODULE_DEVICE_TABLE for the of and platform bindings, so that
    the module can be loaded automatically by udev.

    Signed-off-by: Marc Kleine-Budde

    Marc Kleine-Budde
     
  • Add D_CAN raminit support to C_CAN driver to enable D_CAN RAM,
    which holds all the message objects during transmission or
    receiving of data. This initialization/de-initialization should
    be done in synchronous with D_CAN clock.

    In case of AM335X-EVM (current user of D_CAN driver) message RAM is
    controlled through control module register for both instances. So
    control module register details is required to initialization or
    de-initialization of message RAM according to instance number.

    Control module memory resource is obtained from D_CAN dt node and
    instance number obtained from device tree aliases node.

    This patch was tested on AM335x-EVM along with pinctrl data addition
    patch, d_can dt aliases addition and control module data addition.
    pinctrl data addition is not added to am335x-evm.dts (only supports
    CPLD profile#0) because d_can1 is supported under CPLD profile#1.

    Signed-off-by: AnilKumar Ch
    [mkl: fix instance for non DT in probe, cleaned up raminit]
    Signed-off-by: Marc Kleine-Budde

    AnilKumar Ch
     

27 Sep, 2012

1 commit

  • This patch fixes an oops which occurs during unloading the driver.
    unregister_c_can_dev() is doing c_can/d_can module interrupts disable, which
    requires module clock enable. c_can/d_can interrupts enable/disable is handled
    properly in c_can_start and c_can_stop, so removing from
    unregister_c_can_dev().

    The problem was triggered by adding runtime PM support to the c_can driver by
    this commit:

    4cdd34b can: c_can: Add runtime PM support to Bosch C_CAN/D_CAN controller

    Signed-off-by: AnilKumar Ch
    Signed-off-by: Marc Kleine-Budde

    AnilKumar Ch
     

22 Sep, 2012

5 commits

  • Adopt pinctrl support to c_can driver based on c_can device
    pointer, pinctrl driver configure SoC pins to d_can mode
    according to definitions provided in .dts file.

    In device specific device tree file 'pinctrl-names = "default";'
    and 'pinctrl-0 = ;' needs to add to configure pins
    from c_can driver. d_can1_pins node contains the pinmux/config
    details of d_can L/H pins.

    Signed-off-by: AnilKumar Ch
    Acked-by: Tony Lindgren
    Signed-off-by: Marc Kleine-Budde

    AnilKumar Ch
     
  • Adds suspend resume support to DCAN driver which enables
    DCAN power down mode bit (PDR). Then DCAN will ack the local
    power-down mode by setting PDA bit in STATUS register.

    Signed-off-by: AnilKumar Ch
    Signed-off-by: Marc Kleine-Budde

    AnilKumar Ch
     
  • Add Runtime PM support to C_CAN/D_CAN controller. The runtime PM
    APIs control clocks for C_CAN/D_CAN IP and prevent access to the
    register of C_CAN/D_CAN IP when clock is turned off.

    Signed-off-by: AnilKumar Ch
    Signed-off-by: Marc Kleine-Budde

    AnilKumar Ch
     
  • Add device tree support to C_CAN/D_CAN controller and usage details
    are added to device tree documentation. Driver was tested on AM335x
    EVM.

    Signed-off-by: AnilKumar Ch
    For the of binding doc:
    Reviewed-by: Stephen Warren
    Signed-off-by: Marc Kleine-Budde

    AnilKumar Ch
     
  • Modify c_can device names from *_CAN_DEVTYPE to BOSCH_*_CAN to make
    use of same names for array indexes in c_can_id_table[] as well as
    device names.

    This patch also add indexes to c_can_id_table array.

    Signed-off-by: AnilKumar Ch
    Signed-off-by: Marc Kleine-Budde

    AnilKumar Ch
     

31 Jul, 2012

1 commit

  • With addition of dummy clk_*() calls for non CONFIG_HAVE_CLK cases in clk.h,
    there is no need to have clk code enclosed in #ifdef CONFIG_HAVE_CLK, #endif
    macros.

    Signed-off-by: Viresh Kumar
    Acked-by: David S. Miller
    Cc: Bhupesh Sharma
    Cc: Russell King
    Cc: Mike Turquette
    Cc: Sergei Shtylyov
    Cc: viresh kumar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Viresh Kumar
     

20 Jul, 2012

1 commit


21 Jun, 2012

1 commit

  • In commit:

    5b92da0 c_can_pci: generic module for C_CAN/D_CAN on PCI

    the c_can_pci driver has been added. It uses clk_*() functions
    resulting in a link error on archs without clock support. This
    patch removed these clk_() functions as these parts of the driver
    are not tested.

    Cc: Federico Vaga
    Signed-off-by: Marc Kleine-Budde
    Signed-off-by: David S. Miller

    Marc Kleine-Budde
     

20 Jun, 2012

1 commit


16 Jun, 2012

2 commits


07 Jun, 2012

2 commits

  • This patch adds the support for D_CAN controller driver to the existing
    C_CAN driver.

    Bosch D_CAN controller is a full-CAN implementation which is compliant
    to CAN protocol version 2.0 part A and B. Bosch D_CAN user manual can be
    obtained from: http://www.semiconductors.bosch.de/media/en/pdf/
    ipmodules_1/can/d_can_users_manual_111.pdf

    A new array is added for accessing the d_can registers, according to d_can
    controller register space.

    Current D_CAN implementation has following limitations, this is done
    to avoid large changes to the C_CAN driver.
    1. Message objects are limited to 32, 16 for RX and 16 for TX. C_CAN IP
    supports upto 32 message objects but in case of D_CAN we can configure
    upto 128 message objects.
    2. Using two 16bit reads/writes for accessing the 32bit D_CAN registers.
    3. These patches have been tested on little endian machine, there might
    be some hidden endian-related issues due to the nature of the accesses
    (32-bit registers accessed as 2 16-bit registers). However, I do not
    have a big-endian D_CAN implementation to confirm.

    Signed-off-by: AnilKumar Ch
    Signed-off-by: Marc Kleine-Budde

    AnilKumar Ch
     
  • c_can uses overlay structure for accessing c_can module registers.
    With this kind of implementation it is difficult to add one more ip
    which is similar to c_can in functionality but different register
    offsets.

    This patch changes the overlay structure implementation to an array
    with register offset as index. This way we can overcome the above
    limitation.

    Signed-off-by: AnilKumar Ch
    Signed-off-by: Marc Kleine-Budde

    AnilKumar Ch
     

04 Jun, 2012

3 commits

  • Fix the issue of C_CAN interrupts getting disabled forever when canconfig
    utility is used multiple times. According to NAPI usage we disable all
    the hardware interrupts in ISR and re-enable them in poll(). Current
    implementation calls napi_enable() after hardware interrupts are enabled.
    If we get any interrupts between these two steps then we do not process
    those interrupts because napi is not enabled. Mostly these interrupts
    come because of STATUS is not 0x7 or ERROR interrupts. If napi_enable()
    happens before HW interrupts enabled then c_can_poll() function will be
    called eventual re-enabling.

    This patch moves the napi_enable() call before interrupts enabled.

    Cc: stable@kernel.org # 2.6.39+
    Signed-off-by: AnilKumar Ch
    Acked-by: Wolfgang Grandegger
    Signed-off-by: Marc Kleine-Budde

    AnilKumar Ch
     
  • This patch fixes an interrupt thrash issue with c_can driver.

    In c_can_isr() function interrupts are disabled and enabled only in
    c_can_poll() function. c_can_isr() & c_can_poll() both read the
    irqstatus flag. However, irqstatus is always read as 0 in c_can_poll()
    because all C_CAN interrupts are disabled in c_can_isr(). This causes
    all interrupts to be re-enabled in c_can_poll() which in turn causes
    another interrupt since the event is not really handled. This keeps
    happening causing a flood of interrupts.

    To fix this, read the irqstatus register in isr and use the same cached
    value in the poll function.

    Cc: stable@kernel.org # 2.6.39+
    Signed-off-by: AnilKumar Ch
    Acked-by: Wolfgang Grandegger
    Signed-off-by: Marc Kleine-Budde

    AnilKumar Ch
     
  • This patch fixes an issue with transmit routine, which causes
    "can_put_echo_skb: BUG! echo_skb is occupied!" message when
    using "cansequence -p" on D_CAN controller.

    In c_can driver, while transmitting packets tx_echo flag holds
    the no of can frames put for transmission into the hardware.

    As the comment above c_can_do_tx() indicates, if we find any packet
    which is not transmitted then we should stop looking for more.
    In the current implementation this is not taken care of causing the
    said message.

    Also, fix the condition used to find if the packet is transmitted
    or not. Current code skips the first tx message object and ends up
    checking one extra invalid object.

    While at it, fix the comment on top of c_can_do_tx() to use the
    terminology "packet" instead of "package" since it is more
    standard.

    Cc: stable@kernel.org # 2.6.39+
    Signed-off-by: AnilKumar Ch
    Acked-by: Wolfgang Grandegger
    Signed-off-by: Marc Kleine-Budde

    AnilKumar Ch
     

29 Nov, 2011

1 commit

  • This patch converts the drivers in drivers/net/can/* to use the
    module_platform_driver() macro which makes the code smaller and a bit
    simpler.

    Cc: Wolfgang Grandegger
    Cc: "David S. Miller"
    Cc: Bhupesh Sharma
    Cc: Jiri Kosina
    Cc: Grant Likely
    Cc: Anatolij Gustschin
    Cc: Paul Bolle
    Cc: Kurt Van Dijck
    Cc: Alexey Dobriyan
    Signed-off-by: Axel Lin
    Acked-by: Marc Kleine-Budde
    Signed-off-by: David S. Miller

    Axel Lin
     

24 Jul, 2011

1 commit


24 Jun, 2011

1 commit


31 Mar, 2011

1 commit


28 Mar, 2011

1 commit

  • The current SocketCAN implementation for the Bosch c_can cell doesn't
    account the TX bytes correctly, because it calls
    c_can_inval_msg_object() (which clears the msg ctrl register) before
    reading the DLC value:

    for (/* nix */; (priv->tx_next - priv->tx_echo) > 0; priv->tx_echo++) {
    msg_obj_no = get_tx_echo_msg_obj(priv);
    c_can_inval_msg_object(dev, 0, msg_obj_no);
    val = c_can_read_reg32(priv, &priv->regs->txrqst1);
    if (!(val & (1 << msg_obj_no))) {
    can_get_echo_skb(dev,
    msg_obj_no - C_CAN_MSG_OBJ_TX_FIRST);
    stats->tx_bytes += priv->read_reg(priv,
    &priv->regs->ifregs[0].msg_cntrl)
    & IF_MCONT_DLC_MASK;
    stats->tx_packets++;
    }
    }

    So, we will always read 0 for the DLC value and "ifconfig" will report
    *0* TX Bytes.

    The fix is quite easy: Just move c_can_inval_msg_object() to the end of
    the if() statement. So:
    * We only call c_can_inval_msg_object() if the message was
    actually transmitted
    * We read out the DLC value _before_ clearing the msg ctrl
    register

    Signed-off-by: Jan Altenberg
    Acked-by: Kurt Van Dijck
    Acked-by: Wolfgang Grandegger
    Signed-off-by: David S. Miller

    Jan Altenberg