<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/net/arm, branch v3.1.1</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>NET: am79c961: fix race in link status code</title>
<updated>2011-09-05T07:58:29+00:00</updated>
<author>
<name>Russell King</name>
<email>rmk+kernel@arm.linux.org.uk</email>
</author>
<published>2011-09-05T07:58:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1df726ef0a700587a712a3660b2caa8e533c7de9'/>
<id>1df726ef0a700587a712a3660b2caa8e533c7de9</id>
<content type='text'>
The link status code operates from a timer, and writes the index
register without first taking a lock.  A well-placed interrupt
between writing the index register and reading the data register
could change the index register on us, which will return wrong data.
Add the necessary lock.

Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The link status code operates from a timer, and writes the index
register without first taking a lock.  A well-placed interrupt
between writing the index register and reading the data register
could change the index register on us, which will return wrong data.
Add the necessary lock.

Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: am79c961a: Omit check for multicast bit in netdev_for_each_mc_addr</title>
<updated>2011-07-01T05:13:38+00:00</updated>
<author>
<name>Tobias Klauser</name>
<email>tklauser@distanz.ch</email>
</author>
<published>2011-06-29T02:14:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bda7ed47937bd9ba8c10631ca884f7fefb162f4d'/>
<id>bda7ed47937bd9ba8c10631ca884f7fefb162f4d</id>
<content type='text'>
There is no need to check for the address being a multicast address in
the netdev_for_each_mc_addr loop, so remove it.

Signed-off-by: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Acked-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&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>
There is no need to check for the address being a multicast address in
the netdev_for_each_mc_addr loop, so remove it.

Signed-off-by: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Acked-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: remove mm.h inclusion from netdevice.h</title>
<updated>2011-06-22T02:17:20+00:00</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2011-06-16T11:01:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b7f080cfe223b3b7424872639d153695615a9255'/>
<id>b7f080cfe223b3b7424872639d153695615a9255</id>
<content type='text'>
Remove linux/mm.h inclusion from netdevice.h -- it's unused (I've checked manually).

To prevent mm.h inclusion via other channels also extract "enum dma_data_direction"
definition into separate header. This tiny piece is what gluing netdevice.h with mm.h
via "netdevice.h =&gt; dmaengine.h =&gt; dma-mapping.h =&gt; scatterlist.h =&gt; mm.h".
Removal of mm.h from scatterlist.h was tried and was found not feasible
on most archs, so the link was cutoff earlier.

Hope people are OK with tiny include file.

Note, that mm_types.h is still dragged in, but it is a separate story.

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.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>
Remove linux/mm.h inclusion from netdevice.h -- it's unused (I've checked manually).

To prevent mm.h inclusion via other channels also extract "enum dma_data_direction"
definition into separate header. This tiny piece is what gluing netdevice.h with mm.h
via "netdevice.h =&gt; dmaengine.h =&gt; dma-mapping.h =&gt; scatterlist.h =&gt; mm.h".
Removal of mm.h from scatterlist.h was tried and was found not feasible
on most archs, so the link was cutoff earlier.

Hope people are OK with tiny include file.

Note, that mm_types.h is still dragged in, but it is a separate story.

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6</title>
<updated>2011-06-21T05:29:08+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-06-21T05:29:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9f6ec8d697c08963d83880ccd35c13c5ace716ea'/>
<id>9f6ec8d697c08963d83880ccd35c13c5ace716ea</id>
<content type='text'>
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
	drivers/net/wireless/rtlwifi/pci.c
	net/netfilter/ipvs/ip_vs_core.c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
	drivers/net/wireless/rtlwifi/pci.c
	net/netfilter/ipvs/ip_vs_core.c
