<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/net/can, branch linux-2.6.33.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>can: Fix SJA1000 command register writes on SMP systems</title>
<updated>2010-07-05T18:15:46+00:00</updated>
<author>
<name>Oliver Hartkopp</name>
<email>socketcan@hartkopp.net</email>
</author>
<published>2010-05-18T21:03:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6bf0eb89c2aa017d5b9d5a859e53cf9c39fd92c3'/>
<id>6bf0eb89c2aa017d5b9d5a859e53cf9c39fd92c3</id>
<content type='text'>
commit 57c8a456640fa3ca777652f11f2db4179a3e66b6 upstream.

The SJA1000 command register is concurrently written in the rx-path to free
the receive buffer _and_ in the tx-path to start the transmission.

The SJA1000 data sheet, 6.4.4 COMMAND REGISTER (CMR) states:
"Between two commands at least one internal clock cycle is needed in
order to proceed. The internal clock is half of the external oscillator
frequency."

On SMP systems the current implementation leads to a write stall in the
tx-path, which can be solved by adding some general locking and some time
to settle the write_reg() operation for the command register.

Thanks to Klaus Hitschler for the original fix and detailed problem
description.

This patch applies on net-2.6 and (with some offsets) on net-next-2.6 .

Signed-off-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Acked-by: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 57c8a456640fa3ca777652f11f2db4179a3e66b6 upstream.

The SJA1000 command register is concurrently written in the rx-path to free
the receive buffer _and_ in the tx-path to start the transmission.

The SJA1000 data sheet, 6.4.4 COMMAND REGISTER (CMR) states:
"Between two commands at least one internal clock cycle is needed in
order to proceed. The internal clock is half of the external oscillator
frequency."

On SMP systems the current implementation leads to a write stall in the
tx-path, which can be solved by adding some general locking and some time
to settle the write_reg() operation for the command register.

Thanks to Klaus Hitschler for the original fix and detailed problem
description.

This patch applies on net-2.6 and (with some offsets) on net-next-2.6 .

Signed-off-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Acked-by: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>can: fix bfin_can build error after alloc_candev() change</title>
<updated>2010-04-01T23:01:22+00:00</updated>
<author>
<name>Barry Song</name>
<email>barry.song@analog.com</email>
</author>
<published>2010-03-08T20:13:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c2b2df61e78aa5570473e2d46db6d88f5071b520'/>
<id>c2b2df61e78aa5570473e2d46db6d88f5071b520</id>
<content type='text'>
commit e9dcd1613f0ac0b3573b7d813a2c5672cd8302eb upstream.

Looks like commit a6e4bc530403 didn't include updates to drivers so the
Blackfin CAN driver fails to build now.

Signed-off-by: Barry Song &lt;barry.song@analog.com&gt;
Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Acked-by: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit e9dcd1613f0ac0b3573b7d813a2c5672cd8302eb upstream.

Looks like commit a6e4bc530403 didn't include updates to drivers so the
Blackfin CAN driver fails to build now.

Signed-off-by: Barry Song &lt;barry.song@analog.com&gt;
Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Acked-by: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>drivers/net/can: Correct NULL test</title>
<updated>2010-01-04T05:42:49+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>julia@diku.dk</email>
</author>
<published>2009-12-27T11:27:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ce739b473ce12d5ef067b39b8637bfd2b2174a15'/>
<id>ce739b473ce12d5ef067b39b8637bfd2b2174a15</id>
<content type='text'>
Test the just-allocated value for NULL rather than some other value.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@@
expression x,y;
statement S;
@@

x = \(kmalloc\|kcalloc\|kzalloc\)(...);
(
if ((x) == NULL) S
|
if (
-   y
+   x
       == NULL)
 S
)
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Acked-by: Oliver Hartkopp &lt;oliver@hartkopp.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Test the just-allocated value for NULL rather than some other value.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@@
expression x,y;
statement S;
@@

x = \(kmalloc\|kcalloc\|kzalloc\)(...);
(
if ((x) == NULL) S
|
if (
-   y
+   x
       == NULL)
 S
)
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Acked-by: Oliver Hartkopp &lt;oliver@hartkopp.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>can/at91: don't check platform_get_irq's return value against zero</title>
<updated>2009-12-19T04:31:56+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2009-12-19T04:31:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4773a47d8a564633cd80b94df397e91e946893e2'/>
<id>4773a47d8a564633cd80b94df397e91e946893e2</id>
<content type='text'>
platform_get_irq returns -ENXIO on failure, so !irq was probably
always true.  Better use (int)irq &lt;= 0.  Note that a return value of
zero is still handled as error even though this could mean irq0.

This is a followup to 305b3228f9ff4d59f49e6d34a7034d44ee8ce2f0 that
changed the return value of platform_get_irq from 0 to -ENXIO on error.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
platform_get_irq returns -ENXIO on failure, so !irq was probably
always true.  Better use (int)irq &lt;= 0.  Note that a return value of
zero is still handled as error even though this could mean irq0.

This is a followup to 305b3228f9ff4d59f49e6d34a7034d44ee8ce2f0 that
changed the return value of platform_get_irq from 0 to -ENXIO on error.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>can: CAN_MCP251X should depend on HAS_DMA</title>
<updated>2009-12-14T03:56:36+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2009-12-13T09:11:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=231d52a7bec6d141883d81dbb5516bff4a07533b'/>
<id>231d52a7bec6d141883d81dbb5516bff4a07533b</id>
<content type='text'>
When building for Sun 3:

