<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/net/davinci_emac.c, branch v3.0.65</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>davinci_emac: Do not free all rx dma descriptors during init</title>
<updated>2012-03-01T00:34:32+00:00</updated>
<author>
<name>Christian Riesch</name>
<email>christian.riesch@omicron.at</email>
</author>
<published>2012-02-23T01:14:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=841099b95f7490cb33f1af48aac8e619ba1712c7'/>
<id>841099b95f7490cb33f1af48aac8e619ba1712c7</id>
<content type='text'>
commit 5d69703263d588dbb03f4e57091afd8942d96e6d upstream.

This patch fixes a regression that was introduced by

commit 0a5f38467765ee15478db90d81e40c269c8dda20
davinci_emac: Add Carrier Link OK check in Davinci RX Handler

Said commit adds a check whether the carrier link is ok. If the link is
not ok, the skb is freed and no new dma descriptor added to the rx dma
channel. This causes trouble during initialization when the carrier
status has not yet been updated. If a lot of packets are received while
netif_carrier_ok returns false, all dma descriptors are freed and the
rx dma transfer is stopped.

The bug occurs when the board is connected to a network with lots of
traffic and the ifconfig down/up is done, e.g., when reconfiguring
the interface with DHCP.

The bug can be reproduced by flood pinging the davinci board while doing
ifconfig eth0 down
ifconfig eth0 up
on the board.

After that, the rx path stops working and the overrun value reported
by ifconfig is counting up.

This patch reverts commit 0a5f38467765ee15478db90d81e40c269c8dda20
and instead issues warnings only if cpdma_chan_submit returns -ENOMEM.

Signed-off-by: Christian Riesch &lt;christian.riesch@omicron.at&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Cc: Cyril Chemparathy &lt;cyril@ti.com&gt;
Cc: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Tested-by: Rajashekhara, Sudhakar &lt;sudhakar.raj@ti.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

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

This patch fixes a regression that was introduced by

commit 0a5f38467765ee15478db90d81e40c269c8dda20
davinci_emac: Add Carrier Link OK check in Davinci RX Handler

Said commit adds a check whether the carrier link is ok. If the link is
not ok, the skb is freed and no new dma descriptor added to the rx dma
channel. This causes trouble during initialization when the carrier
status has not yet been updated. If a lot of packets are received while
netif_carrier_ok returns false, all dma descriptors are freed and the
rx dma transfer is stopped.

The bug occurs when the board is connected to a network with lots of
traffic and the ifconfig down/up is done, e.g., when reconfiguring
the interface with DHCP.

The bug can be reproduced by flood pinging the davinci board while doing
ifconfig eth0 down
ifconfig eth0 up
on the board.

After that, the rx path stops working and the overrun value reported
by ifconfig is counting up.

This patch reverts commit 0a5f38467765ee15478db90d81e40c269c8dda20
and instead issues warnings only if cpdma_chan_submit returns -ENOMEM.

Signed-off-by: Christian Riesch &lt;christian.riesch@omicron.at&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Cc: Cyril Chemparathy &lt;cyril@ti.com&gt;
Cc: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Tested-by: Rajashekhara, Sudhakar &lt;sudhakar.raj@ti.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>drivers/net/davinci_emac.c: add missing clk_put</title>
<updated>2011-06-02T04:20:14+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>julia@diku.dk</email>
</author>
<published>2011-06-01T07:10:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b722dbf176b67c75fe0f5a6b1b31f5ea8aa6117d'/>
<id>b722dbf176b67c75fe0f5a6b1b31f5ea8aa6117d</id>
<content type='text'>
Go to existing error handling code at the end of the function that calls
clk_put.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@r exists@
expression e1,e2;
statement S;
@@

e1 = clk_get@p1(...);
... when != e1 = e2
    when != clk_put(e1)
    when any
if (...) { ... when != clk_put(e1)
               when != if (...) { ... clk_put(e1) ... }
* return@p3 ...;
 } else S
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Acked-by: Kevin Hilman &lt;khilman@ti.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>
Go to existing error handling code at the end of the function that calls
clk_put.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@r exists@
expression e1,e2;
statement S;
@@

e1 = clk_get@p1(...);
... when != e1 = e2
    when != clk_put(e1)
    when any
if (...) { ... when != clk_put(e1)
               when != if (...) { ... clk_put(e1) ... }
* return@p3 ...;
 } else S
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Acked-by: Kevin Hilman &lt;khilman@ti.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: davinci_emac: fix dev_err use at probe</title>
<updated>2011-05-26T18:30:51+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>jhovold@gmail.com</email>
</author>
<published>2011-05-26T04:37:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=240b26284ac84f06ed0bc89c363f022e21b84b98'/>
<id>240b26284ac84f06ed0bc89c363f022e21b84b98</id>
<content type='text'>
Use platform device rather than net device in dev_err calls before net
device has been registered to avoid messages such as

	(null): DaVinci EMAC: Failed to get EMAC clock

