<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/net/can, branch v3.4.92</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/net/can?h=v3.4.92</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/net/can?h=v3.4.92'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-06-07T23:02:15Z</updated>
<entry>
<title>can: sja1000: fix {pre,post}_irq() handling and IRQ handler return value</title>
<updated>2014-06-07T23:02:15Z</updated>
<author>
<name>Oliver Hartkopp</name>
<email>socketcan@hartkopp.net</email>
</author>
<published>2013-11-21T17:03:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f7c02bf438f74ce4c7a8fb0c79cd435d85a795be'/>
<id>urn:sha1:f7c02bf438f74ce4c7a8fb0c79cd435d85a795be</id>
<content type='text'>
commit 2fea6cd303c0d0cd9067da31d873b6a6d5bd75e7 upstream.

This patch fixes the issue that the sja1000_interrupt() function may have
returned IRQ_NONE without processing the optional pre_irq() and post_irq()
function before. Further the irq processing counter 'n' is moved to the end of
the while statement to return correct IRQ_[NONE|HANDLED] values at error
conditions.

Reported-by: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Acked-by: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Signed-off-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
[bwh: Backported to 3.2: s/SJA1000_IER/REG_IER/; s/SJA1000_IR/REG_IR/]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Cc: Qiang Huang &lt;h.huangqiang@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>can: c_can: Set reserved bit in IFx_MASK2 to 1 on write</title>
<updated>2014-06-07T23:02:07Z</updated>
<author>
<name>Alexander Stein</name>
<email>alexander.stein@systec-electronic.com</email>
</author>
<published>2012-12-13T09:06:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c7b5c6cd19c6ecfe7380c76b88ffdac349d60589'/>
<id>urn:sha1:c7b5c6cd19c6ecfe7380c76b88ffdac349d60589</id>
<content type='text'>
commit 2bd3bc4e8472424f1a6009825397639a8968920a upstream.

According to C_CAN documentation, the reserved bit in IFx_MASK2 register is
fixed 1.

Signed-off-by: Alexander Stein &lt;alexander.stein@systec-electronic.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Cc: Qiang Huang &lt;h.huangqiang@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>can: flexcan: flexcan_open(): fix error path if flexcan_chip_start() fails</title>
<updated>2014-03-24T04:37:07Z</updated>
<author>
<name>Marc Kleine-Budde</name>
<email>mkl@pengutronix.de</email>
</author>
<published>2014-02-28T13:52:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f8d17b6ff32a85be53f8055af5b35dc0cb96f62a'/>
<id>urn:sha1:f8d17b6ff32a85be53f8055af5b35dc0cb96f62a</id>
<content type='text'>
commit 7e9e148af01ef388efb6e2490805970be4622792 upstream.

If flexcan_chip_start() in flexcan_open() fails, the interrupt is not freed,
this patch adds the missing cleanup.

Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>can: flexcan: fix flexcan_chip_start() on imx6</title>
<updated>2013-12-04T18:50:14Z</updated>
<author>
<name>Marc Kleine-Budde</name>
<email>mkl@pengutronix.de</email>
</author>
<published>2013-09-27T10:15:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=799ed0d9c5ee00600823c5762a9e5b20776a1391'/>
<id>urn:sha1:799ed0d9c5ee00600823c5762a9e5b20776a1391</id>
<content type='text'>
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 &lt;LW@KARO-electronics.de&gt;
Tested-by: Lothar Waßmann &lt;LW@KARO-electronics.de&gt;
[mkl: adjusted context for stable]
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>can: c_can: Fix RX message handling, handle lost message before EOB</title>
<updated>2013-11-29T18:50:32Z</updated>
<author>
<name>Markus Pargmann</name>
<email>mpa@pengutronix.de</email>
</author>
<published>2013-10-28T08:54:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=06d5a745ee1257f4dbf49385bf63e2b7554cc9b7'/>
<id>urn:sha1:06d5a745ee1257f4dbf49385bf63e2b7554cc9b7</id>
<content type='text'>
commit 5d0f801a2ccec3b1fdabc3392c8d99ed0413d216 upstream.

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.

Signed-off-by: Markus Pargmann &lt;mpa@pengutronix.de&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>can: flexcan: flexcan_chip_start: fix regression, mark one MB for TX and abort pending TX</title>
<updated>2013-11-13T03:01:48Z</updated>
<author>
<name>Marc Kleine-Budde</name>
<email>mkl@pengutronix.de</email>
</author>
<published>2013-10-04T08:52:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f49c173bb693fa2aea6c96c931f9449ce4885d7b'/>
<id>urn:sha1:f49c173bb693fa2aea6c96c931f9449ce4885d7b</id>
<content type='text'>
commit d5a7b406c529e4595ce03dc8f6dcf7fa36f106fa upstream.

