diff mbox

[3.8.y.z,extended,stable] Patch "can: flexcan: fix flexcan_chip_start() on imx6" has been added to staging queue

Message ID 1381351882-8368-1-git-send-email-kamal@canonical.com
State New
Headers show

Commit Message

Kamal Mostafa Oct. 9, 2013, 8:51 p.m. UTC
This is a note to let you know that I have just added a patch titled

    can: flexcan: fix flexcan_chip_start() on imx6

to the linux-3.8.y-queue branch of the 3.8.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.8.y-queue

This patch is scheduled to be released in version 3.8.13.11.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.8.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

------

From 135726d29a4ebaf3285bc4fa0d3346cb75679485 Mon Sep 17 00:00:00 2001
From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Fri, 27 Sep 2013 12:15:05 +0200
Subject: can: flexcan: fix flexcan_chip_start() on imx6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

commit 0d1862ea1a5bb876cf05555a7307080cb75bf379 upstream.

In the flexcan_chip_start() function first the flexcan core is going through
the soft reset sequence, then the RX FIFO is enabled.

With the hardware is put into FIFO mode, message buffers 1...7 are reserved by
the FIFO engine. The remaining message buffers are in reset default values.
This patch removes the bogus initialization of the message buffers, as it
causes an imprecise external abort on imx6.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Tested-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/net/can/flexcan.c | 12 ------------
 1 file changed, 12 deletions(-)

--
1.8.1.2

Comments

Marc Kleine-Budde Oct. 9, 2013, 9:14 p.m. UTC | #1
On 10/09/2013 10:51 PM, Kamal Mostafa wrote:
> This is a note to let you know that I have just added a patch titled
> 
>     can: flexcan: fix flexcan_chip_start() on imx6
> 
> to the linux-3.8.y-queue branch of the 3.8.y.z extended stable tree 
> which can be found at:
> 
>  http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.8.y-queue
> 
> This patch is scheduled to be released in version 3.8.13.11.
> 
> If you, or anyone else, feels it should not be added to this tree, please 
> reply to this email.

Please postpone this patch, as it fixes mx6, but introduces another
problem for the other SoCs.

A fix for this regression is on its way upstream:

d5a7b40 can: flexcan: flexcan_chip_start: fix regression, mark one MB for TX and abort pending TX

regards,
Marc
Kamal Mostafa Oct. 9, 2013, 9:43 p.m. UTC | #2
On Wed, 2013-10-09 at 23:14 +0200, Marc Kleine-Budde wrote:
> On 10/09/2013 10:51 PM, Kamal Mostafa wrote:
> > This is a note to let you know that I have just added a patch titled
> > 
> >     can: flexcan: fix flexcan_chip_start() on imx6
> > 
> > to the linux-3.8.y-queue branch of the 3.8.y.z extended stable tree 
> > which can be found at:
> > 
> >  http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.8.y-queue
> > 
> > This patch is scheduled to be released in version 3.8.13.11.
> > 
> > If you, or anyone else, feels it should not be added to this tree, please 
> > reply to this email.
> 
> Please postpone this patch, as it fixes mx6, but introduces another
> problem for the other SoCs.
> 
> A fix for this regression is on its way upstream:
> 
> d5a7b40 can: flexcan: flexcan_chip_start: fix regression, mark one MB for TX and abort pending TX
> 


Ok, I've dropped "can: flexcan: fix flexcan_chip_start() on imx6" from
the 3.8-stable queue.

Thanks Marc!

 -Kamal
Marc Kleine-Budde Oct. 23, 2013, 2:56 p.m. UTC | #3
On 10/09/2013 11:43 PM, Kamal Mostafa wrote:
> On Wed, 2013-10-09 at 23:14 +0200, Marc Kleine-Budde wrote:
>> On 10/09/2013 10:51 PM, Kamal Mostafa wrote:
>>> This is a note to let you know that I have just added a patch titled
>>>
>>>     can: flexcan: fix flexcan_chip_start() on imx6
>>>
>>> to the linux-3.8.y-queue branch of the 3.8.y.z extended stable tree 
>>> which can be found at:
>>>
>>>  http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.8.y-queue
>>>
>>> This patch is scheduled to be released in version 3.8.13.11.
>>>
>>> If you, or anyone else, feels it should not be added to this tree, please 
>>> reply to this email.
>>
>> Please postpone this patch, as it fixes mx6, but introduces another
>> problem for the other SoCs.
>>
>> A fix for this regression is on its way upstream:
>>
>> d5a7b40 can: flexcan: flexcan_chip_start: fix regression, mark one MB for TX and abort pending TX
>>
> 
> 
> Ok, I've dropped "can: flexcan: fix flexcan_chip_start() on imx6" from
> the 3.8-stable queue.

