<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/net/ethernet/arc, branch v4.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-05-26T05:13:15Z</updated>
<entry>
<title>net: arc: trivial: Replace comma with a semicolon</title>
<updated>2016-05-26T05:13:15Z</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2016-05-25T22:40:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3424d9be8f09649e6290d066c5c3cccff1c0ce77'/>
<id>urn:sha1:3424d9be8f09649e6290d066c5c3cccff1c0ce77</id>
<content type='text'>
Fix a typo in the driver, replace comma with a semicolon at the end
of statement. While using comma is a legal C here and probably does
not even generate compiler warning, it was unlikely the intention.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Caesar Wang &lt;wxt@rock-chips.com&gt;
Cc: Heiko Stuebner &lt;heiko@sntech.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: arc: trivial: cleanup the emac driver</title>
<updated>2016-03-16T23:28:01Z</updated>
<author>
<name>Caesar Wang</name>
<email>wxt@rock-chips.com</email>
</author>
<published>2016-03-14T08:01:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=663713eb477b9b916426124d6f5d5c5e9db919cf'/>
<id>urn:sha1:663713eb477b9b916426124d6f5d5c5e9db919cf</id>
<content type='text'>
This patch will make the driver more readability

The emac has the error and warnings if you run
'scripts/checkpatch.pl -f --subjective xxx' to check.

Let's clean up such trivial details.

Signed-off-by: Caesar Wang &lt;wxt@rock-chips.com&gt;
Cc: Jiri Kosina &lt;trivial@kernel.org&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Alexander Kochetkov &lt;al.kochet@gmail.com&gt;
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: arc_emac: support the phy reset for emac driver</title>
<updated>2016-03-16T23:28:01Z</updated>
<author>
<name>Caesar Wang</name>
<email>wxt@rock-chips.com</email>
</author>
<published>2016-03-14T08:01:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1bddd96cba03da0a14b3e5144e98c9a6ff17e983'/>
<id>urn:sha1:1bddd96cba03da0a14b3e5144e98c9a6ff17e983</id>
<content type='text'>
This patch adds to support the emac phy reset.

Different boards may require different phy reset duration. Add property
phy-reset-duration for emac driver, so that the boards that need
a longer reset duration can specify it in their device tree.

Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Signed-off-by: Caesar Wang &lt;wxt@rock-chips.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: netdev@vger.kernel.org
Cc: Alexander Kochetkov &lt;al.kochet@gmail.com&gt;
Cc: Sergei Shtylyov &lt;sergei.shtylyov@cogentembedded.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: arc_emac: fix sk_buff leak</title>
<updated>2016-02-16T20:26:30Z</updated>
<author>
<name>Alexander Kochetkov</name>
<email>al.kochet@gmail.com</email>
</author>
<published>2016-02-09T15:20:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b530b16413b7f99977ded50a3c4bebd2ea79c41b'/>
<id>urn:sha1:b530b16413b7f99977ded50a3c4bebd2ea79c41b</id>
<content type='text'>
EMAC could be disabled, while there is some sb_buff
in use. That buffers got lost for linux.

In order to reproduce run on device during active ethernet work:
    ifconfig eth0 down

Signed-off-by: Alexander Kochetkov &lt;al.kochet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: arc_emac: reset txbd_curr and txbd_dirty pointers to zero</title>
<updated>2016-02-16T20:26:30Z</updated>
<author>
<name>Alexander Kochetkov</name>
<email>al.kochet@gmail.com</email>
</author>
<published>2016-02-09T15:20:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=99f93a156a2aa9ac1e44f7cb1a197425e6d9879a'/>
<id>urn:sha1:99f93a156a2aa9ac1e44f7cb1a197425e6d9879a</id>
<content type='text'>
EMAC reset internal tx ring pointer to zero at statup.
txbd_curr and txbd_dirty can be different from zero.
That cause ethernet transfer hang (no packets transmitted).

In order to reproduce, run on device:
    ifconfig eth0 down
    ifconfig eth0 up