In patch

    0d1862e can: flexcan: fix flexcan_chip_start() on imx6

the loop in flexcan_chip_start() that iterates over all mailboxes after the
soft reset of the CAN core was removed. This loop put all mailboxes (even the
ones marked as reserved 1...7) into EMPTY/INACTIVE mode. On mailboxes 8...63,
this aborts any pending TX messages.

After a cold boot there is random garbage in the mailboxes, which leads to
spontaneous transmit of CAN frames during first activation. Further if the
interface was disabled with a pending message (usually due to an error
condition on the CAN bus), this message is retransmitted after enabling the
interface again.

This patch fixes the regression by:
1) Limiting the maximum number of used mailboxes to 8, 0...7 are used by the RX
FIFO, 8 is used by TX.
2) Marking the TX mailbox as EMPTY/INACTIVE, so that any pending TX of that
mailbox is aborted.

Cc: Lothar Waßmann &lt;LW@KARO-electronics.de&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>can: dev: fix nlmsg size calculation in can_get_size()</title>
<updated>2013-11-04T12:23:40Z</updated>
<author>
<name>Marc Kleine-Budde</name>
<email>mkl@pengutronix.de</email>
</author>
<published>2013-10-05T19:25:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bbcb20aaca3bbbfcb8c53c3587620d59320f805f'/>
<id>urn:sha1:bbcb20aaca3bbbfcb8c53c3587620d59320f805f</id>
<content type='text'>
[ Upstream commit fe119a05f8ca481623a8d02efcc984332e612528 ]

This patch fixes the calculation of the nlmsg size, by adding the missing
nla_total_size().

Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>can: pcan_usb: fix wrong memcpy() bytes length</title>
<updated>2013-08-20T15:26:28Z</updated>
<author>
<name>Stephane Grosjean</name>
<email>s.grosjean@peak-system.com</email>
</author>
<published>2013-08-09T09:44:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2efb739b6c863a77cfc362b69f755c32805a5fc2'/>
<id>urn:sha1:2efb739b6c863a77cfc362b69f755c32805a5fc2</id>
<content type='text'>
commit 3c322a56b01695df15c70bfdc2d02e0ccd80654e upstream.

Fix possibly wrong memcpy() bytes length since some CAN records received from
PCAN-USB could define a DLC field in range [9..15].
In that case, the real DLC value MUST be used to move forward the record pointer
but, only 8 bytes max. MUST be copied into the data field of the struct
can_frame object of the skb given to the network core.

Signed-off-by: Stephane Grosjean &lt;s.grosjean@peak-system.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>can: sja1000: fix handling on dt properties on little endian systems</title>
<updated>2013-04-26T04:19:54Z</updated>
<author>
<name>Christoph Fritz</name>
<email>chf.fritz@googlemail.com</email>
</author>
<published>2013-04-11T19:32:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4f969dd6ce2941f9ce917684a058af2d7f6c77e9'/>
<id>urn:sha1:4f969dd6ce2941f9ce917684a058af2d7f6c77e9</id>
<content type='text'>
commit 0443de5fbf224abf41f688d8487b0c307dc5a4b4 upstream.

To get correct endianes on little endian cpus (like arm) while reading device
tree properties, this patch replaces of_get_property() with
of_property_read_u32(). While there use of_property_read_bool() for the
handling of the boolean "nxp,no-comparator-bypass" property.

Signed-off-by: Christoph Fritz &lt;chf.fritz@googlemail.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>can: sja1000: fix define conflict on SH</title>
<updated>2013-04-05T17:04:16Z</updated>
<author>
<name>Marc Kleine-Budde</name>
<email>mkl@pengutronix.de</email>
</author>
<published>2013-03-27T10:36:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bb4619ed5fd25a8ec2dd5f8841c9e3662539af26'/>
<id>urn:sha1:bb4619ed5fd25a8ec2dd5f8841c9e3662539af26</id>
<content type='text'>
commit f901b6bc404b67d96eca739857c097e022727b71 upstream.

Thias patch fixes a define conflict between the SH architecture and the sja1000
driver:

    drivers/net/can/sja1000/sja1000.h:59:0: warning:
        "REG_SR" redefined [enabled by default]
    arch/sh/include/asm/ptrace_32.h:25:0: note:
         this is the location of the previous definition

A SJA1000_ prefix is added to the offending sja1000 define only, to make a
minimal patch suited for stable. A later patch will add a SJA1000_ prefix to
all defines in sja1000.h.

Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