</pre>
</div>
</content>
</entry>
<entry>
<title>net: ep93xx_eth: fix DMA API violations</title>
<updated>2011-06-11T23:25:16+00:00</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@iki.fi</email>
</author>
<published>2011-06-11T08:39:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f1c089e3192f1afdfa76226dc38ef81b08ac810d'/>
<id>f1c089e3192f1afdfa76226dc38ef81b08ac810d</id>
<content type='text'>
Russell King said:
&gt;
&gt; So, to summarize what its doing:
&gt;
&gt; 1. It allocates buffers for rx and tx.
&gt; 2. It maps them with dma_map_single().
&gt;       This transfers ownership of the buffer to the DMA device.
&gt; 3. In ep93xx_xmit,
&gt; 3a. It copies the data into the buffer with skb_copy_and_csum_dev()
&gt;       This violates the DMA buffer ownership rules - the CPU should
&gt;       not be writing to this buffer while it is (in principle) owned
&gt;       by the DMA device.
&gt; 3b. It then calls dma_sync_single_for_cpu() for the buffer.
&gt;       This transfers ownership of the buffer to the CPU, which surely
&gt;       is the wrong direction.
&gt; 4. In ep93xx_rx,
&gt; 4a. It calls dma_sync_single_for_cpu() for the buffer.
&gt;       This at least transfers the DMA buffer ownership to the CPU
&gt;       before the CPU reads the buffer
&gt; 4b. It then uses skb_copy_to_linear_data() to copy the data out.
&gt;       At no point does it transfer ownership back to the DMA device.
&gt; 5. When the driver is removed, it dma_unmap_single()'s the buffer.
&gt;       This transfers ownership of the buffer to the CPU.
&gt; 6. It frees the buffer.
&gt;
&gt; While it may work on ep93xx, it's not respecting the DMA API rules,
&gt; and with DMA debugging enabled it will probably encounter quite a few
&gt; warnings.

This patch fixes these violations.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@iki.fi&gt;
Acked-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
Acked-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Tested-by: Petr Stetiar &lt;ynezz@true.cz&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>
Russell King said:
&gt;
&gt; So, to summarize what its doing:
&gt;
&gt; 1. It allocates buffers for rx and tx.
&gt; 2. It maps them with dma_map_single().
&gt;       This transfers ownership of the buffer to the DMA device.
&gt; 3. In ep93xx_xmit,
&gt; 3a. It copies the data into the buffer with skb_copy_and_csum_dev()
&gt;       This violates the DMA buffer ownership rules - the CPU should
&gt;       not be writing to this buffer while it is (in principle) owned
&gt;       by the DMA device.
&gt; 3b. It then calls dma_sync_single_for_cpu() for the buffer.
&gt;       This transfers ownership of the buffer to the CPU, which surely
&gt;       is the wrong direction.
&gt; 4. In ep93xx_rx,
&gt; 4a. It calls dma_sync_single_for_cpu() for the buffer.
&gt;       This at least transfers the DMA buffer ownership to the CPU
&gt;       before the CPU reads the buffer
&gt; 4b. It then uses skb_copy_to_linear_data() to copy the data out.
&gt;       At no point does it transfer ownership back to the DMA device.
&gt; 5. When the driver is removed, it dma_unmap_single()'s the buffer.
&gt;       This transfers ownership of the buffer to the CPU.
&gt; 6. It frees the buffer.
&gt;
&gt; While it may work on ep93xx, it's not respecting the DMA API rules,
&gt; and with DMA debugging enabled it will probably encounter quite a few
&gt; warnings.

This patch fixes these violations.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@iki.fi&gt;
Acked-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
Acked-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Tested-by: Petr Stetiar &lt;ynezz@true.cz&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: ep93xx_eth: drop GFP_DMA from call to dma_alloc_coherent()</title>
<updated>2011-06-11T23:25:16+00:00</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@iki.fi</email>
</author>
<published>2011-06-11T08:39:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1f758a4341ac83289a549e6ba2d29a08cf639717'/>
<id>1f758a4341ac83289a549e6ba2d29a08cf639717</id>
<content type='text'>
Commit a197b59ae6e8 (mm: fail GFP_DMA allocations when ZONE_DMA is not
configured) made page allocator to return NULL if GFP_DMA is set but
CONFIG_ZONE_DMA is disabled.