Signed-off-by: Alexander Kochetkov &lt;al.kochet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: arc_emac: fix koops caused by sk_buff free</title>
<updated>2016-02-16T20:26:30Z</updated>
<author>
<name>Alexander Kochetkov</name>
<email>al.kochet@gmail.com</email>
</author>
<published>2016-02-09T15:20:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c278c253f3d992c6994d08aa0efb2b6806ca396f'/>
<id>urn:sha1:c278c253f3d992c6994d08aa0efb2b6806ca396f</id>
<content type='text'>
There is a race between arc_emac_tx() and arc_emac_tx_clean().
sk_buff got freed by arc_emac_tx_clean() while arc_emac_tx()
submitting sk_buff.

In order to free sk_buff arc_emac_tx_clean() checks:
    if ((info &amp; FOR_EMAC) || !txbd-&gt;data)
        break;
    ...
    dev_kfree_skb_irq(skb);

If condition false, arc_emac_tx_clean() free sk_buff.

In order to submit txbd, arc_emac_tx() do:
    priv-&gt;tx_buff[*txbd_curr].skb = skb;
    ...
    priv-&gt;txbd[*txbd_curr].data = cpu_to_le32(addr);
    ...
    ...  &lt;== arc_emac_tx_clean() check condition here
    ...  &lt;== (info &amp; FOR_EMAC) is false
    ...  &lt;== !txbd-&gt;data is false
    ...
    *info = cpu_to_le32(FOR_EMAC | FIRST_OR_LAST_MASK | len);

In order to reproduce the situation,
run device:
    # iperf -s
run on host:
    # iperf -t 600 -c &lt;device-ip-addr&gt;

