lkml.org 
[lkml]   [2019]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.19 044/125] can: flexcan: disable completely the ECC mechanism
    Date
    From: Joakim Zhang <qiangqing.zhang@nxp.com>

    commit 5e269324db5adb2f5f6ec9a93a9c7b0672932b47 upstream.

    The ECC (memory error detection and correction) mechanism can be
    activated or not, controlled by the ECCDIS bit in CAN_MECR. When
    disabled, updates on indications and reporting registers are stopped.
    So if want to disable ECC completely, had better assert ECCDIS bit, not
    just mask the related interrupts.

    Fixes: cdce844865be ("can: flexcan: add vf610 support for FlexCAN")
    Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
    Cc: linux-stable <stable@vger.kernel.org>
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/net/can/flexcan.c | 1 +
    1 file changed, 1 insertion(+)

    --- a/drivers/net/can/flexcan.c
    +++ b/drivers/net/can/flexcan.c
    @@ -1048,6 +1048,7 @@ static int flexcan_chip_start(struct net
    reg_mecr = priv->read(&regs->mecr);
    reg_mecr &= ~FLEXCAN_MECR_ECRWRDIS;
    priv->write(reg_mecr, &regs->mecr);
    + reg_mecr |= FLEXCAN_MECR_ECCDIS;
    reg_mecr &= ~(FLEXCAN_MECR_NCEFAFRZ | FLEXCAN_MECR_HANCEI_MSK |
    FLEXCAN_MECR_FANCEI_MSK);
    priv->write(reg_mecr, &regs->mecr);

    \
     
     \ /
      Last update: 2019-11-11 19:45    [W:5.804 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site