This causes ep93xx_eth to fail:

 WARNING: at mm/page_alloc.c:2251 __alloc_pages_nodemask+0x11c/0x638()
 Modules linked in:
 [&lt;c0035498&gt;] (unwind_backtrace+0x0/0xf4) from [&lt;c0043da4&gt;] (warn_slowpath_common+0x48/0x60)
 [&lt;c0043da4&gt;] (warn_slowpath_common+0x48/0x60) from [&lt;c0043dd8&gt;] (warn_slowpath_null+0x1c/0x24)
 [&lt;c0043dd8&gt;] (warn_slowpath_null+0x1c/0x24) from [&lt;c0083b6c&gt;] (__alloc_pages_nodemask+0x11c/0x638)
 [&lt;c0083b6c&gt;] (__alloc_pages_nodemask+0x11c/0x638) from [&lt;c00366fc&gt;] (__dma_alloc+0x8c/0x3ec)
 [&lt;c00366fc&gt;] (__dma_alloc+0x8c/0x3ec) from [&lt;c0036adc&gt;] (dma_alloc_coherent+0x54/0x60)
 [&lt;c0036adc&gt;] (dma_alloc_coherent+0x54/0x60) from [&lt;c0227808&gt;] (ep93xx_open+0x20/0x864)
 [&lt;c0227808&gt;] (ep93xx_open+0x20/0x864) from [&lt;c0283144&gt;] (__dev_open+0xb8/0x108)
 [&lt;c0283144&gt;] (__dev_open+0xb8/0x108) from [&lt;c0280528&gt;] (__dev_change_flags+0x70/0x128)
 [&lt;c0280528&gt;] (__dev_change_flags+0x70/0x128) from [&lt;c0283054&gt;] (dev_change_flags+0x10/0x48)
 [&lt;c0283054&gt;] (dev_change_flags+0x10/0x48) from [&lt;c001a720&gt;] (ip_auto_config+0x190/0xf68)
 [&lt;c001a720&gt;] (ip_auto_config+0x190/0xf68) from [&lt;c00233b0&gt;] (do_one_initcall+0x34/0x18c)
 [&lt;c00233b0&gt;] (do_one_initcall+0x34/0x18c) from [&lt;c0008400&gt;] (kernel_init+0x94/0x134)
 [&lt;c0008400&gt;] (kernel_init+0x94/0x134) from [&lt;c0030858&gt;] (kernel_thread_exit+0x0/0x8)

Since there is no restrictions for DMA on ep93xx, we can fix this by just
removing the GFP_DMA flag from the call.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@iki.fi&gt;
Acked-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
Acked-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Tested-by: Petr Stetiar &lt;ynezz@true.cz&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>
Commit a197b59ae6e8 (mm: fail GFP_DMA allocations when ZONE_DMA is not
configured) made page allocator to return NULL if GFP_DMA is set but
CONFIG_ZONE_DMA is disabled.

This causes ep93xx_eth to fail:

 WARNING: at mm/page_alloc.c:2251 __alloc_pages_nodemask+0x11c/0x638()
 Modules linked in:
 [&lt;c0035498&gt;] (unwind_backtrace+0x0/0xf4) from [&lt;c0043da4&gt;] (warn_slowpath_common+0x48/0x60)
 [&lt;c0043da4&gt;] (warn_slowpath_common+0x48/0x60) from [&lt;c0043dd8&gt;] (warn_slowpath_null+0x1c/0x24)
 [&lt;c0043dd8&gt;] (warn_slowpath_null+0x1c/0x24) from [&lt;c0083b6c&gt;] (__alloc_pages_nodemask+0x11c/0x638)
 [&lt;c0083b6c&gt;] (__alloc_pages_nodemask+0x11c/0x638) from [&lt;c00366fc&gt;] (__dma_alloc+0x8c/0x3ec)
 [&lt;c00366fc&gt;] (__dma_alloc+0x8c/0x3ec) from [&lt;c0036adc&gt;] (dma_alloc_coherent+0x54/0x60)
 [&lt;c0036adc&gt;] (dma_alloc_coherent+0x54/0x60) from [&lt;c0227808&gt;] (ep93xx_open+0x20/0x864)
 [&lt;c0227808&gt;] (ep93xx_open+0x20/0x864) from [&lt;c0283144&gt;] (__dev_open+0xb8/0x108)
 [&lt;c0283144&gt;] (__dev_open+0xb8/0x108) from [&lt;c0280528&gt;] (__dev_change_flags+0x70/0x128)
 [&lt;c0280528&gt;] (__dev_change_flags+0x70/0x128) from [&lt;c0283054&gt;] (dev_change_flags+0x10/0x48)
 [&lt;c0283054&gt;] (dev_change_flags+0x10/0x48) from [&lt;c001a720&gt;] (ip_auto_config+0x190/0xf68)
 [&lt;c001a720&gt;] (ip_auto_config+0x190/0xf68) from [&lt;c00233b0&gt;] (do_one_initcall+0x34/0x18c)
 [&lt;c00233b0&gt;] (do_one_initcall+0x34/0x18c) from [&lt;c0008400&gt;] (kernel_init+0x94/0x134)
 [&lt;c0008400&gt;] (kernel_init+0x94/0x134) from [&lt;c0030858&gt;] (kernel_thread_exit+0x0/0x8)