[   28.396284] ------------[ cut here ]------------
[   28.400912] kernel BUG at .../net/core/skbuff.c:1355!
[   28.414019] Internal error: Oops - BUG: 0 [#1] SMP ARM
[   28.419150] Modules linked in:
[   28.422219] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G    B           4.4.0+ #120
[   28.429516] Hardware name: Rockchip (Device Tree)
[   28.434216] task: c0665070 ti: c0660000 task.ti: c0660000
[   28.439622] PC is at skb_put+0x10/0x54
[   28.443381] LR is at arc_emac_poll+0x260/0x474
[   28.447821] pc : [&lt;c03af580&gt;]    lr : [&lt;c028fec4&gt;]    psr: a0070113
[   28.447821] sp : c0661e58  ip : eea68502  fp : ef377000
[   28.459280] r10: 0000012c  r9 : f08b2000  r8 : eeb57100
[   28.464498] r7 : 00000000  r6 : ef376594  r5 : 00000077  r4 : ef376000
[   28.471015] r3 : 0030488b  r2 : ef13e880  r1 : 000005ee  r0 : eeb57100
[   28.477534] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[   28.484658] Control: 10c5387d  Table: 8eaf004a  DAC: 00000051
[   28.490396] Process swapper/0 (pid: 0, stack limit = 0xc0660210)
[   28.496393] Stack: (0xc0661e58 to 0xc0662000)
[   28.500745] 1e40:                                                       00000002 00000000
[   28.508913] 1e60: 00000000 ef376520 00000028 f08b23b8 00000000 ef376520 ef7b6900 c028fc64
[   28.517082] 1e80: 2f158000 c0661ea8 c0661eb0 0000012c c065e900 c03bdeac ffff95e9 c0662100
[   28.525250] 1ea0: c0663924 00000028 c0661ea8 c0661ea8 c0661eb0 c0661eb0 0000001e c0660000
[   28.533417] 1ec0: 40000003 00000008 c0695a00 0000000a c066208c 00000100 c0661ee0 c0027410
[   28.541584] 1ee0: ef0fb700 2f158000 00200000 ffff95e8 00000004 c0662100 c0662080 00000003
[   28.549751] 1f00: 00000000 00000000 00000000 c065b45c 0000001e ef005000 c0647a30 00000000
[   28.557919] 1f20: 00000000 c0027798 00000000 c005cf40 f0802100 c0662ffc c0661f60 f0803100
[   28.566088] 1f40: c0661fb8 c00093bc c000ffb4 60070013 ffffffff c0661f94 c0661fb8 c00137d4
[   28.574267] 1f60: 00000001 00000000 00000000 c001ffa0 00000000 c0660000 00000000 c065a364
[   28.582441] 1f80: c0661fb8 c0647a30 00000000 00000000 00000000 c0661fb0 c000ffb0 c000ffb4
[   28.590608] 1fa0: 60070013 ffffffff 00000051 00000000 00000000 c005496c c0662400 c061bc40
[   28.598776] 1fc0: ffffffff ffffffff 00000000 c061b680 00000000 c0647a30 00000000 c0695294
[   28.606943] 1fe0: c0662488 c0647a2c c066619c 6000406a 413fc090 6000807c 00000000 00000000
[   28.615127] [&lt;c03af580&gt;] (skb_put) from [&lt;ef376520&gt;] (0xef376520)
[   28.621218] Code: e5902054 e590c090 e3520000 0a000000 (e7f001f2)
[   28.627307] ---[ end trace 4824734e2243fdb6 ]---

[   34.377068] Internal error: Oops: 17 [#1] SMP ARM
[   34.382854] Modules linked in:
[   34.385947] CPU: 0 PID: 3 Comm: ksoftirqd/0 Not tainted 4.4.0+ #120
[   34.392219] Hardware name: Rockchip (Device Tree)
[   34.396937] task: ef02d040 ti: ef05c000 task.ti: ef05c000
[   34.402376] PC is at __dev_kfree_skb_irq+0x4/0x80
[   34.407121] LR is at arc_emac_poll+0x130/0x474
[   34.411583] pc : [&lt;c03bb640&gt;]    lr : [&lt;c028fd94&gt;]    psr: 60030013
[   34.411583] sp : ef05de68  ip : 0008e83c  fp : ef377000
[   34.423062] r10: c001bec4  r9 : 00000000  r8 : f08b24c8
[   34.428296] r7 : f08b2400  r6 : 00000075  r5 : 00000019  r4 : ef376000
[   34.434827] r3 : 00060000  r2 : 00000042  r1 : 00000001  r0 : 00000000
[   34.441365] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[   34.448507] Control: 10c5387d  Table: 8f25c04a  DAC: 00000051
[   34.454262] Process ksoftirqd/0 (pid: 3, stack limit = 0xef05c210)
[   34.460449] Stack: (0xef05de68 to 0xef05e000)
[   34.464827] de60:                   ef376000 c028fd94 00000000 c0669480 c0669480 ef376520
[   34.473022] de80: 00000028 00000001 00002ae4 ef376520 ef7b6900 c028fc64 2f158000 ef05dec0
[   34.481215] dea0: ef05dec8 0000012c c065e900 c03bdeac ffff983f c0662100 c0663924 00000028
[   34.489409] dec0: ef05dec0 ef05dec0 ef05dec8 ef05dec8 ef7b6000 ef05c000 40000003 00000008
[   34.497600] dee0: c0695a00 0000000a c066208c 00000100 ef05def8 c0027410 ef7b6000 40000000
[   34.505795] df00: 04208040 ffff983e 00000004 c0662100 c0662080 00000003 ef05c000 ef027340
[   34.513985] df20: ef05c000 c0666c2c 00000000 00000001 00000002 00000000 00000000 c0027568
[   34.522176] df40: ef027340 c003ef48 ef027300 00000000 ef027340 c003edd4 00000000 00000000
[   34.530367] df60: 00000000 c003c37c ffffff7f 00000001 00000000 ef027340 00000000 00030003
[   34.538559] df80: ef05df80 ef05df80 00000000 00000000 ef05df90 ef05df90 ef05dfac ef027300
[   34.546750] dfa0: c003c2a4 00000000 00000000 c000f578 00000000 00000000 00000000 00000000
[   34.554939] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   34.563129] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 ffffffff dfff7fff
[   34.571360] [&lt;c03bb640&gt;] (__dev_kfree_skb_irq) from [&lt;c028fd94&gt;] (arc_emac_poll+0x130/0x474)
[   34.579840] [&lt;c028fd94&gt;] (arc_emac_poll) from [&lt;c03bdeac&gt;] (net_rx_action+0xdc/0x28c)
[   34.587712] [&lt;c03bdeac&gt;] (net_rx_action) from [&lt;c0027410&gt;] (__do_softirq+0xcc/0x1f8)
[   34.595482] [&lt;c0027410&gt;] (__do_softirq) from [&lt;c0027568&gt;] (run_ksoftirqd+0x2c/0x50)
[   34.603168] [&lt;c0027568&gt;] (run_ksoftirqd) from [&lt;c003ef48&gt;] (smpboot_thread_fn+0x174/0x18c)
[   34.611466] [&lt;c003ef48&gt;] (smpboot_thread_fn) from [&lt;c003c37c&gt;] (kthread+0xd8/0xec)
[   34.619075] [&lt;c003c37c&gt;] (kthread) from [&lt;c000f578&gt;] (ret_from_fork+0x14/0x3c)
[   34.626317] Code: e8bd8010 e3a00000 e12fff1e e92d4010 (e59030a4)
[   34.632572] ---[ end trace cca5a3d86a82249a ]---

Signed-off-by: Alexander Kochetkov &lt;al.kochet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: ethernet: arc: Add support emac for RK3036</title>
<updated>2016-01-11T03:21:31Z</updated>
<author>
<name>Xing Zheng</name>
<email>zhengxing@rock-chips.com</email>
</author>
<published>2016-01-08T01:35:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=af72261f33ee4958bb53e299746014f44e1134c4'/>
<id>urn:sha1:af72261f33ee4958bb53e299746014f44e1134c4</id>
<content type='text'>
The RK3036's GRFs offset are different with RK3066/RK3188, and need to set
mac TX/RX clock before probe emac.

Signed-off-by: Xing Zheng &lt;zhengxing@rock-chips.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: ethernet: arc: Keep emac compatibility for more Rockchip SoCs</title>
<updated>2016-01-11T03:21:31Z</updated>
<author>
<name>Xing Zheng</name>
<email>zhengxing@rock-chips.com</email>
</author>
<published>2016-01-08T01:35:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f4c9d3ee0334fd9c6c8f2c3a8bd7d0841880e127'/>
<id>urn:sha1:f4c9d3ee0334fd9c6c8f2c3a8bd7d0841880e127</id>
<content type='text'>
On the RK3066/RK3188, there was fixed GRF offset configuration to set emac
and fixed DIV2 mac TX/RX clock. So, we need to easily set and fit to other
SoCs (RK3036) which maybe have different GRF offset, and need adjust mac
TX/RX clock.

Signed-off-by: Xing Zheng &lt;zhengxing@rock-chips.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: ethernet: arc: Probe emac after set RMII clock</title>
<updated>2016-01-11T03:21:31Z</updated>
<author>
<name>Xing Zheng</name>
<email>zhengxing@rock-chips.com</email>
</author>
<published>2016-01-08T01:35:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c9bca2fe3ca6d6dac2a27eb8619955648369efed'/>
<id>urn:sha1:c9bca2fe3ca6d6dac2a27eb8619955648369efed</id>
<content type='text'>
After enter arc_emac_probe, emac will get_phy_id, phy_poll_reset and
other connecting PHY via mdiobus_read, so we need to set correct
ref clock rate for emac before probe emac.

Signed-off-by: Xing Zheng &lt;zhengxing@rock-chips.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: arc: Fix module autoload for OF platform driver</title>
<updated>2015-09-21T23:08:20Z</updated>
<author>
<name>Luis de Bethencourt</name>
<email>luis@debethencourt.com</email>
</author>
<published>2015-09-18T15:54:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c7d778fa74a88e7b5a09ba498d66bd67a7dc7df0'/>
<id>urn:sha1:c7d778fa74a88e7b5a09ba498d66bd67a7dc7df0</id>
<content type='text'>
This platform driver has a OF device ID table but the OF module
alias information is not created so module autoloading won't work.

Signed-off-by: Luis de Bethencourt &lt;luisbg@osg.samsung.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