Both patches are now in linus/master, please queue these for the
extended stable trees:

e358784 can: flexcan: fix mx28 detection by rearanging OF match table
d5a7b40 can: flexcan: flexcan_chip_start: fix regression, mark one MB for TX and abort pending TX

regards,
Marc
Marc Kleine-Budde Oct. 23, 2013, 3:01 p.m. UTC | #4
On 10/23/2013 04:56 PM, Marc Kleine-Budde wrote:
> On 10/09/2013 11:43 PM, Kamal Mostafa wrote:
>> On Wed, 2013-10-09 at 23:14 +0200, Marc Kleine-Budde wrote:
>>> On 10/09/2013 10:51 PM, Kamal Mostafa wrote:
>>>> This is a note to let you know that I have just added a patch titled
>>>>
>>>>     can: flexcan: fix flexcan_chip_start() on imx6
>>>>
>>>> to the linux-3.8.y-queue branch of the 3.8.y.z extended stable tree 
>>>> which can be found at:
>>>>
>>>>  http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.8.y-queue
>>>>
>>>> This patch is scheduled to be released in version 3.8.13.11.
>>>>
>>>> If you, or anyone else, feels it should not be added to this tree, please 
>>>> reply to this email.
>>>
>>> Please postpone this patch, as it fixes mx6, but introduces another
>>> problem for the other SoCs.
>>>
>>> A fix for this regression is on its way upstream:
>>>
>>> d5a7b40 can: flexcan: flexcan_chip_start: fix regression, mark one MB for TX and abort pending TX
>>>
>>
>>
>> Ok, I've dropped "can: flexcan: fix flexcan_chip_start() on imx6" from
>> the 3.8-stable queue.
> 
> Both patches are now in linus/master, please queue these for the
> extended stable trees:
> 
> e358784 can: flexcan: fix mx28 detection by rearanging OF match table
> d5a7b40 can: flexcan: flexcan_chip_start: fix regression, mark one MB for TX and abort pending TX

Please ignore that above.
Damn, probably had too much jummy Scottish food :) The correct patches are of course:

d5a7b40 can: flexcan: flexcan_chip_start: fix regression, mark one MB for TX and abort pending TX
0d1862e can: flexcan: fix flexcan_chip_start() on imx6

Marc
diff mbox

Patch

diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index 0289a6d..15d5abb 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -707,7 +707,6 @@  static int flexcan_chip_start(struct net_device *dev)
 {
 	struct flexcan_priv *priv = netdev_priv(dev);
 	struct flexcan_regs __iomem *regs = priv->base;
-	unsigned int i;
 	int err;
 	u32 reg_mcr, reg_ctrl;

@@ -777,17 +776,6 @@  static int flexcan_chip_start(struct net_device *dev)
 	netdev_dbg(dev, "%s: writing ctrl=0x%08x", __func__, reg_ctrl);
 	flexcan_write(reg_ctrl, &regs->ctrl);

-	for (i = 0; i < ARRAY_SIZE(regs->cantxfg); i++) {
-		flexcan_write(0, &regs->cantxfg[i].can_ctrl);
-		flexcan_write(0, &regs->cantxfg[i].can_id);
-		flexcan_write(0, &regs->cantxfg[i].data[0]);
-		flexcan_write(0, &regs->cantxfg[i].data[1]);
-
-		/* put MB into rx queue */
-		flexcan_write(FLEXCAN_MB_CNT_CODE(0x4),
-			&regs->cantxfg[i].can_ctrl);
-	}
-
 	/* acceptance mask/acceptance code (accept everything) */
 	flexcan_write(0x0, &regs->rxgmask);
 	flexcan_write(0x0, &regs->rx14mask);