Since there is no restrictions for DMA on ep93xx, we can fix this by just
removing the GFP_DMA flag from the call.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@iki.fi&gt;
Acked-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
Acked-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Tested-by: Petr Stetiar &lt;ynezz@true.cz&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: ep93xx_eth: allocate buffers using kmalloc()</title>
<updated>2011-06-11T23:25:15+00:00</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@iki.fi</email>
</author>
<published>2011-06-11T08:39:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3247a1fcee49b571b40c4bd723439ce5c64f56ad'/>
<id>3247a1fcee49b571b40c4bd723439ce5c64f56ad</id>
<content type='text'>
We can use simply kmalloc() to allocate the buffers. This also simplifies the
code and allows us to perform DMA sync operations more easily.

Memory is allocated with only GFP_KERNEL since there are no DMA allocation
restrictions on this platform.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@iki.fi&gt;
Acked-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
Acked-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Tested-by: Petr Stetiar &lt;ynezz@true.cz&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>
We can use simply kmalloc() to allocate the buffers. This also simplifies the
code and allows us to perform DMA sync operations more easily.

Memory is allocated with only GFP_KERNEL since there are no DMA allocation
restrictions on this platform.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@iki.fi&gt;
Acked-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
Acked-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Tested-by: Petr Stetiar &lt;ynezz@true.cz&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: ep93xx_eth: pass struct device to DMA API functions</title>
<updated>2011-06-11T23:25:15+00:00</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@iki.fi</email>
</author>
<published>2011-06-11T08:39:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fc9b4910b00039da054f221e2821be0519261101'/>
<id>fc9b4910b00039da054f221e2821be0519261101</id>
<content type='text'>
We shouldn't use NULL for any DMA API functions, unless we are dealing with
ISA or EISA device. So pass correct struct dev pointer to these functions.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@iki.fi&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>
We shouldn't use NULL for any DMA API functions, unless we are dealing with
ISA or EISA device. So pass correct struct dev pointer to these functions.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@iki.fi&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NET: am79c961: fix assembler warnings</title>
<updated>2011-06-11T22:56:01+00:00</updated>
<author>
<name>Russell King - ARM Linux</name>
<email>linux@arm.linux.org.uk</email>
</author>
<published>2011-06-10T00:52:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f777737885a69d37132c956f1e8deab676693157'/>
<id>f777737885a69d37132c956f1e8deab676693157</id>
<content type='text'>
Fix:
/tmp/ccvoZ6h8.s: Assembler messages:
/tmp/ccvoZ6h8.s:284: Warning: register range not in ascending order
/tmp/ccvoZ6h8.s:881: Warning: register range not in ascending order
/tmp/ccvoZ6h8.s:1087: Warning: register range not in ascending order

by ensuring that we have temporary variables placed into specific
registers.  Reorder the code a bit to allow the resulting assembly
to be slightly more optimal.

Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&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>
Fix:
/tmp/ccvoZ6h8.s: Assembler messages:
/tmp/ccvoZ6h8.s:284: Warning: register range not in ascending order
/tmp/ccvoZ6h8.s:881: Warning: register range not in ascending order
/tmp/ccvoZ6h8.s:1087: Warning: register range not in ascending order

by ensuring that we have temporary variables placed into specific
registers.  Reorder the code a bit to allow the resulting assembly
to be slightly more optimal.

Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NET: am79c961: ensure multicast filter is correctly set at open</title>
<updated>2011-06-11T22:56:00+00:00</updated>
<author>
<name>Russell King - ARM Linux</name>
<email>linux@arm.linux.org.uk</email>
</author>
<published>2011-06-10T00:52:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bfc6501324427a97814de1587f89d73bf8677057'/>
<id>bfc6501324427a97814de1587f89d73bf8677057</id>
<content type='text'>
We were clearing out the multicast filter whenever the interface was
upped, and not setting the mode bits correctly.  This can cause
problems if there are any multicast addresses already set at this
point, or if ALLMULTI was set.

Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&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>
We were clearing out the multicast filter whenever the interface was
upped, and not setting the mode bits correctly.  This can cause
problems if there are any multicast addresses already set at this
point, or if ALLMULTI was set.

Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