drivers/net/can/mcp251x.c:1074: undefined reference to `dma_free_coherent'
drivers/net/can/mcp251x.c:976: undefined reference to `dma_alloc_coherent'
drivers/net/can/mcp251x.c:1050: undefined reference to `dma_free_coherent'

Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When building for Sun 3:

drivers/net/can/mcp251x.c:1074: undefined reference to `dma_free_coherent'
drivers/net/can/mcp251x.c:976: undefined reference to `dma_alloc_coherent'
drivers/net/can/mcp251x.c:1050: undefined reference to `dma_free_coherent'

Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>can: Fix data length code handling in rx path</title>
<updated>2009-12-14T03:47:42+00:00</updated>
<author>
<name>Oliver Hartkopp</name>
<email>oliver@hartkopp.net</email>
</author>
<published>2009-12-12T04:13:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c7cd606f60e7679c7f9eee7010f02a6f000209c1'/>
<id>c7cd606f60e7679c7f9eee7010f02a6f000209c1</id>
<content type='text'>
A valid CAN dataframe can have a data length code (DLC) of 0 .. 8 data bytes.

When reading the CAN controllers register the 4-bit value may contain values
from 0 .. 15 which may exceed the reserved space in the socket buffer!

The ISO 11898-1 Chapter 8.4.2.3 (DLC field) says that register values &gt; 8
should be reduced to 8 without any error reporting or frame drop.

This patch introduces a new helper macro to cast a given 4-bit data length
code (dlc) to __u8 and ensure the DLC value to be max. 8 bytes.

The different handlings in the rx path of the CAN netdevice drivers are fixed.

Signed-off-by: Oliver Hartkopp &lt;oliver@hartkopp.net&gt;
Signed-off-by: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A valid CAN dataframe can have a data length code (DLC) of 0 .. 8 data bytes.

When reading the CAN controllers register the 4-bit value may contain values
from 0 .. 15 which may exceed the reserved space in the socket buffer!

The ISO 11898-1 Chapter 8.4.2.3 (DLC field) says that register values &gt; 8
should be reduced to 8 without any error reporting or frame drop.

This patch introduces a new helper macro to cast a given 4-bit data length
code (dlc) to __u8 and ensure the DLC value to be max. 8 bytes.

The different handlings in the rx path of the CAN netdevice drivers are fixed.

Signed-off-by: Oliver Hartkopp &lt;oliver@hartkopp.net&gt;
Signed-off-by: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>can: add the driver for Analog Devices Blackfin on-chip CAN controllers</title>
<updated>2009-12-11T23:07:58+00:00</updated>
<author>
<name>Barry Song</name>
<email>21cnbao@gmail.com</email>
</author>
<published>2009-12-10T23:46:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=bbb84619c378414118fd4f1778125cd246c71e53'/>
<id>bbb84619c378414118fd4f1778125cd246c71e53</id>
<content type='text'>
Signed-off-by: Barry Song &lt;21cnbao@gmail.com&gt;
Signed-off-by: H.J. Oertel &lt;oe@port.de&gt;
Signed-off-by: Wolfgang Grandegger &lt;wg@grandegger.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Barry Song &lt;21cnbao@gmail.com&gt;
Signed-off-by: H.J. Oertel &lt;oe@port.de&gt;
Signed-off-by: Wolfgang Grandegger &lt;wg@grandegger.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers/net: Move &amp;&amp; and || to end of previous line</title>
<updated>2009-12-03T21:18:01+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2009-12-03T07:58:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8e95a2026f3b43f7c3d676adaccd2de9532e8dcc'/>
<id>8e95a2026f3b43f7c3d676adaccd2de9532e8dcc</id>
<content type='text'>
Only files where David Miller is the primary git-signer.
wireless, wimax, ixgbe, etc are not modified.

Compile tested x86 allyesconfig only
Not all files compiled (not x86 compatible)

Added a few &gt; 80 column lines, which I ignored.
Existing checkpatch complaints ignored.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only files where David Miller is the primary git-signer.
wireless, wimax, ixgbe, etc are not modified.

Compile tested x86 allyesconfig only
Not all files compiled (not x86 compatible)

Added a few &gt; 80 column lines, which I ignored.
Existing checkpatch complaints ignored.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers/net/can: remove exceptional &amp; on function name</title>
<updated>2009-11-18T18:48:35+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>julia@diku.dk</email>
</author>
<published>2009-11-18T08:20:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4c9ba61e9e0212fd79da9a26f7b3d47de4a56a24'/>
<id>4c9ba61e9e0212fd79da9a26f7b3d47de4a56a24</id>
<content type='text'>
In this file, function names are otherwise used as pointers without &amp;.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &amp;f
+ f
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In this file, function names are otherwise used as pointers without &amp;.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &amp;f
+ f
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>can: fix setting mcp251x bit timing on open</title>
<updated>2009-11-18T13:03:18+00:00</updated>
<author>
<name>Christian Pellegrin</name>
<email>chripell@fsfe.org</email>
</author>
<published>2009-11-17T06:20:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=615534bc490606685621d63a40c0670d0f049d86'/>
<id>615534bc490606685621d63a40c0670d0f049d86</id>
<content type='text'>
Signed-off-by: Christian Pellegrin &lt;chripell@fsfe.org&gt;
Signed-off-by: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Christian Pellegrin &lt;chripell@fsfe.org&gt;
Signed-off-by: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