Also replace remaining printks in probe with dev_{err,warn}.

Signed-off-by: Johan Hovold &lt;jhovold@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>
Use platform device rather than net device in dev_err calls before net
device has been registered to avoid messages such as

	(null): DaVinci EMAC: Failed to get EMAC clock

Also replace remaining printks in probe with dev_{err,warn}.

Signed-off-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix common misspellings</title>
<updated>2011-03-31T14:26:23+00:00</updated>
<author>
<name>Lucas De Marchi</name>
<email>lucas.demarchi@profusion.mobi</email>
</author>
<published>2011-03-31T01:57:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=25985edcedea6396277003854657b5f3cb31a628'/>
<id>25985edcedea6396277003854657b5f3cb31a628</id>
<content type='text'>
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: davinci_emac:Fix translation logic for buffer descriptor</title>
<updated>2011-03-23T02:25:05+00:00</updated>
<author>
<name>Sriram</name>
<email>srk@ti.com</email>
</author>
<published>2011-03-22T02:31:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6a1fef6d000944911df0f160f366111daa10740a'/>
<id>6a1fef6d000944911df0f160f366111daa10740a</id>
<content type='text'>
With recent changes to the driver(switch to new cpdma layer),
the support for buffer descriptor address translation logic
is broken. This affects platforms where the physical address of
the descriptors as seen by the DMA engine is different from the
physical address.

Original Patch adding translation logic support:
Commit: ad021ae8862209864dc8ebd3b7d3a55ce84b9ea2

Signed-off-by: Sriramakrishnan A G &lt;srk@ti.com&gt;
Tested-By: Sekhar Nori &lt;nsekhar@ti.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>
With recent changes to the driver(switch to new cpdma layer),
the support for buffer descriptor address translation logic
is broken. This affects platforms where the physical address of
the descriptors as seen by the DMA engine is different from the
physical address.

Original Patch adding translation logic support:
Commit: ad021ae8862209864dc8ebd3b7d3a55ce84b9ea2

Signed-off-by: Sriramakrishnan A G &lt;srk@ti.com&gt;
Tested-By: Sekhar Nori &lt;nsekhar@ti.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Davinci: Do not reset EMAC TX overruns counter on read</title>
<updated>2011-03-14T22:04:50+00:00</updated>
<author>
<name>Thomas Lange</name>
<email>thomas@corelatus.se</email>
</author>
<published>2011-03-09T04:41:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=60aeba23101f34a690a0b0a048ffde3d023d4f3b'/>
<id>60aeba23101f34a690a0b0a048ffde3d023d4f3b</id>
<content type='text'>
Don't reset tx_fifo_errors when reading out current EMAC stats.
  (tx_fifo_errors shows up as TX overruns in netdev stats.)

Without this correction, the old counter value is lost every time
stats are read out.

Signed-off-by: Thomas Lange &lt;thomas@corelatus.se&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>
Don't reset tx_fifo_errors when reading out current EMAC stats.
  (tx_fifo_errors shows up as TX overruns in netdev stats.)

Without this correction, the old counter value is lost every time
stats are read out.

Signed-off-by: Thomas Lange &lt;thomas@corelatus.se&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>davinci_emac: Add Carrier Link OK check in Davinci RX Handler</title>
<updated>2011-02-28T21:16:14+00:00</updated>
<author>
<name>Hegde, Vinay</name>
<email>vinay.hegde@ti.com</email>
</author>
<published>2011-02-24T23:56:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0a5f38467765ee15478db90d81e40c269c8dda20'/>
<id>0a5f38467765ee15478db90d81e40c269c8dda20</id>
<content type='text'>
This patch adds an additional check in the Davinci EMAC RX Handler,
which tests the __LINK_STATE_NOCARRIER flag along with the
__LINK_STATE_START flag as part EMAC shutting down procedure.

This avoids
WARNING: at drivers/net/davinci_emac.c:1040 emac_rx_handler+0xf8/0x120()
during rtcwake used to suspend the target for a specified duration.

Signed-off-by: Hegde, Vinay &lt;vinay.hegde@ti.com&gt;
Acked-by: Cyril Chemparathy &lt;cyril@ti.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>
This patch adds an additional check in the Davinci EMAC RX Handler,
which tests the __LINK_STATE_NOCARRIER flag along with the
__LINK_STATE_START flag as part EMAC shutting down procedure.

This avoids
WARNING: at drivers/net/davinci_emac.c:1040 emac_rx_handler+0xf8/0x120()
during rtcwake used to suspend the target for a specified duration.

