From mboxrd@z Thu Jan 1 00:00:00 1970 From: Viktor Babrian Subject: Re: [PATCH 3.19-rc3] c_can: end transmission on network stop Date: Sun, 18 Jan 2015 20:01:40 +0100 (CET) Message-ID: References: <9c72f211-becc-4c0f-94f6-0700dfb1195e@GRBSR0089.marel.net> <1735533.0yOonAfCy1@heinz> <54B472B2.4010300@optusnet.com.au> <20150113153243.26859.47218@shannon> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Return-path: Received: from mx1.renyi.hu ([193.224.79.18]:38010 "EHLO smtp.renyi.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751364AbbARTBl (ORCPT ); Sun, 18 Jan 2015 14:01:41 -0500 In-Reply-To: Sender: linux-can-owner@vger.kernel.org List-ID: To: linux-can@vger.kernel.org Cc: Andri Yngvason , Tom Evans , Marc Kleine-Budde Controller put into init mode in betwork stop to end pending transmission. The issue is observed in cases when transmitted frame is not acked. Signed-off-by: Viktor Babrian --- --- linux-3.19-rc3/drivers/net/can/c_can/c_can.c 2015-01-06 02:05:20.000000000 +0100 +++ linux/drivers/net/can/c_can/c_can.c 2015-01-18 18:07:09.000000000 +0100 @@ -615,6 +615,9 @@ static void c_can_stop(struct net_device c_can_irq_control(priv, false); + /* put ctrl to init on stop to end ongoing transmission */ + priv->write_reg(priv, C_CAN_CTRL_REG, CONTROL_INIT); + /* deactivate pins */ pinctrl_pm_select_sleep_state(dev->dev.parent); priv->can.state = CAN_STATE_STOPPED;