Signed-off-by: Hegde, Vinay &lt;vinay.hegde@ti.com&gt;
Acked-by: Cyril Chemparathy &lt;cyril@ti.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: davinci_emac: cleanup unused cpdma code</title>
<updated>2010-09-24T14:40:31+00:00</updated>
<author>
<name>Cyril Chemparathy</name>
<email>cyril@ti.com</email>
</author>
<published>2010-09-15T14:11:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d4ef0d42313dffa1feb94142b4c4286169fd1b0e'/>
<id>d4ef0d42313dffa1feb94142b4c4286169fd1b0e</id>
<content type='text'>
Having switched over to the newly introduced cpdma layer, this patch now
removes a whole bunch of code that is now unused.  This patch has been
maintained separate strictly for reasons of readability.

Signed-off-by: Cyril Chemparathy &lt;cyril@ti.com&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Tested-by: Michael Williamson &lt;michael.williamson@criticallink.com&gt;
Tested-by: Caglar Akyuz &lt;caglarakyuz@gmail.com&gt;
Signed-off-by: Kevin Hilman &lt;khilman@deeprootsystems.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Having switched over to the newly introduced cpdma layer, this patch now
removes a whole bunch of code that is now unused.  This patch has been
maintained separate strictly for reasons of readability.

Signed-off-by: Cyril Chemparathy &lt;cyril@ti.com&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Tested-by: Michael Williamson &lt;michael.williamson@criticallink.com&gt;
Tested-by: Caglar Akyuz &lt;caglarakyuz@gmail.com&gt;
Signed-off-by: Kevin Hilman &lt;khilman@deeprootsystems.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: davinci_emac: switch to new cpdma layer</title>
<updated>2010-09-24T14:40:31+00:00</updated>
<author>
<name>Cyril Chemparathy</name>
<email>cyril@ti.com</email>
</author>
<published>2010-09-15T14:11:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3ef0fdb2342cf58f617ce2bdcd133978629c2403'/>
<id>3ef0fdb2342cf58f617ce2bdcd133978629c2403</id>
<content type='text'>
This patch hooks up the emac driver with the newly separated cpdma driver.

Key differences introduced here:

 - The old buffer list scheme is no longer required

 - The original code maintained mac address per rx channel, even if only one
   rx channel was being used.  With this change, mac address is maintained
   device wide.  If support for multiple rx channels is added in future, this
   will need to be reworked a bit.

 - The new CPDMA code handles short packets better than before.  The
   earlier code was adjusting the length up, without ensuring that the tail
   end of the padding was cleared - a possible security issue.  This has been
   fixed to use skb_padto().

Signed-off-by: Cyril Chemparathy &lt;cyril@ti.com&gt;
Tested-by: Michael Williamson &lt;michael.williamson@criticallink.com&gt;
Tested-by: Caglar Akyuz &lt;caglarakyuz@gmail.com&gt;
Signed-off-by: Kevin Hilman &lt;khilman@deeprootsystems.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch hooks up the emac driver with the newly separated cpdma driver.

Key differences introduced here:

 - The old buffer list scheme is no longer required

 - The original code maintained mac address per rx channel, even if only one
   rx channel was being used.  With this change, mac address is maintained
   device wide.  If support for multiple rx channels is added in future, this
   will need to be reworked a bit.

 - The new CPDMA code handles short packets better than before.  The
   earlier code was adjusting the length up, without ensuring that the tail
   end of the padding was cleared - a possible security issue.  This has been
   fixed to use skb_padto().

Signed-off-by: Cyril Chemparathy &lt;cyril@ti.com&gt;
Tested-by: Michael Williamson &lt;michael.williamson@criticallink.com&gt;
Tested-by: Caglar Akyuz &lt;caglarakyuz@gmail.com&gt;
Signed-off-by: Kevin Hilman &lt;khilman@deeprootsystems.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: davinci_emac: cleanup unused mdio emac code</title>
<updated>2010-09-24T14:40:30+00:00</updated>
<author>
<name>Cyril Chemparathy</name>
<email>cyril@ti.com</email>
</author>
<published>2010-09-15T14:11:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7b3742aff1a9946b9b25f16d6a7ca22c10926391'/>
<id>7b3742aff1a9946b9b25f16d6a7ca22c10926391</id>
<content type='text'>
This patch removes code that has been rendered useless by the previous patches
in this series.

Signed-off-by: Cyril Chemparathy &lt;cyril@ti.com&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Tested-by: Michael Williamson &lt;michael.williamson@criticallink.com&gt;
Tested-by: Caglar Akyuz &lt;caglarakyuz@gmail.com&gt;
Signed-off-by: Kevin Hilman &lt;khilman@deeprootsystems.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch removes code that has been rendered useless by the previous patches
in this series.

Signed-off-by: Cyril Chemparathy &lt;cyril@ti.com&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Tested-by: Michael Williamson &lt;michael.williamson@criticallink.com&gt;
Tested-by: Caglar Akyuz &lt;caglarakyuz@gmail.com&gt;
Signed-off-by: Kevin Hilman &lt;khilman@deeprootsystems.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
